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.
「その他」の他のコンテンツ
Awesome Mlops
visengerA curated list of references for MLOps
ICSS
chokcoco不止于 CSS
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
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
コメント