@robosystems/mcp 0.4.1 → 0.4.2

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 +10 -4
  2. package/package.json +2 -2
  3. package/proxy.js +21 -1
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://badge.fury.io/js/@robosystems%2Fmcp.svg)](https://www.npmjs.com/package/@robosystems/mcp)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
- Official MCP (Model Context Protocol) stdio bridge for connecting stdio-only AI clients to the RoboSystems Financial Knowledge Graph API. Query financial statements, explore graph structures, resolve XBRL elements, and build fact grids.
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
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).
9
9
 
@@ -53,7 +53,9 @@ To target a specific endpoint (for example a local stack), point `ROBOSYSTEMS_MC
53
53
 
54
54
  ### Legacy Bridge Mode
55
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-switching 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` tool names — current servers expose the same capabilities as `create-subgraph`/`switch-workspace` tools natively.
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.
57
59
 
58
60
  ## Migrating to the Remote Endpoint
59
61
 
@@ -82,7 +84,7 @@ Local development uses the same shape against a local stack: `http://localhost:8
82
84
 
83
85
  ## Tools
84
86
 
85
- Tools are loaded dynamically from the RoboSystems API based on your graph. In legacy bridge mode the client additionally provides its own workspace management tools (in proxy mode the server serves the equivalent subgraph tools natively).
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.
86
88
 
87
89
  ### Financial Data
88
90
 
@@ -106,7 +108,9 @@ Tools are loaded dynamically from the RoboSystems API based on your graph. In le
106
108
  | `get-properties` | Discover available properties on node types |
107
109
  | `get-example-queries` | Query templates and examples for common patterns |
108
110
 
109
- ### Workspaces
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.
110
114
 
111
115
  | Tool | Description |
112
116
  | ------------------ | --------------------------------------------------- |
@@ -117,6 +121,8 @@ Tools are loaded dynamically from the RoboSystems API based on your graph. In le
117
121
 
118
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.
119
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
+
120
126
  ## Resources
121
127
 
122
128
  - [RoboSystems Platform](https://robosystems.ai)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@robosystems/mcp",
3
- "version": "0.4.1",
4
- "description": "MCP client adapter for connecting AI agents to RoboSystems Financial Knowledge Graph API endpoints with workspace support",
3
+ "version": "0.4.2",
4
+ "description": "MCP stdio bridge connecting stdio-only AI clients to the RoboSystems financial intelligence platform; proxies to the hosted remote MCP endpoint by default",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "bin": {
package/proxy.js CHANGED
@@ -182,6 +182,26 @@ export function createProxy({ url, apiKey, version, output = process.stdout, fet
182
182
  }
183
183
  }
184
184
 
185
+ /**
186
+ * Strip credentials from a URL before logging it: query string (`?token=…`
187
+ * connector credentials), fragment, and userinfo. MCP hosts capture stderr
188
+ * into diagnostic logs that get shared in bug reports — the secret must
189
+ * never travel with them.
190
+ */
191
+ export function redactUrl(url) {
192
+ try {
193
+ const parsed = new URL(url)
194
+ parsed.username = ''
195
+ parsed.password = ''
196
+ parsed.hash = ''
197
+ const hadQuery = parsed.search !== ''
198
+ parsed.search = ''
199
+ return parsed.toString() + (hadQuery ? '?<redacted>' : '')
200
+ } catch {
201
+ return '<invalid url>'
202
+ }
203
+ }
204
+
185
205
  /**
186
206
  * Run the proxy over real stdio until the host closes stdin.
187
207
  */
@@ -196,7 +216,7 @@ export async function runProxy({
196
216
  const proxy = createProxy({ url, apiKey, version, output, fetchImpl })
197
217
 
198
218
  console.error(`RoboSystems MCP proxy v${version}`)
199
- console.error(`Forwarding stdio <-> ${url}`)
219
+ console.error(`Forwarding stdio <-> ${redactUrl(url)}`)
200
220
  if (!apiKey) {
201
221
  console.error(
202
222
  'No ROBOSYSTEMS_API_KEY set — forwarding without an X-API-Key header ' +