[Chat] Send the MCP server's Warp-side identity in MCPContext - #15942
Draft
Legoben wants to merge 1 commit into
Draft
[Chat] Send the MCP server's Warp-side identity in MCPContext#15942Legoben wants to merge 1 commit into
Legoben wants to merge 1 commit into
Conversation
Legoben
force-pushed
the
bens/mcp-context-warp-id
branch
from
September 11, 2026 19:04
e23263b to
a83b0db
Compare
Legoben
force-pushed
the
bens/mcp-context-warp-id
branch
from
September 11, 2026 22:01
a83b0db to
7934245
Compare
Legoben
changed the base branch from
master
to
bens/populate-user-query-attribution
September 11, 2026 22:45
The installation id that MCPContext reports to warp-server (and that comes back as `CallMCPTool.server_id`) is, for cloud runs, a UUIDv5 over the task id, the spec token, and the server name. The spec token is the run config's `warp_id` (a managed MCP server uid or a well-known integration id such as "linear"); it was hashed into the id and then discarded, so nothing downstream could name the server. Keep it: `TemplatableMCPServerInstallation::with_warp_id` records it when installations are built from a managed client config, `TemplatableMCPServerInfo` carries it through `spawn_server`, and `MCPServer.warp_id` reaches the request builder. On the wire it becomes `MCPContext.MCPServer.identity`, an `MCPServerIdentity`: `integration` (the `MCPIntegration` enum: linear, slack, jira, linear_agent_session) for a well-known id, `managed_server_uid` for a uuid, and no identity for an empty id or one this build does not know. `display_name` is left to `MCPContext.MCPServer.name`; warp-server fills it in when it copies the identity onto MCP tool calls as `server_identity`. Stacks on the query-attribution change and moves `warp_multi_agent_api` to b430a4f, the attribution protos (warp-proto-apis #381) merged with main at the MCPServerIdentity change (#380).
Legoben
force-pushed
the
bens/mcp-context-warp-id
branch
from
September 11, 2026 22:50
7934245 to
32ee1a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The installation id the client reports in
MCPContext.servers[].id(and that comes back asCallMCPTool.server_id) is, for cloud runs,UUIDv5(task_id, spec_token, server_name). The spec token is the run config'swarp_id— a managed MCP server uid or a well-known integration id such aslinear— and it was hashed into the id and then discarded, so nothing downstream (warp-server, the Factory run transcript) could name the server behind an MCP call.This keeps it and sends it alongside the opaque id:
TemplatableMCPServerInstallationgainswarp_id: Option<String>(#[serde(default)],with_warp_id,warp_id());installations_from_managed_client_config_jsonrecords the spec token.TemplatableMCPServerInfocarries it throughruntime::spawn_server(new parameter; the one native caller passesinstallation.warp_id()).MCPServer.warp_idin the request model.convert_to.rsturns it intoMCPContext.MCPServer.identity, anMCPServerIdentity:integration(the newMCPIntegrationenum —LINEAR,SLACK,JIRA,LINEAR_AGENT_SESSION, mirroring warp-server's well-known id registry) for a well-known id,managed_server_uidfor a uuid, and no identity at all for an empty id or one this build does not know, so a newer server-side integration is unnamed rather than misattributed.display_nameis left unset;MCPContext.MCPServer.namealready carries it and warp-server fills it in when it copies the identity onto tool calls.Local and ad-hoc servers send no identity. Nothing about the installation id itself changes: it stays the key the manager and permissions use, and the identity travels as a separate field.
Stacked on #15947 (
bens/populate-user-query-attribution), which already adapts this repo to the attribution protos.warp_multi_agent_apimoves from that branch'sc8ed32btob430a4f: warp-proto-apis branchbens/populate-user-query-attribution-plus-mcp-identity, which is #381's head merged withmainat the MCPServerIdentity change (#380), so both sets of fields are in one tree. Once #381 merges, that rev collapses to amainsha.Downstream: warp-server #17255 copies the identity onto each MCP tool call as
server_identity, fillingdisplay_namefromname; warp-server #17260 renders it.Linked Issue
No GitHub issue; spec is warp-server
specs/factory-threads-viewer/TECH.md(A4 / C8).ready-to-specorready-to-implement.Testing
Against a local proto checkout carrying the new fields (
[patch]not included in this PR):cargo check -p mcpandcargo check -p warp --lib --testsclean;cargo fmt --checkclean.New tests:
mcp_startup::tests::managed_config_installations_carry_the_spec_token_as_warp_id(well-known slug and managed uid both survive aswarp_id) andconvert_to::tests::mcp_context_servers_carry_their_identity_alongside_the_installation_id(well-known id →integration; uuid →managed_server_uid; display name left toname; empty and unknown ids → no identity).Not manually run end to end: needs a cloud run with a well-known integration to observe
mcp_context.servers[].identity.integration == LINEARin the request.I have manually tested my changes locally with
./script/runAgent Mode
CHANGELOG-NONE