What and why?
obsxa has integrations for AI SDK (src/ai.ts) and OpenCode (src/opencode.ts), but no MCP server. Adding obsxa mcp as a CLI subcommand would let any MCP-compatible client (Claude Desktop, Cursor, custom tooling) connect to an obsxa database and manage observations through the standard protocol.
This is the most natural integration path for tools that speak MCP natively. Instead of requiring each client to bundle obsxa as a library, they just point at the running server.
Possible approach
- New
src/commands/mcp.ts command handler registered in src/cli.ts subCommands
- Starts a stdio MCP server using
@modelcontextprotocol/sdk (already an optional peer dep)
- Accepts
--db and --project flags, same pattern as other commands
- Registers tools mirroring the existing store surface: observation CRUD, relations, clusters, search, analysis, promote, dedup
- Keep
@modelcontextprotocol/sdk as optional peer dep so the core package stays light
- Optionally expose
registerTools(server, obsxa, projectId) from a src/mcp.ts module for programmatic use
What and why?
obsxa has integrations for AI SDK (
src/ai.ts) and OpenCode (src/opencode.ts), but no MCP server. Addingobsxa mcpas a CLI subcommand would let any MCP-compatible client (Claude Desktop, Cursor, custom tooling) connect to an obsxa database and manage observations through the standard protocol.This is the most natural integration path for tools that speak MCP natively. Instead of requiring each client to bundle obsxa as a library, they just point at the running server.
Possible approach
src/commands/mcp.tscommand handler registered insrc/cli.tssubCommands@modelcontextprotocol/sdk(already an optional peer dep)--dband--projectflags, same pattern as other commands@modelcontextprotocol/sdkas optional peer dep so the core package stays lightregisterTools(server, obsxa, projectId)from asrc/mcp.tsmodule for programmatic use