@robosystems/mcp 0.4.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +20 -39
  2. package/index.js +33 -1332
  3. package/package.json +1 -5
package/README.md CHANGED
@@ -5,15 +5,12 @@
5
5
 
6
6
  Official MCP (Model Context Protocol) stdio bridge for connecting stdio-only AI clients to the RoboSystems financial intelligence platform. Query financial statements, explore graph structures, resolve XBRL elements, and build fact grids.
7
7
 
8
- > **The preferred way to connect is the hosted remote MCP endpoint — no install required.** Every RoboSystems graph serves the MCP Streamable HTTP transport directly: add `https://api.robosystems.ai/v1/graphs/{graph_id}/mcp` as a connector with your API key in the `X-API-Key` header, and Claude Code, Cursor, VS Code, or any HTTP-capable MCP client connects with zero setup. **This npx package is in maintenance mode** and exists for clients that only speak the stdio transport: by default it runs in [proxy mode](#proxy-mode-the-default), forwarding that same modern transport over stdio. See [Migrating to the remote endpoint](#migrating-to-the-remote-endpoint).
8
+ > **The preferred way to connect is the hosted remote MCP endpoint — no install required.** Every RoboSystems graph serves the MCP Streamable HTTP transport directly. OAuth-capable clients (claude.ai, Claude Code, ChatGPT, VS Code, Cursor) add `https://api.robosystems.ai/v1/mcp`, sign in, and pick the graph on the consent screen; any HTTP-capable client can instead add a per-graph URL `https://api.robosystems.ai/v1/graphs/{graph_id}/mcp` with an API key in the `X-API-Key` header. **This npx package is in maintenance mode** and exists only for clients that speak nothing but the stdio transport: it is a transparent proxy that forwards that same transport over stdio. See [Migrating to the remote endpoint](#migrating-to-the-remote-endpoint).
9
9
 
10
10
  ## Features
11
11
 
12
- - **Native MCP transport over stdio** — the default proxy mode forwards the graph's Streamable HTTP endpoint verbatim: per-session instructions, live tool lists, and streamed progress notifications, identical to connecting the URL directly
13
- - **Financial data tools** for statements, disclosures, and multidimensional fact grids
14
- - **Graph exploration** with Cypher queries, schema introspection, and element resolution
15
- - **Workspace management** for isolated subgraphs, staging data, and persistent agent memory
16
- - **Legacy bridge mode** for pre-v1.7.0 servers, with client-side SSE/NDJSON aggregation, smart caching, and retry logic
12
+ - **Native MCP transport over stdio** — a transparent proxy that forwards the graph's Streamable HTTP endpoint verbatim: per-session instructions, live tool lists, and streamed progress notifications, identical to connecting the URL directly
13
+ - **Every server tool, as the server advertises it** — financial statements, disclosures and fact grids; Cypher, schema introspection and element resolution; subgraphs and agent memory on graphs that have them
17
14
 
18
15
  ## Installation
19
16
 
@@ -37,31 +34,30 @@ Add to your MCP servers configuration:
37
34
 
38
35
  ### Environment Variables
39
36
 
40
- | Variable | Description | Default |
41
- | ---------------------- | ------------------------------------------------------------------ | ---------------------------- |
42
- | `ROBOSYSTEMS_API_KEY` | Your API key | _(required)_ |
43
- | `ROBOSYSTEMS_GRAPH_ID` | Primary graph ID (parent for workspaces) | _(required)_ |
44
- | `ROBOSYSTEMS_API_URL` | API endpoint | `https://api.robosystems.ai` |
45
- | `ROBOSYSTEMS_MCP_MODE` | Set to `legacy` to run the old REST-aggregation bridge (see below) | `proxy` |
46
- | `ROBOSYSTEMS_MCP_URL` | Full MCP endpoint URL — overrides the URL derived from graph ID | _(derived from graph ID)_ |
37
+ | Variable | Description | Default |
38
+ | ---------------------- | --------------------------------------------------------------- | ------------------------------------------------ |
39
+ | `ROBOSYSTEMS_API_KEY` | Your API key, sent as `X-API-Key` | _(required)_ |
40
+ | `ROBOSYSTEMS_GRAPH_ID` | The graph to connect (derives the per-graph endpoint URL) | _(required unless `ROBOSYSTEMS_MCP_URL` is set)_ |
41
+ | `ROBOSYSTEMS_API_URL` | API endpoint | `https://api.robosystems.ai` |
42
+ | `ROBOSYSTEMS_MCP_URL` | Full MCP endpoint URL — overrides the URL derived from graph ID | _(derived from graph ID)_ |
47
43
 
48
- ### Proxy Mode (the default)
44
+ ### How it works
49
45
 
50
46
  By default this package is a transparent pipe between your stdio client and the graph's native MCP endpoint (`POST /v1/graphs/{graph_id}/mcp`, Streamable HTTP). Every JSON-RPC message is forwarded verbatim, so per-session instructions, the live server tool list, and streamed progress notifications behave exactly as they do when connecting the URL directly — the only thing the proxy adds is the API-key header the stdio client can't send itself. The standard configuration above is all it needs.
51
47
 
52
48
  To target a specific endpoint (for example a local stack), point `ROBOSYSTEMS_MCP_URL` at the full URL, e.g. `http://localhost:8000/v1/graphs/kg.../mcp` — no graph ID needed.
53
49
 
54
- ### Legacy Bridge Mode
55
-
56
- Set `ROBOSYSTEMS_MCP_MODE: "legacy"` to run the original bridge, which aggregates the REST tool endpoints (`GET /mcp/tools` + `POST /mcp/call-tool`) client-side and adds its own workspace tools. You only need this against an API deployment that predates the MCP transport (server versions before v1.7.0), or if you depend on the bridge's client-side `create-workspace` / `switch-workspace` / `list-workspaces` / `delete-workspace` tool names.
57
-
58
- Current servers cover the same ground natively as `create-subgraph`, `list-subgraphs`, `delete-subgraph` and `resolve-subgraph` — note the last one **resolves** rather than switches. A remote connector is anchored to one graph by its URL, so reaching a subgraph means adding its endpoint as its own connector (reusing the same API key), not retargeting the session. The bridge's client-side `switch-workspace` can retarget because it owns a local process; the server has none to retarget.
59
-
60
50
  ## Migrating to the Remote Endpoint
61
51
 
62
52
  If your client supports HTTP transports, replace the npx entry with a direct connection — the URL picks the graph (`sec` for the public SEC repository, your `kg…` graph id for your own; a subgraph id like `kg…_dev` is just another URL), and your account-wide API key goes in the `X-API-Key` header, one connector per graph.
63
53
 
64
- **Claude Code** — one command:
54
+ **OAuth — sign in and pick a graph** (claude.ai, Claude Code, ChatGPT, VS Code, Cursor): add the graph-agnostic endpoint and no key at all; the consent screen is where you choose the graph.
55
+
56
+ ```bash
57
+ claude mcp add --transport http robosystems https://api.robosystems.ai/v1/mcp
58
+ ```
59
+
60
+ **Claude Code with an API key** — one command:
65
61
 
66
62
  ```bash
67
63
  claude mcp add --transport http robosystems-sec \
@@ -80,11 +76,11 @@ claude mcp add --transport http robosystems-sec \
80
76
 
81
77
  Local development uses the same shape against a local stack: `http://localhost:8000/v1/graphs/{graph_id}/mcp`.
82
78
 
83
- **Claude (claude.ai / Desktop)** connects with a **connector URL** instead of a header: generate one from the MCP page in the RoboSystems app (`/connect`) and paste it into Settings → Connectors → Add custom connector. The URL carries its own graph-scoped, revocable API key, since Claude's custom connectors cannot send custom headers. Claude Desktop can alternatively run this package via `claude_desktop_config.json` (the config file accepts only stdio-shaped `command` entries); in its default [proxy mode](#proxy-mode-the-default) it delivers the same remote-endpoint behavior over stdio.
79
+ **Claude (claude.ai / Desktop)** — Settings → Connectors → Add custom connector with `https://api.robosystems.ai/v1/mcp` (or a per-graph URL): Claude detects OAuth and you pick the graph at sign-in; no key involved. Credentials never travel in the URL — the older `?token=` connector URL was the bridge to OAuth and has been retired. Claude Desktop can alternatively run this package via `claude_desktop_config.json` (the config file accepts only stdio-shaped `command` entries); in its default [proxy mode](#proxy-mode-the-default) it delivers the same remote-endpoint behavior over stdio with the key in a header.
84
80
 
85
81
  ## Tools
86
82
 
87
- Tools are loaded dynamically from the RoboSystems API based on your graph, so the authoritative list is whatever your server advertises. The tables below are the **legacy bridge mode** surface; in proxy mode (the default) the server serves its own subgraph tools instead.
83
+ Tools are loaded dynamically from the RoboSystems API based on your graph, so the authoritative list is whatever your server advertises — the proxy adds nothing of its own. The tables below are representative.
88
84
 
89
85
  ### Financial Data
90
86
 
@@ -108,26 +104,11 @@ Tools are loaded dynamically from the RoboSystems API based on your graph, so th
108
104
  | `get-properties` | Discover available properties on node types |
109
105
  | `get-example-queries` | Query templates and examples for common patterns |
110
106
 
111
- ### Workspaces (legacy bridge mode only)
112
-
113
- These are the bridge's own client-side tools, kept for pre-v1.7.0 servers. They have never existed on the server.
114
-
115
- | Tool | Description |
116
- | ------------------ | --------------------------------------------------- |
117
- | `create-workspace` | Create an isolated subgraph (static or memory type) |
118
- | `switch-workspace` | Switch active workspace context |
119
- | `list-workspaces` | List all workspaces with active indicator |
120
- | `delete-workspace` | Remove a workspace and its data |
121
-
122
- Workspaces let you create isolated subgraphs for experimentation, staging data, or persistent agent memory. Use `subgraph_type: "memory"` when creating a workspace to get a dedicated memory graph.
123
-
124
- On a current server (proxy mode) the equivalents are `create-subgraph`, `list-subgraphs`, `delete-subgraph` and `resolve-subgraph`. "Workspace" is deliberately not the server's vocabulary: a subgraph is a lightweight artifact addressed by its own connector URL, not a context the session moves into.
125
-
126
107
  ## Resources
127
108
 
128
109
  - [RoboSystems Platform](https://robosystems.ai)
129
110
  - [GitHub Repository](https://github.com/RoboFinSystems/robosystems)
130
- - [MCP API Documentation](https://api.robosystems.ai/docs#tag/MCP)
111
+ - [API Documentation](https://api.robosystems.ai/docs)
131
112
  - [OpenAPI Specification](https://api.robosystems.ai/openapi.json)
132
113
 
133
114
  ## Support