modelcontextprotocol

**MCP: Model Context Protocol specification & documentation. Defines data exchange for model context & interoperability.**

4,493
711
# Model Context Protocol (MCP)

This repository defines the specification and schema for the Model Context Protocol (MCP), a standardized way to represent and exchange context information for machine learning models.

## Overview

The Model Context Protocol aims to facilitate interoperability and consistency in how model context is defined and used across different platforms and tools.  It provides a structured and machine-readable format for representing information such as:

*   Model metadata (e.g., name, version, author)
*   Input/output schema definitions
*   Data preprocessing steps
*   Training environment details
*   Provenance information

## Schema Definition

The MCP schema is defined using TypeScript for strong typing and maintainability.  For broader compatibility, it is also provided as a JSON Schema.

*   **TypeScript Schema:**  [`schema/2025-03-26/schema.ts`](schema/2025-03-26/schema.ts) - The primary source of truth for the MCP schema.  This file defines the data structures and types used in the protocol.

*   **JSON Schema:** [`schema/2025-03-26/schema.json`](schema/2025-03-26/schema.json) - A JSON Schema representation of the TypeScript schema, suitable for validation and integration with tools that support JSON Schema.

**Note:** The date `2025-03-26` in the schema path indicates the version of the schema.  Refer to the official documentation for details on versioning and compatibility.

## Documentation

Comprehensive documentation for the Model Context Protocol, including detailed explanations of the schema, usage examples, and best practices, is available at:

[modelcontextprotocol.io](https://modelcontextprotocol.io)

The documentation is built using Mintlify.

## Contributing

We welcome contributions to the Model Context Protocol!  Please review the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines on how to contribute, including:

*   Reporting issues
*   Submitting pull requests
*   Following coding conventions
*   Participating in discussions

## License

This project is licensed under the MIT License.  See the [LICENSE](LICENSE) file for the full license text.

Repository

MO
modelcontextprotocol

modelcontextprotocol/modelcontextprotocol

Created

September 24, 2024

Updated

July 7, 2025

Language

TypeScript

Category

Search & Knowledge