Model Context Protocol (MCP) server that exposes Prism liquidity agent commands as tools for Claude Desktop and other MCP clients.
Exposes 4 tools to any MCP-compatible client (Claude Desktop, Claude Code, Cursor, etc.):
| Tool | What it does |
|---|---|
prism_status |
Reads the SQLite DB to return position count, total deposited/current value (USD), and the last 3 audit entries |
prism_positions |
Lists all active positions (excludes paper-exited ones) with tokens, range, deposited/current value, and out-of-range cycle count |
prism_whoami |
Shows cloud account info (requires prism register first) |
prism_backtest |
Runs a backtest — synthetic (default, deterministic mock) or replay (reads from prism.db snapshots) |
npm install -g @irfndi/prism-mcpcd mcp-server
npm install
npm run buildThis produces mcp-server/dist/index.js — the stdio MCP server entry point.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"prism": {
"command": "node",
"args": ["/absolute/path/to/prism-liquidity-agent/mcp-server/dist/index.js"],
"env": {
"PRISM_BIN": "/absolute/path/to/prism",
"SQLITE_DB_PATH": "/absolute/path/to/prism.db"
}
}
}
}Notes:
PRISM_BINis the absolute path to theprismwrapper. If you used the one-liner installer, this is~/.local/bin/prism.SQLITE_DB_PATHis the absolute path toprism.db. If omitted, the server tries./prism.dbrelative to its CWD.- If
prismis on yourPATHandprism.dbis in the server's CWD, you can omit bothenventries.
Restart Claude Desktop. The prism server will appear in the MCP tools list with the 4 tools above.
# Should hang waiting for stdio input (Ctrl+C to exit)
node /absolute/path/to/mcp-server/dist/index.jsIf it crashes immediately, check:
PRISM_BINpoints to a workingprismbinary — test with$PRISM_BIN --versionSQLITE_DB_PATHpoints to a readable SQLite file (or omit to use./prism.db)better-sqlite3native binding is built — runnpm rebuild better-sqlite3in the mcp-server directory
No parameters. Returns:
{
"running": true,
"dbPath": "./prism.db",
"positionCount": 2,
"totalDepositedUsd": 1500.00,
"totalCurrentValueUsd": 1620.50,
"lastAudit": [
{
"timestamp": "2026-06-03T15:00:00.000Z",
"action": "ENTER",
"pool": "Pool...",
"reasoning": "Fee/IL ratio 1.8 above threshold",
"paperTrading": true
}
]
}If the SQLite DB doesn't exist (agent hasn't run yet), returns { running: false, message: "..." }.
No parameters. Returns an array of active positions:
[
{
"pool": "Pool...",
"tokens": "SOL/USDC",
"depositedUsd": 1000.00,
"currentValueUsd": 1080.20,
"range": { "lower": 4980, "upper": 5020, "active": 5005 },
"outOfRangeCycleCount": 0,
"lastRebalanceAt": null
}
]No parameters. Shells out to prism whoami. Returns the CLI's stdout on success, or a structured { registered: false, message: "..." } if not registered.
Parameters:
source(enum, defaultsynthetic):syntheticfor deterministic mock data,replayfor on-chain snapshots fromprism.dbdays(int 1-365, default 7): number of days to backtestpools(array of strings, optional, replay only): pool addresses to backtest
Returns the CLI's stdout. Errors include the exit code and stderr.
Resolution order:
PRISM_BINenv var (absolute path)~/.local/bin/prism(default one-liner install location)~/.bun/bin/prism(Bun global install location)prismonPATH
If none of these resolve, the tool calls will fail with a clear error message.
The MCP server runs locally and only exposes read-only operations (SQLite is opened in readonly mode). The prism_whoami and prism_backtest tools spawn the Prism CLI as a subprocess with a 30-120 second timeout.
No data is sent to external services. The server is a stdio-only process that only responds to the local MCP client.
cd mcp-server
npm install # installs deps + builds better-sqlite3 native binding
npm run dev # tsc --watch
npm run build # tsc
npm test # node --import tsx --test test/*.test.tsbetter-sqlite3 is a native module that needs to be compiled for the target Node.js version. The npm install step should automatically download a prebuilt binary, but on very new Node.js versions (e.g., v26) or systems without build tools, the build may fall back to compiling from source, which requires:
- macOS: Xcode Command Line Tools (
xcode-select --install) - Linux: Python 3, make, g++
- Windows: windows-build-tools
If npm test fails with node-gyp errors, run npm rebuild better-sqlite3 to force a rebuild, or use a Node.js version with available prebuilds (v18-v22 are well-supported).
- Resource providers for pool metadata, audit log history, etc.
- Sampling support for tool-driven LLM completions
- HTTP transport (currently stdio only) for remote MCP clients
- Prompts for common Prism workflows (install, diagnose, backtest)
- OAuth for multi-user setups
MIT — same as the main Prism project.