mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 00:01:10 +02:00
Mount an MCP (Model Context Protocol) server at /api/v1/mcp in the
unified Hono API. External clients like Claude Desktop, Cursor, and
VS Code Copilot can discover and call all 29 Mana tools via the
standard MCP protocol.
Architecture:
- WebStandardStreamableHTTPServerTransport for Bun/Hono compatibility
- AI_TOOL_CATALOG → MCP tool definitions with JSON Schema (via Zod)
- Stateful sessions with Mcp-Session-Id header
- Auth via existing authMiddleware (JWT or API key)
Phase 1 scope: tools/list returns all 29 tools with schemas,
tools/call acknowledges with descriptive messages. Phase 2 will add
actual DB reads/writes via sync_changes.
Usage:
Claude Desktop config:
{"mcpServers": {"mana": {"url": "http://localhost:3060/api/v1/mcp"}}}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
991 B
JSON
36 lines
991 B
JSON
{
|
|
"name": "@mana/api",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "bun --hot run src/index.ts",
|
|
"build": "bun build src/index.ts --outdir dist --target bun",
|
|
"start": "bun run dist/index.js",
|
|
"type-check": "tsc --noEmit",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:push": "drizzle-kit push",
|
|
"db:push:presi": "drizzle-kit push --config=drizzle.presi.config.ts"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/openai-compatible": "^2.0.41",
|
|
"@mana/media-client": "workspace:*",
|
|
"@mana/shared-ai": "workspace:*",
|
|
"@mana/shared-hono": "workspace:*",
|
|
"@mana/shared-rss": "workspace:*",
|
|
"@mana/shared-storage": "workspace:*",
|
|
"@mana/shared-types": "workspace:^",
|
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
"ai": "^6.0.154",
|
|
"drizzle-orm": "^0.38.0",
|
|
"hono": "^4.7.0",
|
|
"postgres": "^3.4.0",
|
|
"rrule": "^2.8.1",
|
|
"zod": "^3.23.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "latest",
|
|
"drizzle-kit": "^0.30.0",
|
|
"typescript": "^5.8.0"
|
|
}
|
|
}
|