Introduction to MCP
About
Minimal MCP server/client example demonstrating basic calculator operations via SSE and stdio transports.Minimal MCP server/client example demonstrating basic calculator operations via SSE and stdio transports.
Details
- Author
- LiteObject
- Downloads
- 191
- Categories
- Other, AI
Jump to
- Provides a minimal calculator example (add, subtract, multiply, divide)
- Supports both stdio and SSE transports
- Includes a ready-to-run client for each transport
- Uses FastMCP for server implementation
- Offers a development mode with hot-reloading via mcp dev
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Introduction to MCPCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install dependencies with pip install -r requirements.txt and the MCP CLI with pip install mcp[cli]. Run the server using mcp dev server.py (starts the MCP Inspector proxy on port 6277) or python server.py (runs the FastMCP server directly on port 8050). Then launch a client script: python client_stdio.py for stdio transport or python client_sse.py for SSE transport.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"introduction to mcp": {
"introduction-to-mcp": {
"command": "python",
"args": [
"server.py"
]
}
}
}
}
McpServers
{
"introduction-to-mcp": {
"command": "python",
"args": [
"server.py"
]
}
}
Introduction to MCP
A minimal MCP server and client example demonstrating basic calculator operations using both SSE and stdio transports.
Installation
To install all packages from your requirements.txt file using pip, you can use the following command in your terminal:
pip install -r requirements.txt
Running the Server
Make sure you have installed themcp package. You can do this by running the following command in your terminal:
pip install mcp[cli]
Then, you can run the server.py script using the following command:
mcp dev server.py
You can also run the script using Python directly:
python server.py
Use python server.py for normal execution. Use mcp dev server.py for development with hot-reloading and a better developer experience.
Important Note
>When you run mcp dev server.py, you are starting the MCP Inspector and its proxy server, not your FastMCP server directly. The MCP Inspector runs its own proxy (default port 6277) and does not use the port (8050) specified in your server.py.
>To run your FastMCP server on port 8050 as defined in server.py, you should execute: python server.py
>The mcp dev command is for development and debugging with the MCP Inspector, not for running your server directly on the specified port. If you want to use the Inspector, connect your client to the proxy port (6277). If you want your server to listen on 8050, run it with python server.py.
Running the Client
STDIO Client
Launches the server as a subprocess and connects to it using thestdio transport. This is useful for testing and debugging.
python client_stdio.py
SSE Client
Connects to the server using thesse transport. This is useful for real-time updates and notifications.
python client_sse.py
Links
- Quickstart for Server Developers - Quickstart for Client DevelopersSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




