MCP Server Tutorial
@cthuaung
关于 MCP Server Tutorial
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"MCP Server Tutorial": {
"command": "python",
"args": [
"main.py"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MCP Server Tutorial?
MCP Server Tutorial is a simple MCP (Model Context Protocol) server built with FastMCP that provides various mathematical operations as tools and a dynamic greeting resource. It is intended for developers learning to create and use MCP servers.
How to use MCP Server Tutorial?
Install Python 3.8+, create a virtual environment, and install FastMCP. Run the server with python main.py using SSE transport by default. Connect via MCP Inspector (run npx @modelcontextprotocol/inspector, choose SSE, and connect to http://localhost:8000/sse).
Features of MCP Server Tutorial
- Basic arithmetic: addition, subtraction, multiplication, division
- Advanced math: power, square root, cube root, factorial, logarithm, trigonometry
- Dynamic greeting resource (
greeting://{name}) - Supports SSE and stdio transport protocols
- Easily extensible with
@mcp.tool()and@mcp.resource()decorators
Use cases of MCP Server Tutorial
- Learning how to build and run an MCP server with FastMCP
- Prototyping mathematical tool integrations in AI assistants
- Demonstrating SSE-based MCP connections via Inspector
FAQ from MCP Server Tutorial
What are the prerequisites for running this server?
Python 3.8 or higher and the FastMCP library. Dependencies are installed via uv install fastmcp.
Which transport protocols are supported?
FastMCP supports two transport protocols: stdio (terminal-based) and sse (Server-Sent Events, browser-based compatible with MCP Inspector). The default is SSE.
How can I add new tools or resources?
Add a new tool by using the @mcp.tool() decorator or a new resource by using the @mcp.resource() decorator in main.py.
Where does the server’s data live?
No external databases or storage are mentioned; all operations are stateless calculations performed in memory.
Is authentication or authorization required?
The README does not mention any authentication or authorization mechanisms.
其他 分类下的更多 MCP 服务器
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
Core Philosophy: Connect, Unify, Respond
mindsdbDelegate anything. It comes back done.
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.
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
评论