modelcontextprotocol / modelcontextprotocol/servers

Use collision-resistant request IDs in responses and logs

Open
#3,404 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Description

Problem

Request/response correlation IDs in server responses/logging can collide under concurrent traffic, weakening traceability and operational debugging.

Why now

Reference MCP servers are used as examples for production-like integrations and should model robust correlation-ID behavior.

Evidence Packet

  • Version/commit under test: origin/main at 04cce79b4c2b
  • Runtime environment: macOS 26.3 (arm64), Node 22.19.0, Python 3.14.0
  • Minimal repro:
    1. Send high-concurrency request bursts across server tools.
    2. Inspect response/request correlation IDs and logs.
    3. Detect ambiguous or reused identifiers.
  • Expected behavior: collision-resistant IDs per request/operation.
  • Actual behavior: correlation identifiers are not consistently collision-resistant across server surfaces.

Why code change (not docs)

Correlation ID generation and propagation are runtime/logging contracts.

Scope / Codepaths

  • src/*/src
  • src/*/server

Acceptance Criteria

  • Request IDs include collision-resistant component.
  • IDs propagate consistently into responses and logs.
  • Concurrency tests confirm uniqueness.

Validation Plan

  • Add high-concurrency ID uniqueness tests.
  • Validate response/log correlation contract stability.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the request ID code paths under src//src and src//server, starting with how identifiers are generated and propagated into responses and logs. Add high-concurrency uniqueness tests and validate that IDs remain consistently correlated across server surfaces without changing the response/logging contract.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.