Thank you for your interest in contributing to the Model Context Protocol specification, schemas, or docs! This document outlines how to contribute to this project.
Also see the overall MCP communication guidelines in our docs, which explains how and where discussions about changes happen.
The following software is required to work on the spec:
- Node.js 20 or above
- TypeScript
- TypeScript JSON Schema (for generating JSON schema)
- Mintlify (optional, for docs)
- nvm (optional, for managing Node versions)
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/modelcontextprotocol.git
cd modelcontextprotocol- Install dependencies:
nvm install # install correct Node version
npm install # install dependenciesNote that schema changes are made to schema.ts, and schema.json is generated from
schema.ts.
- Create a new branch:
git checkout -b feature/your-feature-name-
Make your changes.
-
Validate schema changes and generate
schema.json:
npm run check:schema:ts
npm run generate:schemaDocumentation is written in MDX format and in the docs directory.
You can preview documentation changes locally by running:
npm run serve:docsAnd lint them with:
npm run check:docs
npm run formatWhen contributing to the documentation:
- Keep content clear, concise, and technically accurate
- Follow the existing file structure and naming conventions
- Include code examples where appropriate
- Use proper MDX formatting and components
- Test all links and code samples
- You may run
npm run check:docs:linksto look for broken internal links.
- You may run
- Use appropriate headings: "When to use", "Steps", and "Tips" for tutorials
- Place new pages in appropriate sections (concepts, tutorials, etc.)
- Update
docs.jsonwhen adding new pages - Follow existing file naming conventions (
kebab-case.mdx) - Include proper frontmatter in MDX files
- Simple + Minimal: It is much easier to add things to a specification than it is to remove them. To maintain simplicity, we keep a high bar for adding new concepts and primitives as each addition requires maintenance and compatibility consideration.
- Concrete: Specification changes need to be based on specific implementation challenges and not on speculative ideas.
- Define: Explore the problem space, validate that other MCP users face a similar issue, and then clearly define the problem.
- Prototype: Build an example solution to the problem and demonstrate its practical application.
- Write: Based on the prototype, write a specification proposal.
- Push your changes to your fork
- Submit a pull request to the main repository
- Follow the pull request template
- Wait for review
By contributing, you agree that your contributions will be licensed under the MIT License.
Please review our Security Policy for reporting security issues.