@robosystems/mcp 0.4.1 → 0.5.0
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 +20 -33
- package/index.js +33 -1332
- package/package.json +2 -6
- package/proxy.js +21 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robosystems/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP
|
|
3
|
+
"version": "0.5.0",
|
|
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": {
|
|
@@ -39,10 +39,6 @@
|
|
|
39
39
|
],
|
|
40
40
|
"author": "RFS LLC",
|
|
41
41
|
"license": "MIT",
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"@modelcontextprotocol/sdk": "^1.17.1",
|
|
44
|
-
"eventsource": "^4.0.0"
|
|
45
|
-
},
|
|
46
42
|
"devDependencies": {
|
|
47
43
|
"@eslint/js": "^9.39.2",
|
|
48
44
|
"eslint": "^9.39.2",
|
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 ' +
|