modelcontextprotocol / modelcontextprotocol/conformance

Server lifecycle management: eliminate boilerplate bash scripts from SDK repos

Open
#114 1 comment 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

Every SDK repo that runs server conformance tests needs a bash script that does the same thing:

  1. Start the server process in the background
  2. Poll until healthy (curl loop with retries)
  3. Run npx @modelcontextprotocol/conformance server --url <url>
  4. Trap + kill the server on exit

Here are the current scripts:

These are nearly identical — the only SDK-specific part is the command to start the server. The health-check loop, process management, and cleanup are pure boilerplate that gets copy-pasted across repos.

This creates maintenance burden: if we want to change the health-check behavior (e.g., longer timeout, different readiness check), every SDK repo needs updating. It also means each SDK has to figure out the bash incantation independently.

Context

The client subcommand already manages process lifecycle — it takes a --command flag, spawns the client, and handles cleanup. The server subcommand currently only connects to an already-running server via --url.

With the GitHub Action (#99, PR #113), server workflows still require a separate "start server and wait" step before invoking the action. This is the last piece of per-repo boilerplate that could be eliminated.

Desired outcome

A single SDK-specific value (the command to start the server) should be all that's needed. The conformance tool should handle spawning, health-checking, and cleanup — the same way it already does for client testing.

Suggestion

Adding --command support to the server subcommand (symmetric with how client already works) seems like the natural fit. The action could then wire it through for server mode as well.

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

Read the existing client subcommand's --command lifecycle handling, then compare the TypeScript SDK's scripts/run-server-conformance.sh and the Python SDK's .github/actions/conformance/run-server.sh. Trace how the server subcommand and GitHub Action from #99/PR #113 are wired today. Done means server mode accepts the SDK-specific command while handling startup, health checks, and cleanup without per-repository boilerplate.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.