This is an implementation of the Model Context Protocol (MCP) based on the 2024-11-05 protocol revision. It provides a standardized way for servers to expose resources and tools to clients.
- List available tools
- Call tools with arguments
- Receive tool execution results
- Receive notifications when the tool list changes
- List available resources
- Read resource contents
- Subscribe to resource updates
- Resource templates with URI templates
- Receive notifications when the resource list changes
- Node.js (version 14 or higher)
- npm
npm installnpm startThis starts the MCP server on port 3000 (default).
npm run clientThis runs a simple client that connects to the MCP server, lists available tools and resources, and demonstrates basic functionality.
The server supports the following capabilities:
{
"capabilities": {
"tools": {
"listChanged": true
},
"resources": {
"subscribe": true,
"listChanged": true
}
}
}tools/list: List available toolstools/call: Call a tool with arguments
resources/list: List available resourcesresources/read: Read resource contentsresources/subscribe: Subscribe to resource updatesresources/templates/list: List available resource templates
notifications/capabilities: Server capabilitiesnotifications/resources/list_changed: Resource list changednotifications/resources/updated: Resource updatednotifications/tools/list_changed: Tool list changed
This implementation supports all the tools in the tools.js file and provides a simple interface for accessing resources on the filesystem. It uses WebSockets for real-time communication between the server and clients.
MIT