@striderlabs/mcp-fidelity 1.0.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 ADDED
File without changes
package/dist/index.js ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ #!/usr/bin/env node
3
+
4
+ // src/index.ts
5
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
6
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
7
+ import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
8
+ var server = new Server(
9
+ { name: "striderlabs-mcp-fidelity", version: "1.0.0" },
10
+ { capabilities: { tools: {} } }
11
+ );
12
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
13
+ tools: [
14
+ { name: "fidelity_status", description: "Check Fidelity login status", inputSchema: { type: "object", properties: {} } },
15
+ { name: "fidelity_login", description: "Open Fidelity login page. User completes login manually.", inputSchema: { type: "object", properties: {} } },
16
+ { name: "fidelity_confirm_login", description: "Confirm and save Fidelity session", inputSchema: { type: "object", properties: {} } },
17
+ { name: "fidelity_logout", description: "Clear Fidelity session", inputSchema: { type: "object", properties: {} } },
18
+ { name: "fidelity_get_accounts", description: "Get all Fidelity accounts (brokerage, IRA, 401k, HSA)", inputSchema: { type: "object", properties: {} } },
19
+ { name: "fidelity_get_positions", description: "Get positions for an account", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" } } } },
20
+ { name: "fidelity_get_balances", description: "Get account balances and buying power", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" } } } },
21
+ { name: "fidelity_get_transactions", description: "Get transaction history", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" }, start_date: { type: "string" }, end_date: { type: "string" }, limit: { type: "number", default: 50 } } } },
22
+ { name: "fidelity_get_quote", description: "Get stock/ETF/fund quote", inputSchema: { type: "object", required: ["symbol"], properties: { symbol: { type: "string" } } } },
23
+ { name: "fidelity_place_order", description: "Place a buy/sell order. Requires confirm=true.", inputSchema: { type: "object", required: ["account_id", "symbol", "action", "quantity", "order_type", "confirm"], properties: { account_id: { type: "string" }, symbol: { type: "string" }, action: { type: "string", enum: ["buy", "sell"] }, quantity: { type: "number" }, order_type: { type: "string", enum: ["market", "limit", "stop", "stop_limit"] }, limit_price: { type: "number" }, stop_price: { type: "number" }, time_in_force: { type: "string", enum: ["day", "gtc"], default: "day" }, confirm: { type: "boolean" } } } },
24
+ { name: "fidelity_get_orders", description: "Get open and recent orders", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" }, status: { type: "string", enum: ["open", "filled", "cancelled", "all"], default: "all" } } } },
25
+ { name: "fidelity_cancel_order", description: "Cancel an open order. Requires confirm=true.", inputSchema: { type: "object", required: ["order_id", "confirm"], properties: { order_id: { type: "string" }, confirm: { type: "boolean" } } } },
26
+ { name: "fidelity_transfer_funds", description: "Transfer money between Fidelity accounts. Requires confirm=true.", inputSchema: { type: "object", required: ["from_account_id", "to_account_id", "amount", "confirm"], properties: { from_account_id: { type: "string" }, to_account_id: { type: "string" }, amount: { type: "number" }, confirm: { type: "boolean" } } } },
27
+ { name: "fidelity_get_performance", description: "Get account performance and returns", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" }, period: { type: "string", enum: ["1M", "3M", "6M", "YTD", "1Y", "3Y", "5Y"], default: "YTD" } } } }
28
+ ]
29
+ }));
30
+ server.setRequestHandler(CallToolRequestSchema, async (req) => {
31
+ const { name } = req.params;
32
+ return { content: [{ type: "text", text: JSON.stringify({ success: false, error: `${name}: Not implemented. Fidelity API integration pending.` }) }] };
33
+ });
34
+ var transport = new StdioServerTransport();
35
+ await server.connect(transport);
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@striderlabs/mcp-fidelity",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for Fidelity Investments — let AI agents view accounts, positions, and manage investments",
5
+ "main": "dist/index.js",
6
+ "bin": { "striderlabs-mcp-fidelity": "dist/index.js" },
7
+ "type": "module",
8
+ "scripts": {
9
+ "build": "esbuild src/index.ts --bundle --platform=node --format=esm --packages=external --outfile=dist/index.js --banner:js='#!/usr/bin/env node'",
10
+ "start": "node dist/index.js"
11
+ },
12
+ "keywords": ["mcp", "fidelity", "investments", "brokerage", "401k", "ira", "trading", "ai-agent", "strider"],
13
+ "author": "Strider Labs <hello@striderlabs.ai>",
14
+ "license": "MIT",
15
+ "homepage": "https://striderlabs.ai",
16
+ "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0", "patchright": "^1.58.2" },
17
+ "devDependencies": { "@types/node": "^20.11.0", "esbuild": "^0.20.0", "typescript": "^5.3.3" },
18
+ "mcpName": "io.striderlabs/fidelity"
19
+ }
package/src/index.ts ADDED
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
5
+
6
+ const server = new Server(
7
+ { name: "striderlabs-mcp-fidelity", version: "1.0.0" },
8
+ { capabilities: { tools: {} } }
9
+ );
10
+
11
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
12
+ tools: [
13
+ { name: "fidelity_status", description: "Check Fidelity login status", inputSchema: { type: "object", properties: {} } },
14
+ { name: "fidelity_login", description: "Open Fidelity login page. User completes login manually.", inputSchema: { type: "object", properties: {} } },
15
+ { name: "fidelity_confirm_login", description: "Confirm and save Fidelity session", inputSchema: { type: "object", properties: {} } },
16
+ { name: "fidelity_logout", description: "Clear Fidelity session", inputSchema: { type: "object", properties: {} } },
17
+ { name: "fidelity_get_accounts", description: "Get all Fidelity accounts (brokerage, IRA, 401k, HSA)", inputSchema: { type: "object", properties: {} } },
18
+ { name: "fidelity_get_positions", description: "Get positions for an account", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" } } } },
19
+ { name: "fidelity_get_balances", description: "Get account balances and buying power", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" } } } },
20
+ { name: "fidelity_get_transactions", description: "Get transaction history", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" }, start_date: { type: "string" }, end_date: { type: "string" }, limit: { type: "number", default: 50 } } } },
21
+ { name: "fidelity_get_quote", description: "Get stock/ETF/fund quote", inputSchema: { type: "object", required: ["symbol"], properties: { symbol: { type: "string" } } } },
22
+ { name: "fidelity_place_order", description: "Place a buy/sell order. Requires confirm=true.", inputSchema: { type: "object", required: ["account_id", "symbol", "action", "quantity", "order_type", "confirm"], properties: { account_id: { type: "string" }, symbol: { type: "string" }, action: { type: "string", enum: ["buy", "sell"] }, quantity: { type: "number" }, order_type: { type: "string", enum: ["market", "limit", "stop", "stop_limit"] }, limit_price: { type: "number" }, stop_price: { type: "number" }, time_in_force: { type: "string", enum: ["day", "gtc"], default: "day" }, confirm: { type: "boolean" } } } },
23
+ { name: "fidelity_get_orders", description: "Get open and recent orders", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" }, status: { type: "string", enum: ["open", "filled", "cancelled", "all"], default: "all" } } } },
24
+ { name: "fidelity_cancel_order", description: "Cancel an open order. Requires confirm=true.", inputSchema: { type: "object", required: ["order_id", "confirm"], properties: { order_id: { type: "string" }, confirm: { type: "boolean" } } } },
25
+ { name: "fidelity_transfer_funds", description: "Transfer money between Fidelity accounts. Requires confirm=true.", inputSchema: { type: "object", required: ["from_account_id", "to_account_id", "amount", "confirm"], properties: { from_account_id: { type: "string" }, to_account_id: { type: "string" }, amount: { type: "number" }, confirm: { type: "boolean" } } } },
26
+ { name: "fidelity_get_performance", description: "Get account performance and returns", inputSchema: { type: "object", required: ["account_id"], properties: { account_id: { type: "string" }, period: { type: "string", enum: ["1M", "3M", "6M", "YTD", "1Y", "3Y", "5Y"], default: "YTD" } } } },
27
+ ],
28
+ }));
29
+
30
+ server.setRequestHandler(CallToolRequestSchema, async (req) => {
31
+ const { name } = req.params;
32
+ return { content: [{ type: "text", text: JSON.stringify({ success: false, error: `${name}: Not implemented. Fidelity API integration pending.` }) }] };
33
+ });
34
+
35
+ const transport = new StdioServerTransport();
36
+ await server.connect(transport);
package/tsconfig.json ADDED
@@ -0,0 +1 @@
1
+ { "compilerOptions": { "target": "ES2022", "module": "ESNext", "moduleResolution": "bundler", "esModuleInterop": true, "strict": true, "skipLibCheck": true, "outDir": "./dist", "rootDir": "./src" }, "include": ["src/**/*"] }