This project demonstrates how to implement the Model Context Protocol (MCP) to create a GitHub code search tool that could be used by AI assistants. The application consists of a Node.js/Express backend that wraps the GitHub API, a browser client that simulates an AI assistant using the API, and MCP-compatible function definitions with JSON Schema.
Model Context Protocol is a standardized way for AI models to interact with external tools and services. It defines:
1. How functions are described to AI models
2. How AI models decide which functions to call
3. How parameters are structured and validated
4. How results are returned in a consistent format
shell
npm install
GH_TOKEN
for higher rate limitsshell
npm start
shell
npm run dev
GET /api/mcp/functions
- List all available functionsPOST /api/mcp
- Call a function with parametersThe application consists of:
- A Node.js/Express backend that wraps the GitHub API
- A browser client that simulates an AI assistant using the API
- MCP-compatible function definitions with JSON Schema
An example to demonstrate how to build and run an MCP server
No releases published
No packages published