Contributing to MCP

MCP is an open source project and community contributions are essential. Learn how you can contribute and help improve the project.

Contribution Guide

There are many ways to contribute to the MCP ecosystem. You don't need to be an expert to make a difference. Every contribution, big or small, helps make MCP better for everyone.

Code

Contribute to official SDKs, tools or create new servers.

Documentation

Improve documentation, create tutorials or fix errors.

Community

Report bugs, suggest improvements or help other developers.

How to Contribute

Choose the contribution method that best fits your skills and interests.

Create MCP Servers

Develop MCP servers for new integrations and share them with the community.

Steps:

  1. 1
    Create a new server using official SDKs
  2. 2
    Implement useful resources, tools or prompts
  3. 3
    Publish your code on GitHub
  4. 4
    Add it to our repository directory

Example:

Servers for Google Drive, Slack, PostgreSQL, etc.

Improve Documentation

Help improve the project's documentation, examples and tutorials.

Steps:

  1. 1
    Identify areas of documentation that need improvement
  2. 2
    Fix errors or add missing information
  3. 3
    Create new examples and tutorials
  4. 4
    Improve clarity and accessibility of content

Example:

Tutorials, code examples, best practices guides

Report Issues

Report bugs, suggest improvements or participate in discussions about the protocol.

Steps:

  1. 1
    Check if the issue already exists
  2. 2
    Create a clear and descriptive issue
  3. 3
    Include steps to reproduce (if it's a bug)
  4. 4
    Participate in discussions

Example:

Bugs in SDKs, protocol improvements, feature suggestions

Contribute Code

Contribute code directly to official SDKs or project tools.

Steps:

  1. 1
    Fork the official repository
  2. 2
    Create a branch for your feature or fix
  3. 3
    Implement changes following standards
  4. 4
    Submit a Pull Request with clear description

Example:

SDK improvements, new features, bug fixes

Contribution Process

Follow these steps to contribute code to official MCP repositories.

1

Find an Issue or Create a New One

Search for existing issues or create a new one if you want to work on something specific.

  • Review open issues on GitHub
  • Comment on the issue you want to work on
  • If it doesn't exist, create a new issue with clear description
2

Fork and Clone the Repository

Create your own fork of the repository and clone it locally.

  • Fork the official repository on GitHub
  • Clone your fork locally: git clone https://github.com/your-username/repo.git
  • Add the original repository as upstream
3

Create a Branch for Your Change

Create a descriptive branch for your feature or fix.

  • Create a branch: git checkout -b feat/my-feature
  • Use descriptive names: feat/, fix/, docs/, test/
  • Keep the branch updated with main
4

Implement Your Changes

Write code following the project standards.

  • Follow the project's code standards
  • Write tests for new functionality
  • Update documentation if necessary
  • Make sure all tests pass
5

Submit a Pull Request

Create a PR with clear description of your changes.

  • Push your changes: git push origin feat/my-feature
  • Create a Pull Request on GitHub
  • Include clear description of the change
  • Reference the related issue if it exists
6

Review and Merge

Participate in code review and make adjustments if necessary.

  • Respond to reviewer comments
  • Make requested adjustments
  • Once approved, your PR will be merged

Code Standards

Follow these standards to ensure your code is consistent with the rest of the project.

Python

Standards:

  • Use Python 3.11+ with complete type hints
  • Follow PEP 8 for code style
  • Include Google-style docstrings
  • Write tests for new functionality
  • Use async/await for asynchronous operations

Example:

from mcp.server import Server
from mcp.types import Tool, TextContent
from typing import List

app = Server("mi-servidor")

@app.list_tools()
async def list_tools() -> List[Tool]:
    """
    Lista todas las herramientas disponibles.
    
    Returns:
        List[Tool]: Lista de herramientas disponibles.
    """
    return [
        Tool(
            name="example",
            description="Ejemplo de herramienta",
            inputSchema={"type": "object"}
        )
    ]

TypeScript

Standards:

  • Use strict TypeScript with explicit types
  • Follow project ESLint conventions
  • Include JSDoc for public functions
  • Write tests with Jest or Vitest
  • Use async/await and handle errors correctly

Example:

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { Tool } from "@modelcontextprotocol/sdk/types.js";

/**
 * Lista todas las herramientas disponibles.
 * @returns Lista de herramientas disponibles.
 */
async function listTools(): Promise<Tool[]> {
  return [
    {
      name: "example",
      description: "Ejemplo de herramienta",
      inputSchema: { type: "object" },
    },
  ];
}

Pre-PR Checklist

Make sure you meet these points before submitting your Pull Request

Code

  • Code follows project standards
  • All functions have explicit types
  • Docstrings/comments included where necessary
  • No commented or unused code
  • Variable names are descriptive

Tests and Documentation

  • Tests added for new functionality
  • All tests pass locally
  • Documentation is updated
  • Examples added if necessary
  • PR has a clear description

Ready to Contribute?

Every contribution makes MCP better. Explore available resources and start contributing.