feat: server-side MCP connector as a built-in tool
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 176
- Forks
- 28
- Avg merge
- 18h 42m
- Merged PRs (30d)
- 16
Description
chatlas already speaks MCP client-side (register_mcp_tools_http_stream_async() and friends): chatlas runs the MCP client, executes tool calls locally, and round-trips results. All three first-class providers now also offer a server-side MCP connector: you hand the provider a remote MCP server URL and the provider's infrastructure does tool discovery and invocation itself — no local MCP client, no async session to keep alive, works from restricted environments.
That makes it a natural next ToolBuiltIn after code execution:
chat.register_tool(tool_mcp(url="https://mcp.example.com", name="example"))
Provider mapping
| Provider | Tool spec | Status |
|---|---|---|
| OpenAI (Responses) | {"type": "mcp", "server_label": ..., "server_url": ..., "authorization": ..., "require_approval": ..., "allowed_tools": [...]} |
GA. Also supports OpenAI-maintained connectors (connector_id, e.g. Google Drive, Gmail). Docs |
| Anthropic | mcp_servers request param + mcp_toolset tool type |
Beta (mcp-client-2025-11-20 header). Streamable HTTP/SSE, OAuth via authorization_token. Tools only (no prompts/resources). Docs |
types.Tool(mcp_servers=[types.McpServer(name=..., streamable_http_transport=...)]) |
Experimental; Gemini API only (not Vertex). Docs |
Design questions
- Naming and docs positioning relative to the existing client-side
register_mcp_tools_*functions — users will need a clear mental model of "chatlas executes the MCP tools" vs. "the provider executes the MCP tools" (and the privacy/latency trade-offs of each). - Approval flow: OpenAI's
require_approvalemitsmcp_approval_requestitems that the client must answer. Can this map onto chatlas's existing tool-approval machinery (on_tool_request/ToolRejectError), or does it need its own surface? - Auth: how to pass tokens without persisting them in serialized turns.
- Content modeling: what
mcp_list_tools/mcp_callevents look like as chatlasContent(probably new request/response content types inPROVIDER_ANNOTATION_TYPES, like search/fetch). - Anthropic's connector is not ZDR-eligible; worth a docs note.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing register_mcp_tools_* client-side entry points and the ToolBuiltIn implementation pattern, then inspect on_tool_request, ToolRejectError, and PROVIDER_ANNOTATION_TYPES. Compare the OpenAI, Anthropic, and Google connector contracts and determine how approval, authentication, and MCP events should fit chatlas. Done requires an agreed design, provider coverage, content modeling, tests, and documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100