typescript-sdk/packages/mcp-spec
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Soria Parra 929275eddf
Add 'packages/mcp-spec/' from commit 'd06853c5e8'
git-subtree-dir: packages/mcp-spec
git-subtree-mainline: 02e421c1f1
git-subtree-split: d06853c5e8
2024-09-24 21:59:42 +01:00
..
.github/workflows Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
docs Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
examples Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
schema Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
scripts Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
site Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
spec Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
.gitignore Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
.nvmrc Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
package.json Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
README.md Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00
yarn.lock Add 'packages/mcp-spec/' from commit 'd06853c5e8' 2024-09-24 21:59:42 +01:00

Model Context Protocol spec

This repo contains the specification and protocol schema for the Model Context Protocol.

The schema is defined in TypeScript first, but made available as JSON Schema as well, for wider compatibility.

Prequisites

The following software is required to work on the spec:

  • Typescript
  • Node.JS 20 or above
  • Yarn
  • Typescript JSON Schema (for generating json schema)
  • Hugo (optionally, for serving the documentation)
  • Go (optionall, for serving the documentation)
  • nvm (optionally, for managing node versions)

Validating and building the spec

The following commands install the dependencies, validate the schema and generate the json schema.

$ nvn install # install the correct node version
$ yarn install # install dependencies
$ yarn validate:schema # validate the schema
$ yarn validate:examples # validate the examples
$ yarn generate:json # generate the json schema

Serving the documentation

The documentation lives in the docs folder. To serve the documentation, run the following commands:

$ yarn serve:docs # serve the documentation

Note that this reqires Hugo and Go to be installed.