anupvr/mcp-server-with-json-rpc
3.2
If you are the rightful owner of mcp-server-with-json-rpc and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project is a working implementation of a Model Context Protocol (MCP) Server designed for goal-based routing using advanced technologies like JSON-RPC 2.0, Open Agent JSON, and LLM-based summarizers.
MCP Server (Goal-Based Routing)
This project is a working implementation of an MCP (Model Context Protocol) Server using:
- JSON-RPC 2.0
- Open Agent JSON
- Real-time Tavily search agents (Amazon, Flipkart, TataCliq)
- LLM-based summarizer and recommender (using OpenAI + LangChain)
- Observability via LangSmith
How to Run
- Install requirements
pip install -r requirements.txt
- Create
.env
file with:
OPENAI_API_KEY=your-openai-key
TAVILY_API_KEY=your-tavily-key
- Start the server
python main.py
- Open in browser:
http://localhost:8000/docs
Sample Request
{
"jsonrpc": "2.0",
"method": "mcp.infer",
"params": {
"input": "Recommend me a budget phone",
"goal": "product_recommendation"
},
"id": "001"
}
Folder Structure
main.py
— FastAPI entryrouter.py
— routes goal to agentsagents/
— web crawlers + LLM agentsutils/
— Tavily and LLM helpersmodels/
— schemas for requests