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.
Available Tools
1 tooladdB
add two numbers
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. 'add two numbers' reveals nothing about error handling, rate limits, authentication needs, or output format. It lacks any behavioral context beyond the basic operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at three words, front-loaded with the core action. Every word earns its place by directly contributing to understanding the tool's purpose without any redundant or unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (simple arithmetic), 2 parameters, and the presence of an output schema (which handles return values), the description is minimally adequate. However, it lacks behavioral details and usage context, making it incomplete for fully informed tool selection.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must compensate for parameter documentation. 'add two numbers' implicitly defines the two parameters as numbers to be added, which aligns with the schema's integer types. However, it doesn't specify parameter names or detailed constraints, leaving some ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'add two numbers' clearly states the verb ('add') and resource ('two numbers'), making the tool's function immediately understandable. However, with no sibling tools, it cannot demonstrate differentiation from alternatives, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives or any contextual prerequisites. It simply states what the tool does without indicating appropriate scenarios or constraints for its application.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v0.1.0- First observed
add
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'add' has a clear and distinct purpose of adding two numbers, leaving no room for confusion or misselection by an agent.
Since there is only one tool named 'add', naming consistency is inherently perfect. There are no other tools to compare against, so no inconsistencies in patterns, styles, or conventions can arise.
A single tool is too few for most server purposes, as it severely limits functionality and scope. For a server named 'MCPServerDemo', which suggests a broader demonstration or utility set, one tool feels thin and inadequate, indicating a likely mismatch with the intended scope.
The tool surface is severely incomplete, as it only covers a basic arithmetic operation (adding two numbers) with no other related operations like subtraction, multiplication, or division. This leaves significant gaps for any practical use case, making it impossible to handle a full range of tasks in the implied domain of mathematical or utility functions.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA 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.-
- FlicenseNot gradedqualityDmaintenanceA 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.-
- FlicenseNot gradedqualityDmaintenanceA 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.-
- FlicenseNot gradedqualityDmaintenanceA sample MCP server that provides basic arithmetic tools like addition, subtraction, multiplication, and division. It serves as a demonstration for implementing the Model Context Protocol and connecting custom tools to clients like Claude Desktop.-
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