A minimal MCP server demonstrating the mcp-contracts GitHub Action.
This repo has a simple MCP server (server.js) with a baseline contract snapshot in contracts/baseline.mcpc.json. When a pull request modifies server.js, the GitHub Action automatically:
- Captures the current MCP tool schemas from the server
- Diffs them against the baseline snapshot
- Posts a PR comment with the diff report
- Fails the check if breaking changes are detected
- Fork this repo
- Create a branch and modify
server.js(e.g., add a required parameter to a tool, or remove a tool) - Open a pull request
- Watch the MCP Contract Check workflow run and report changes
npm install
npm startThe server communicates over stdio using the MCP protocol.