Title: NewSessionRequest silently drops McpServerHttp items (no error) · Issue #203 · agentclientprotocol/python-sdk · GitHub
Open Graph Title: NewSessionRequest silently drops McpServerHttp items (no error) · Issue #203 · agentclientprotocol/python-sdk
X Title: NewSessionRequest silently drops McpServerHttp items (no error) · Issue #203 · agentclientprotocol/python-sdk
Description: SDK: agent-client-protocol 1.0.0 (same on main today), Python 3.12, Windows 11. What happens acp.schema has both McpServerHttp (no type field) and HttpMcpServer(McpServerHttp) with type: Literal["http"]. NewSessionRequest.mcp_servers onl...
Open Graph Description: SDK: agent-client-protocol 1.0.0 (same on main today), Python 3.12, Windows 11. What happens acp.schema has both McpServerHttp (no type field) and HttpMcpServer(McpServerHttp) with type: Literal["h...
X Description: SDK: agent-client-protocol 1.0.0 (same on main today), Python 3.12, Windows 11. What happens acp.schema has both McpServerHttp (no type field) and HttpMcpServer(McpServerHttp) with type: Literal[&q...
Opengraph URL: https://github.com/agentclientprotocol/python-sdk/issues/203
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NewSessionRequest silently drops McpServerHttp items (no error)","articleBody":"**SDK:** `agent-client-protocol` 1.0.0 (same on `main` today), Python 3.12, Windows 11.\n\n### What happens\n`acp.schema` has both `McpServerHttp` (no `type` field) and `HttpMcpServer(McpServerHttp)` with `type: Literal[\"http\"]`. `NewSessionRequest.mcp_servers` only accepts the tagged variants, and `skip_invalid_items` (added in #117 for lenient deserialization) silently drops a `McpServerHttp` instance. The agent then starts with no MCP servers, and nothing tells the caller why.\n\nWe hit this driving codex-acp through `conn.new_session(..., mcp_servers=[McpServerHttp(...)])`: Codex ran without its MCP server, and the only clue was a missing tool.\n\n### Repro\n```python\nfrom acp.schema import McpServerHttp, HttpMcpServer, HttpHeader, NewSessionRequest\n\nh = [HttpHeader(name=\"Authorization\", value=\"Bearer x\")]\nprint(NewSessionRequest(cwd=\"/w\", mcp_servers=[McpServerHttp(name=\"m\", url=\"http://127.0.0.1:1/mcp\", headers=h)])\n .model_dump_json(by_alias=True))\n# {\"cwd\":\"/w\",\"mcpServers\":[]} \u003c- server gone, no error\nprint(NewSessionRequest(cwd=\"/w\", mcp_servers=[HttpMcpServer(name=\"m\", url=\"http://127.0.0.1:1/mcp\", headers=h)])\n .model_dump_json(by_alias=True))\n# {\"cwd\":\"/w\",\"mcpServers\":[{\"name\":\"m\",...,\"type\":\"http\"}]}\n```\n\n### Expected\nLenient skipping makes sense for wire data from a newer peer. For a model instance built in local code, a `ValidationError` (or at least a warning) would surface the mistake.\n\n### Possible fix\nIn `_deserialize.skip_invalid_items`, re-raise when the failing item is already a `BaseModel` instance; raw dicts from the wire keep today's lenient behaviour. Happy to send a PR with tests.\n","author":{"url":"https://github.com/sammyawad","@type":"Person","name":"sammyawad"},"datePublished":"2026-11-20T20:17:24Z","url":"https://github.com/agentclientprotocol/python-sdk/issues/203"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f2733857-07bf-c8f7-378a-45ccf1f18c3b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93F6:436BB:6BF8:8E60:6B0460E8 |
| html-safe-nonce | 38c500d75d7ddb4ca781973a69133cd5d20f3b3c37a7a4ac943d1d1ac81edd63 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0Y2OjQzNkJCOjZCRjg6OEU2MDo2QjA0NjBFOCIsInZpc2l0b3JfaWQiOiIzMjE4MDM1NjkxNzc5MDIzMDgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5e5bd323f1105b4da26984bd6a02d12ec105ae2fbfce5c4a29bcf1f3a31d3eab |
| hovercard-subject-tag | issue:6518943986 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/agentclientprotocol/python-sdk/203/issue_layout |
| twitter:image | https://opengraph.githubassets.com/20966d7f1f04ef379e5665bb4fa9afe0ad6a0bd69b00accea57e4811ae643339/agentclientprotocol/python-sdk/issues/203 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/20966d7f1f04ef379e5665bb4fa9afe0ad6a0bd69b00accea57e4811ae643339/agentclientprotocol/python-sdk/issues/203 |
| og:image:alt | SDK: agent-client-protocol 1.0.0 (same on main today), Python 3.12, Windows 11. What happens acp.schema has both McpServerHttp (no type field) and HttpMcpServer(McpServerHttp) with type: Literal["h... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sammyawad |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/agentclientprotocol/python-sdk git https://github.com/agentclientprotocol/python-sdk.git |
| octolytics-dimension-user_id | 235308037 |
| octolytics-dimension-user_login | agentclientprotocol |
| octolytics-dimension-repository_id | 1051445009 |
| octolytics-dimension-repository_nwo | agentclientprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1051445009 |
| octolytics-dimension-repository_network_root_nwo | agentclientprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width