Thank you for your interest in contributing to the Open Context Protocol specification! This guide will help you contribute to the documentation, schemas, and website.
Found a typo, unclear explanation, or missing information? Documentation improvements are always welcome.
Location: docs/content/
docs/- Getting started and implementation guidesblog/- Blog posts and announcementsregistry/- Registry catalog pages (auto-generated, see below)
How to contribute:
- Fork the repository
- Edit markdown files in
docs/content/ - Test locally:
cd docs && hugo server - Submit a pull request
The JSON schemas define the structure of OCP context objects, tools, and OpenAPI extensions.
Location: schemas/
ocp-context.json- Context object schemaocp-tool.json- Tool definition schemaocp-openapi-extensions.json- OpenAPI extension schema
How to contribute:
- Edit schema JSON files
- Update schema documentation:
make schemas - Verify changes in
docs/content/docs/specs/ - Test with example data
- Submit a pull request
Proposing changes to the protocol itself? These require broader discussion.
Process:
- Open an issue describing the proposed change
- Discuss rationale and impact with maintainers
- If approved, submit PR with:
- Schema updates
- Documentation updates
- Example implementations
Enhancements to the Hugo site, theme customizations, or styling.
Location: docs/
hugo.yaml- Site configurationassets/- CSS and JavaScriptlayouts/- Hugo template overridesstatic/- Static assets (images, icons)
Testing:
cd docs
hugo server -DImprovements to content generation or schema building scripts.
Location: scripts/
generate-content.js- Generates registry catalog pagesbuild-schemas.js- Generates schema documentationtemplates/- Nunjucks templates for content generation
Testing:
cd scripts
npm install
# Test content generation
node generate-content.js ../docs/content/registry
# Test schema generation
node build-schemas.jsThe registry catalog pages (docs/content/registry/catalog/) are auto-generated from the ocp-registry repository.
Do NOT edit these files directly. Instead:
- To add/update APIs: Contribute to ocp-registry
- To change templates: Edit
scripts/templates/*.j2 - To regenerate content:
node scripts/generate-content.js docs/content/registry
- Node.js 18+ (for build scripts)
- Hugo 0.147.0+ (for site building)
- Docker (optional, for testing builds)
- Clone the repository:
git clone https://github.com/opencontextprotocol/ocp-spec.git
cd ocp-spec- Install dependencies:
cd scripts
npm install- Run Hugo development server:
cd ../docs
hugo server -D- Visit http://localhost:1313
docker build -t ocp-spec:test .
docker run -p 8080:80 ocp-spec:testVisit http://localhost:8080
- Test changes locally
- Run
make schemasif you modified schema files - Verify all links work
- Check for typos and formatting
- Update relevant documentation
Include:
- What: Brief description of changes
- Why: Reason for the change
- Testing: How you tested the changes
- Screenshots: For visual changes
- Maintainers will review your PR
- Address any requested changes
- Once approved, your PR will be merged
- Changes deploy automatically via GitHub Actions
- Use headings hierarchically (h1 → h2 → h3)
- Include code language in fenced code blocks
- Use relative links for internal pages
- Keep lines under 120 characters when possible
Include complete, runnable examples:
from ocp_agent import OCPAgent
# Create agent
agent = OCPAgent()
# Register API
agent.register_api("github")Follow conventional commits:
feat:New featuresfix:Bug fixesdocs:Documentation changesstyle:Formatting, no code changerefactor:Code restructuringtest:Adding testschore:Maintenance tasks
Example: docs: clarify tool discovery process
- Open an issue: https://github.com/opencontextprotocol/ocp-spec/issues
- Check existing issues and PRs
- Review the specification
Thank you for contributing to OCP!