A minimal and educational implementation of a protocol inspired by the Model Context Protocol (MCP), built using Node.js and Express.js.
This project currently supports basic JSON-RPC 2.0 calls, tool execution, and schema validation using ajv.
- Parses JSON-RPC 2.0 requests
- Executes tool functions based on method names
- Validates input params using JSON Schema (ajv)
- Returns standard JSON-RPC error/success responses
-
Clone the repository
git clone [https://github.com/your-username/mini-cp.git](https://github.com/atharvmalve/MiniContextProtocol.git) cd mini-cp -
Install dependencies
npm install
-
Start the server
npm run dev
-
Test with curl (bash example)
curl -X POST http://localhost:3000/rpc \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "greet", "params": { "name": "World!" }, "id": 1 }'
- Dynamic tool registration from manifest
- Full tool metadata descriptions
- Session/context management
- Chained tool execution (tool → tool)
- Better developer ergonomics
This is a solo project for now, built to learn and experiment publicly.
Feel free to fork and mess around with it!