Introduction to MCP
@LiteObject
Introduction to MCP について
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.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"introduction-to-mcp": {
"command": "python",
"args": [
"server.py"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is Introduction to MCP?
A minimal MCP (Model Context Protocol) server and client example that demonstrates basic calculator operations. It supports both SSE and stdio transports and is intended for developers learning how to build and test MCP servers and clients.
How to use Introduction to MCP?
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.
Key features of Introduction to MCP
- 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
Use cases of Introduction to MCP
- Learning how to set up and run an MCP server and client
- Testing basic calculator operations with different transport protocols
- Debugging MCP interactions using the Inspector proxy in development mode
- Understanding the difference between
mcp devand direct Python execution
FAQ from Introduction to MCP
What transports are supported?
The server supports stdio (client launched as subprocess) and SSE (client connects via HTTP event stream).
How do I run the server on port 8050 as defined in server.py?
Execute python server.py directly. The mcp dev command runs the MCP Inspector on port 6277, not on the port defined in server.py.
What is the difference between mcp dev server.py and python server.py?
mcp dev server.py starts the MCP Inspector with a proxy server on port 6277 for development and debugging. python server.py runs your FastMCP server directly on the port specified in the code (8050).
What dependencies are required?
The project lists dependencies in requirements.txt and requires the mcp package (install with pip install mcp[cli]).
「その他」の他のコンテンツ
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
Awesome-MCP-ZH
yzflyMCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
コメント