Feed MCP
Verified against: F-160 (2026-11-09), F-161 (2026-11-09), F-162 (2026-11-09) · spec docs/PRD.md §10.3, §10.4 · D-009 (2026-11-10) · docs/EVIDENCE.md §G9 run 3 Feed MCP step (2026-11-11T15:30Z–15:38Z, tested 3107a1a, recorded in 837cd12) · source services/feed/src/mcp.ts, main.ts, repo-config.ts · tests pnpm --filter feed test (in-memory MCP transport)
Status on 2026-11-11: built, runs locally, no public host. In every fresh-clone G9 run (docs/EVIDENCE.md §G9; latest: run 3, recorded in 837cd12) a scripted JSON-RPC client used it over stdio and HTTP with no env: initialize answered, 8 tools listed, and get_exit_capacity with the argument symbol set to NVDAx returned the same Q_c and R_c as pnpm demo:testnet. No LLM agent client has been tested.
A read-only MCP server over stdio and Streamable HTTP, built on @modelcontextprotocol/sdk 1.32.2 (F-160). It holds no keys and needs no env: the nectar-core id defaults to accounts.core in packages/config/config.yaml (now nectar-core-v2.nectar.testnet), and the tools read its views over public RPC. CORE_ACCOUNT_ID overrides the id. Only when no id is configured at all do the tools fall back to the local Feed store, and then preview_borrow returns an error.
| Tool | Input | Output |
|---|---|---|
get_exit_capacity | symbol | the view result with USD formatting and as_of |
preview_borrow | symbol, units, borrow_usd_e6 | limit_usd, premium_usd, ok, reason |
list_quotes | symbol, optional limit | live quotes, ids and sizes only. The output leaves out the buyer, but buyers are public on chain (list_quotes / get_quote views, Quote Note owners), so this is not a privacy property |
explain_limit | symbol, optional units | the Cramér formula (PRD §4.2, D-009) with live numbers substituted |
Example call: get_exit_capacity with {"symbol":"NVDAx"}. There is no asset argument; the fresh-clone run that tried it got an input validation error (docs/EVIDENCE.md §G9 run 3). Arguments come from services/feed/src/mcp.ts.
The server also lists the four agent skill tools (8 in total): open_protected_stock_loan, quote_capacity, get_note and build_self_settle. The last two still return not_available. See Agent skill and x402 export.
What agents do with it
- A lending agent calls
preview_borrowbefore sizing a loan. - A risk agent polls
get_exit_capacityand alerts when the exit gap widens. - A buyer's agent reads
list_quotesto price its own commitment.
Run it
pnpm -s --filter feed mcp # stdio (-s keeps stdout pure JSON-RPC)
pnpm --filter feed start # REST on :8788 and MCP over HTTP at http://127.0.0.1:8789/mcp
All variables are optional: FEED_PORT (REST, default 8788), FEED_MCP_PORT (MCP over HTTP, default 8789; off disables it), FEED_HOST (default 127.0.0.1), FEED_DB_PATH (default ~/.nectar/feed.sqlite). If a port is already taken, feed start exits with EADDRINUSE. A raw HTTP client must send accept: application/json, text/event-stream (EVIDENCE §G9). The full list is in services/feed/README.md.
Register in Claude Code (F-161)
Run from the repo root after pnpm i. No env is needed. -- separates Claude options from the server command.
claude mcp add --transport stdio nectar-feed -- node --disable-warning=ExperimentalWarning "$PWD/services/feed/src/mcp-stdio.ts"
Over HTTP, while pnpm --filter feed start is running:
claude mcp add --transport http nectar-feed http://127.0.0.1:8789/mcp
Register in Claude Desktop (F-162)
Add this to claude_desktop_config.json (macOS ~/Library/Application Support/Claude/, Windows %AppData%\Claude\, Linux ~/.config/Claude/) and restart. Paths must be absolute. Only stdio is documented for this file.
{
"mcpServers": {
"nectar-feed": {
"command": "node",
"args": ["--disable-warning=ExperimentalWarning", "/ABSOLUTE/PATH/TO/nectar-labs/services/feed/src/mcp-stdio.ts"]
}
}
}
No env key is needed: the server reads the nectar-core id from packages/config/config.yaml. You need Node ≥ 22.22.2, because the entry is TypeScript run by Node's type stripping.