- Home
- MCP servers
- MCP Demo Server
MCP Demo Server
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run an MCP server to expose tools from your application to MCP clients. This enables remote clients to discover and invoke functions like add_nums through a standardized MCP transport over HTTP, enabling seamless automation and integration across your tooling.
How to use
To use this MCP server with an MCP client, connect to the HTTP endpoint and invoke the exposed tools. In this example, you will access the add_nums tool and provide two numbers to receive their sum. The server exposes the add_nums tool under the MCP server named demo_mcp, available at the configured HTTP URL.
How to install
Prerequisites: you need Python and a package manager to install dependencies.
poetry install
Start the server locally (the project uses a Makefile target to run the server):
make run
Add the MCP to your Claude Code session to connect to this server. Run the following commands to remove any existing demo entry, add the new one via HTTP, and verify the MCP is listed:
claude mcp remove demo-mcp || true && claude mcp add demo-mcp --transport http http://localhost:8000/llm/mcp && claude mcp list
Once connected, test the available tool by confirming its presence and performing a sample addition. You should see the demo_mcp MCP server exposing add_nums, and calling it with a=5 and b=3 should yield 8.
Notes and testing
The server is named demo_mcp in this setup. The add_nums tool demonstrates how a simple arithmetic function can be exposed through the MCP server, enabling clients to perform computations via a consistent interface.
Available tools
add_nums
Adds two numbers by exposing a simple numeric operation through the MCP server, enabling clients to request a sum of a and b.