Files
flynn/package.json
T
William Valentin cd839c7f0c feat: add MCP integration for external tool servers
Implement Model Context Protocol (MCP) support so Flynn can spawn MCP
server processes, discover their tools, and make them available to the
agent alongside builtin tools.

- McpClient: wraps @modelcontextprotocol/sdk with StdioClientTransport
  for process lifecycle, tool discovery (listTools), and invocation (callTool)
- McpManager: lifecycle management for multiple MCP servers with
  startAll/stopAll/restart, tool bridging into ToolRegistry
- Bridge: converts MCP tools to Flynn Tool interface with mcp:<server>:<tool>
  namespacing to avoid collisions with builtin tools
- Config: add env and cwd fields to mcp server schema
- ToolRegistry: add unregister() method for MCP server cleanup
- Daemon: wire McpManager into startup and shutdown lifecycle
- Tests: 28 new tests (bridge, manager, registry unregister)
2026-02-05 20:10:37 -08:00

58 lines
1.3 KiB
JSON

{
"name": "flynn",
"version": "0.1.0",
"description": "Self-hosted personal AI agent",
"type": "module",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"dev": "tsx watch src/index.ts",
"start": "node dist/index.js",
"tui": "tsx src/tui.ts",
"tui:fs": "tsx src/tui.ts --fullscreen",
"tui:dev": "tsx watch src/tui.ts",
"test": "vitest",
"test:run": "vitest run",
"lint": "eslint src/",
"typecheck": "tsc --noEmit"
},
"keywords": [
"ai",
"agent",
"telegram",
"personal-assistant"
],
"license": "MIT",
"devDependencies": {
"@types/better-sqlite3": "^7.6.0",
"@types/marked-terminal": "^6.1.1",
"@types/node": "^22.0.0",
"@types/react": "^19.0.0",
"@types/ws": "^8.18.1",
"eslint": "^9.0.0",
"tsx": "^4.0.0",
"typescript": "^5.7.0",
"vitest": "^3.0.0"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.39.0",
"@modelcontextprotocol/sdk": "^1.26.0",
"better-sqlite3": "^11.0.0",
"cli-highlight": "^2.1.11",
"grammy": "^1.35.0",
"ink": "^6.0.0",
"ink-text-input": "^6.0.0",
"marked": "^17.0.1",
"marked-terminal": "^7.3.0",
"ollama": "^0.5.0",
"openai": "^4.0.0",
"react": "^19.0.0",
"ws": "^8.19.0",
"yaml": "^2.7.0",
"zod": "^3.24.0"
},
"engines": {
"node": ">=22.0.0"
}
}