MCPServerDemo
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCPServerDemomultiply 12 by 8"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
JSON RPC Server with FastAPI and Python
This project implements a simple JSON-RPC server using FastAPI, Uvicorn, and jsonrpcserver in Python. It exposes add and multiply methods.
Setup
Clone the repository:
git clone <your-repo-url> cd json-rpc-serverCreate a virtual environment and install dependencies using
uv:uv venv .\.venv\Scripts\activate # On Windows # source .venv/bin/activate # On Linux/macOS uv pip install fastapi uvicorn jsonrpcserver
Related MCP server: FastAPI MCP Demo Server
Running the Server
To start the development server with auto-reloading:
.\.venv\Scripts\activate # On Windows
# source .venv/bin/activate # On Linux/macOS
uv run python -m uvicorn main:app --reloadThe server will run at http://127.0.0.1:8000/.
API Endpoints
GET /
A simple test endpoint to confirm the server is running.
Request:
# Using curl (Linux/macOS/Git Bash)
curl http://127.0.0.1:8000/
# Using Invoke-RestMethod (PowerShell)
Invoke-RestMethod -Uri "http://127.0.0.1:8000/" -Method GetResponse:
{
"message": "FastAPI is running!"
}POST / (JSON-RPC 2.0)
This is the main JSON-RPC endpoint for add and multiply methods.
Add Method
Request:
# Using curl
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "add", "params": [2, 3], "id": 1}' http://127.0.0.1:8000/
# Using Invoke-RestMethod (PowerShell)
Invoke-RestMethod -Uri "http://127.0.0.1:8000/" -Method Post -Headers @{ "Content-Type" = "application/json" } -Body '{"jsonrpc":"2.0","method":"add","params":[2,3],"id":1}'Response (Example):
{"jsonrpc": "2.0", "result": 5, "id": 1}Multiply Method
Request:
# Using curl
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "multiply", "params": [4, 5], "id": 1}' http://127.0.0.1:8000/
# Using Invoke-RestMethod (PowerShell)
Invoke-RestMethod -Uri "http://127.0.0.1:8000/" -Method Post -Headers @{ "Content-Type" = "application/json" } -Body '{"jsonrpc":"2.0","method":"multiply","params":[4,5],"id":1}'Response (Example):
{"jsonrpc": "2.0", "result": 20, "id": 1}Multipl Methods in a sigal call
curl -X POST -H "Content-Type: application/json" -d '[{"jsonrpc": "2.0", "method": "add", "params": [2, 3], "id": 1},{"jsonrpc": "2.0", "method": "multiply", "params": [2, 30], "id": 2}]' http://127.0.0.1:8000/
Invoke-RestMethod -Uri "http://127.0.0.1:8000/" -Method Post -Headers @{ "Content-Type" = "application/json" } -Body '[{"jsonrpc":"2.0","method":"add","params":[2,3],"id":1},{"jsonrpc":"2.0","method":"multiply","params":[2,30],"id":2}]'Install fastmcp
uv add fastmcpRun MCP inspector
uv run fastmcp dev inspector TestMPCserver.py Run MCP server
uv run fastmcp run TestMPCserver.pyConnect to cluade-desktop
uv run fastmcp install claude-desktop TestMPCserver.pyRun MCP server
uv run fastmcp run DataprovidersMCPServer.pyConnect to cluade-desktop
uv run fastmcp install claude-desktop DataprovidersMCPServer.pyuv add langchain langchain-openai langchain-mcp-adapters python-dotenv streamlit logging pandas fastmcp python-dotenv jsonrpcserver uvicorn streamlit langchain-ollama fastapi uvicorn serversendevent:app uvicorn Streamable:appStreaming HTTP Demo
This project includes a streaming HTTP endpoint demonstration using FastAPI's StreamingResponse.
Start the Stream Server
uv run uvicorn Streamable:app --reloadThe server will run at http://127.0.0.1:8000/stream and sends 10 chunks with 1-second intervals.
Run the Stream Client
python StreamableClient.pyThe client demonstrates both async and synchronous methods to consume the streaming response.
Test with curl
# Using curl (Linux/macOS/Git Bash)
curl http://127.0.0.1:8000/stream
# Using Invoke-RestMethod (PowerShell)
Invoke-RestMethod -Uri "http://127.0.0.1:8000/stream" -Method GetVS Code Debugging
A launch.json file is provided in the .vscode directory to enable debugging with VS Code. You can set breakpoints in main.py and run the "Python: FastAPI" configuration.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
- addB
Related MCP Servers
- Flicense-qualityDmaintenanceA demonstration MCP server that provides calculator functionality through both stdio and FastAPI implementations. Enables users to perform mathematical calculations via MCP tools using the FastMCP framework.Last updated
- Flicense-qualityDmaintenanceA demonstration MCP server built with FastAPI that provides basic mathematical operations and greeting services. Integrates with Gemini CLI to showcase MCP protocol implementation with simple REST endpoints.Last updated
- Flicense-qualityDmaintenanceA simple demonstration MCP server built with FastMCP that exposes basic calculator operations (add, subtract, multiply, divide) as tools for MCP clients like GitHub Copilot Agent mode.Last updated
- Flicense-quality-maintenanceA demonstration FastMCP server with FastAPI integration that provides basic arithmetic operations, personalized greetings, and a stock analyst prompt template for Claude.ai.Last updated
Related MCP Connectors
MCP (Model Context Protocol) server for Appwrite
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NitinUdasin/MCPServerDemo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server