You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Standalone local MCP server so Claude Desktop / Cursor / any MCP client can use a local library #540
In local mode the agent tools are only reachable in-process, through the framework adapters
(as_openai_tools(), as_claude_mcp(), as_anthropic_tools()). Any MCP-speaking client outside
that Python process — Claude Desktop, Cursor, Cline, etc. — has no endpoint to connect to.
Cloud users can already attach such clients to the hosted MCP server (https://api.pageindex.ai/mcp);
local users cannot use their own library there at all. This is the open half of #137.
The README Today marks "MCP server" as Cloud-only (— in the Local column), which is accurate.
What already exists
pageindex/agent_tools.py carries the cloud-identical tool contract plus full local
implementations: _tool_specs() returns (name, description, schema, invoke) and tool_names() gives browse_documents, get_document, get_document_structure, get_page_content (+ remove_document behind include_management).
integrations/openai_agents.py and integrations/claude_agent_sdk.py already wrap those exact
specs in an in-process MCP server (CallToolResult.model_validate({"content": blocks, "isError": is_error})), so the result conversion is proven — only a standalone process is missing.
mcp>=1.19.0,<3 is already a required dependency, so no new dependency would be added.
Proposal (v1)
New pageindex/mcp_server.py: a server built over _tool_specs(...) for a PageIndexLocalClient, with handlers doing await asyncio.to_thread(invoke, arguments) and
returning CallToolResult (server-side isError carried through).
stdio transport only.
A pageindex-mcp console entry point ([tool.poetry.scripts]), e.g. pageindex-mcp --storage-path <dir> [--management], config otherwise via the same env vars
the SDK uses.
Tests: an in-process MCP session test (tools/list + one tool call round-trip) and a stdio
smoke test.
README: flip the Local column's "MCP server" cell and add a short client-config snippet.
Activity
abhayKashyap03 commentedon Oct 2, 2026
claiming this issue if no one else is working on it