@crscreditapi/cascades-mcp-server
v0.4.0-af94aba
Published
MCP server for CRS Cascades — list, trigger, and inspect decision workflows (cascades) over the public /api/v1.
Downloads
37
Readme
@crscreditapi/cascades-mcp-server
MCP server for CRS Cascades — lets an AI assistant (Claude Code, Claude Desktop, Cursor, …)
list your decision workflows ("cascades"), run them for an applicant, and read the results, over
the public /api/v1. A thin wrapper: every tool is one authenticated REST call, reusing your CRS
API key (no MCP-specific auth).
Tools
| Tool | What it does | API call |
|------|--------------|----------|
| cascades_list_workflows | List your saved cascades (id, name, use_case, active…) | GET /api/v1/workflows |
| cascades_create_workflow | Create a cascade from a JSON definition (active by default) | POST /api/v1/workflows |
| cascades_get_workflow | Fetch one cascade incl. its full node graph (definition) | GET /api/v1/workflows/:id |
| cascades_update_workflow | Update a cascade (partial: name / definition / active / …) | PATCH /api/v1/workflows/:id |
| cascades_delete_workflow | Delete a cascade (soft-delete) | DELETE /api/v1/workflows/:id |
| cascades_generate_workflow | AI-build a cascade from a plain-English policy description, then create it | POST /api/v1/workflows/generate |
| cascades_trigger_workflow | Run a cascade for an applicant → returns a pending execution | POST /api/v1/workflows/:id/trigger |
| cascades_get_execution | Poll an execution; read status + step_outputs | GET /api/v1/executions/:id |
All tools accept an optional environment: "prod" | "dev".
Configuration
| Env var | Required | Description |
|---------|----------|-------------|
| CASCADES_API_KEY | ✅ | Your CRS Cascades API key (bearer token). Mint one at /admin/api_demo_token. |
| CASCADES_PROD_BASE_URL | ✅ | Cascades host, e.g. https://api.crscreditapi.com (no trailing /api/v1). |
| CASCADES_DEV_BASE_URL | – | Optional dev/sandbox host; falls back to prod. |
| CASCADES_TIMEOUT_MS | – | Request timeout, default 30000. |
| MCP_TRANSPORT | – | stdio (default) or http. |
| MCP_PORT | – | HTTP port (default 3004), only for MCP_TRANSPORT=http. |
Token scopes. The key must carry
workflows:read,workflows:write,executions:write, andexecutions:read. A key minted without a required scope returns403 insufficient_scopeon the affected tool (the others still work). Read-only integrations can drop the:writescopes.
Install (local / stdio — Claude Code & Claude Desktop)
npm install -g @crscreditapi/cascades-mcp-serverAdd to your MCP config (.mcp.json for Claude Code, claude_desktop_config.json for Claude Desktop):
{
"mcpServers": {
"cascades": {
"command": "cascades-mcp-server",
"env": {
"MCP_TRANSPORT": "stdio",
"CASCADES_PROD_BASE_URL": "https://api.crscreditapi.com",
"CASCADES_API_KEY": "<your-api-key>"
}
}
}
}Or let your assistant do it:
claude mcp add cascades -- cascades-mcp-serverThen just ask: "List my cascades", "Trigger workflow 157 for Maria Santos and explain the decision."
Run (HTTP — hosted / n8n / EC2)
MCP_TRANSPORT=http MCP_PORT=3004 \
CASCADES_PROD_BASE_URL=https://api.crscreditapi.com \
CASCADES_API_KEY=<key> \
cascades-mcp-serverPoint the client at http://<host>:3004/mcp (stateless Streamable HTTP). GET /health → { "status": "ok" }.
Security — HTTP mode. HTTP serves every caller with the server's single
CASCADES_API_KEYand has no per-request auth, so run it only on a trusted/internal network (e.g. behind n8n on the EC2 host), never exposed publicly. For per-customer use, ship the stdio binary so each customer supplies their own key inmcp.json. Per-request auth (an OAuth handshake) is the v2 path.
Develop
npm install
npm run build
MCP_TRANSPORT=http CASCADES_PROD_BASE_URL=http://localhost:3000 CASCADES_API_KEY=<key> npm startTest tools interactively with the MCP Inspector (npx @modelcontextprotocol/inspector).
Roadmap
- next: a PDF create path (build a cascade from an uploaded policy document), and an implementation-guide resource (expose the API docs as MCP context). Text-based create already ships —
cascades_create_workflow(from a JSON definition) andcascades_generate_workflow(from a plain-English description). - v2: OAuth handshake (replace the shared API key), webhook-completion polling, Slack/Autopsy integration.
