Create a Custom Server
@JustVarunsai
关于 Create a Custom Server
A custom MCP server that provides arithmetic calculation tools and fast mathematical operations for AI assistants.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"create-mcp-server-justvarunsai": {
"command": "uv",
"args": [
"init",
"calculator"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Create a Custom Server?
A tutorial that guides developers on building a simple Model Context Protocol (MCP) server using Python and FastMCP, then connecting it to a desktop host like Claude for Desktop. It demonstrates creating four arithmetic tools—add, subtract, multiply, divide—to extend AI assistants with custom capabilities.
How to use Create a Custom Server?
Install uv, create a Python project, activate a virtual environment, add mcp[cli] dependency, write a calculator.py script using FastMCP and tool decorators, run with uv run calculator.py, then configure the server’s absolute path in Claude for Desktop’s claude_desktop_config.json under mcpServers.
Key features of Create a Custom Server
- Step-by-step guide to building an MCP server from scratch.
- Implements four arithmetic tools: add, subtract, multiply, divide.
- Uses Python MCP SDK (FastMCP) and
uvfor environment management. - Connects to Claude for Desktop (desktop hosts only).
- Requires Python 3.10+ and MCP SDK 1.2.0+.
- Server runs locally via stdio transport.
Use cases of Create a Custom Server
- Extending Claude with custom arithmetic calculations during conversations.
- Learning the fundamentals of building and configuring MCP servers.
- Developing custom tools for AI assistants in local desktop environments.
- Creating a foundation for more complex MCP servers (weather, finance, etc.).
FAQ from Create a Custom Server
What is MCP?
MCP (Model Context Protocol) is a protocol that allows developers to extend AI assistants like Claude with custom tools and servers, giving the assistant extra powers during a conversation.
What are the prerequisites for this tutorial?
Familiarity with Python and LLMs like Claude is required. You need Python 3.10 or higher and the Python MCP SDK version 1.2.0 or higher.
How do I connect the server to Claude for Desktop?
Edit Claude for Desktop’s configuration file (claude_desktop_config.json) and add the server under mcpServers with the uv command, an absolute path to the project directory, and the script name.
Why can’t I use Claude.ai instead of Claude for Desktop?
Because servers are run locally; MCP currently only supports desktop hosts, not web‑based clients.
What capabilities can an MCP server provide beyond tools?
MCP servers can also provide Resources (file‑like data readable by clients) and Prompts (pre‑written templates for tasks). This tutorial focuses on tools.
其他 分类下的更多 MCP 服务器
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
Servers
modelcontextprotocolModel Context Protocol Servers
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
评论