Skip to content

fix(mcp): scope request logs to server by durable id, not recycled name key - #239

Merged
anilguleroglu merged 1 commit into
mainfrom
claude/mcp-server-request-logs-zojnir
Aug 22, 2026
Merged

fix(mcp): scope request logs to server by durable id, not recycled name key#239
anilguleroglu merged 1 commit into
mainfrom
claude/mcp-server-request-logs-zojnir

Conversation

@anilguleroglu

Copy link
Copy Markdown
Collaborator

MCP request logs were joined to their server via serverKey, a slug derived
from the server's name. Deleting a server never cleaned up its logs, and
re-creating a server under the same name regenerated the identical key —
so the new server's Logs tab silently showed the deleted server's history
interleaved with its own.

Add serverId to mcp_request_logs as the durable match (stamped on every
write from now on); query by serverId primarily, falling back to
serverKey scoped by projectId and capped at the server's own createdAt for
rows written before this migration, so a recycled key can never pull in a
predecessor's history. Also drop the cluster instance-assignment cache
entry on delete, which had the same recycled-key problem for node pinning.

…me key

MCP request logs were joined to their server via serverKey, a slug derived
from the server's name. Deleting a server never cleaned up its logs, and
re-creating a server under the same name regenerated the identical key —
so the new server's Logs tab silently showed the deleted server's history
interleaved with its own.

Add serverId to mcp_request_logs as the durable match (stamped on every
write from now on); query by serverId primarily, falling back to
serverKey scoped by projectId and capped at the server's own createdAt for
rows written before this migration, so a recycled key can never pull in a
predecessor's history. Also drop the cluster instance-assignment cache
entry on delete, which had the same recycled-key problem for node pinning.
@anilguleroglu
anilguleroglu merged commit ee91324 into main Aug 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants