提交

Inistate

@Inistate

Inistate is a process platform where AI agents and humans share the same workflow primitives — same forms, same state transitions, same audit trail. Connect any MCP client (Claude, Cursor, Gemini CLI, custom agents) to design modules, run state transitions, query entries, and upload files against live Inistate workspaces. Agents work inside a governed state machine with confidence-gated escalation and full reasoning capture (model, sources, prompt hash). Built on FACTSOps and the patented ProcessCanvas notation. No system prompt required — the schema is the prompt.
概览

Inistate MCP Server

MCP server for the Inistate platform — module discovery, entry management, and activity submission.

Setup

Environment Variables

VariableRequiredDefaultDescription
INISTATE_API_TOKENYesBearer token for Inistate API authentication
INISTATE_API_BASENohttps://api.inistate.comAPI base URL

No clone or build needed — npx will fetch and run the published package on demand:

npx -y inistate-mcp

Or install globally:

npm install -g inistate-mcp
inistate-mcp

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "inistate": {
      "command": "npx",
      "args": ["-y", "inistate-mcp"],
      "env": {
        "INISTATE_API_TOKEN": "your-token-here"
      }
    }
  }
}

Claude Code Configuration

claude mcp add inistate -e INISTATE_API_TOKEN=your-token-here -- npx -y inistate-mcp

Install from source

git clone https://github.com/Inistate/inistate-mcp.git
cd inistate-mcp
npm install
npm run build

Then point your MCP client at node /absolute/path/to/inistate-mcp/build/index.js.

Tools

ToolDescription
list_workspacesList workspaces the user has access to
set_workspaceSet the active workspace
list_modulesList all discoverable modules in the workspace
get_module_schemaGet the canvas schema (basic or extended tier)
get_module_canvasGet full module definition with stable IDs (round-trippable)
list_entriesQuery entries with filters, sorting, and pagination
get_entryRead a single entry by ID
get_formGet form fields and defaults for an activity
submit_activityCreate, edit, delete, or run custom activities
get_entry_historyGet entry audit trail and comments
upload_fileUpload a file to S3 storage
download_fileDownload a file (returns pre-signed URL)
design_workflowGenerate a scaffolded module template from a description
validate_designValidate a module schema before creating or updating
create_moduleCreate a new module with schema
update_moduleUpdate an existing module's schema

Resources

URIDescription
inistate://modulesList all modules
inistate://modules/{name}/canvasBasic module schema (fields + states)
inistate://modules/{name}/canvas/extendedExtended schema with activities and flows
inistate://schemaFACTSOps schema definition (field types, colors, validation rules)
inistate://design-guideFACTS Module Design Guide

Prompts

PromptDescription
design_factsops_workflowGuide an agent through designing a complete workflow module
execute_activityGuide an agent through executing a specific activity
diagnose_entryGuide an agent through investigating an entry's state and history

Typical Workflow

  1. list_workspacesset_workspace — select a workspace
  2. list_modules — find the module you need
  3. get_module_schema — understand its fields, states, and activities
  4. get_form — discover required fields before submitting
  5. submit_activity — create or update entries
  6. list_entries — query and browse data
  7. get_entry_history — review entry history

Development

npm run watch          # Watch mode for TypeScript compilation
npm run inspector      # Test with MCP Inspector

PM2 (Ubuntu/AWS)

Run the HTTP transport in production using PM2:

npm install
npm run build
npm run pm2:start
npx pm2 save

Enable startup on reboot:

sudo npx pm2 startup systemd -u ubuntu --hp /home/ubuntu
npx pm2 save

Common operations:

npm run pm2:restart
npm run pm2:logs
npm run pm2:stop

Set required environment variables (INISTATE_API_TOKEN, and optionally INISTATE_API_URL, INISTATE_WORKSPACE_ID, OAUTH_ISSUER_URL, INISTATE_APP_URL) in your shell, PM2 ecosystem env, or deployment secret manager before starting.

Testing

Run all tests

npm test

Watch mode (re-runs on file changes)

npm run test:watch

Test structure

Tests are in src/ alongside the source files and use Vitest:

FileTypeWhat it covers
src/schema.test.tsUnit tests (50)designWorkflow, validateDesign, helper functions (isValidFieldType, isValidColor, isValidActor, suggestColorForState)
src/server.test.tsIntegration tests (14)Spins up the MCP server as a child process and exercises it through the official MCP SDK client — tool discovery, resource reads, prompt retrieval, and local tool calls

Unit tests cover:

  • Field type and color validation against the schema
  • State color suggestion logic
  • Design validation: duplicate names, invalid types/colors/actors, initial state rules, flow integrity, unreachable states, unused activities, AI confidence warnings
  • Workflow design: pattern detection (approval, ticket, pipeline, record list), industry defaults
  • Intent resolution: all 5 modes, context boosting, confidence scoring

Integration tests verify (no API token needed):

  • All 17 tools, 5 resources, and 3 prompts are registered
  • design_workflow, validate_design work end-to-end through the MCP protocol
  • Static resources (inistate://schema, inistate://design-guide) return valid content
  • All 3 prompts return correctly templated messages

Interactive testing with MCP Inspector

INISTATE_API_TOKEN=your-token npm run inspector

Opens a browser UI where you can interactively call tools, inspect schemas, and see responses.

服务器配置

{
  "mcpServers": {
    "Inistate": {
      "type": "streamable-http",
      "url": "https://mcp.inistate.com/mcp",
      "note": "For Streamable HTTP connections, add this URL directly in your MCP Client"
    }
  }
}
© 2025 MCP.so. All rights reserved.

Build with ShipAny.