@robosystems/mcp 0.4.0 → 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.
- package/README.md +11 -5
- package/package.json +2 -2
- package/proxy.js +21 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@robosystems/mcp)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
|
-
Official MCP (Model Context Protocol) stdio bridge for connecting stdio-only AI clients to the RoboSystems
|
|
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
|
|
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
|
|
|
@@ -78,11 +80,11 @@ claude mcp add --transport http robosystems-sec \
|
|
|
78
80
|
|
|
79
81
|
Local development uses the same shape against a local stack: `http://localhost:8000/v1/graphs/{graph_id}/mcp`.
|
|
80
82
|
|
|
81
|
-
**Claude (claude.ai / Desktop)
|
|
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.
|
|
82
84
|
|
|
83
85
|
## Tools
|
|
84
86
|
|
|
85
|
-
Tools are loaded dynamically from the RoboSystems API based on your graph
|
|
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.
|
|
4
|
-
"description": "MCP
|
|
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 ' +
|