modelcontextprotocol / modelcontextprotocol/conformance

feat: Allow fixed request headers in server conformance tests

Open
#453 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
127
Forks
101
Avg merge
6d 1h
Merged PRs (30d)
7

Description

Problem

Server conformance tests accept the target only through --url. Servers that require a fixed bearer token must put it in the query string, which exposes the credential in the runner's process arguments and in output that prints the target URL.

For example:

conformance server --url 'http://127.0.0.1:3001/?token=SECRET'

Environment variables keep the token out of the parent shell command, but the runner still receives the expanded URL as an argument.

Requested capability

Allow callers to add fixed HTTP request headers to server conformance traffic without placing their values in the URL. An interface such as repeatable --header 'Authorization: Bearer ...' arguments or a header file/environment option would solve this.

Requirements:

  • Apply the headers to every request sent to the server under test.
  • Do not print header values in normal or verbose output.
  • Keep secrets out of child-process arguments when an environment or file-based form is used.
  • Document precedence if authorization scenarios need to override a configured header.

This was found while running MCP 2026-07-28 and 2025-11-25 server conformance tests against an authenticated endpoint in apify/apify-mcp-server#1173.

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

Start by locating the server conformance command's --url parsing and the code that constructs requests and prints targets. Trace authorization scenarios and determine how configured headers interact with them. Done means headers reach every server request, values stay out of normal and verbose output, environment or file forms avoid child-process arguments, and precedence is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, security, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.