MCP.so
登录

MCP Server Sample

@antonioscapellato

关于 MCP Server Sample

MCP Server Sample

基本信息

分类

其他

许可证

MIT

运行时

python

传输方式

stdio

发布者

antonioscapellato

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-server-sample-antonioscapellato": {
      "command": "uv",
      "args": [
        "run",
        "mcp"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP Server Sample?

MCP Server Sample is an educational implementation of a Model Context Protocol (MCP) server. It demonstrates how to build a functional MCP server that integrates with various LLM clients.

How to use MCP Server Sample?

Install Python 3.10 or higher and the MCP SDK 1.2.0 or higher. Use uv or pip to add "mcp[cli]" to your project. Create a server script using FastMCP, then run it with mcp dev server.py for testing or mcp install server.py to use with Claude Desktop.

Key features of MCP Server Sample

  • Demonstrates a fully functional MCP server with tools and resources
  • Built with FastMCP for minimal boilerplate
  • Provides a calculator tool (add) and a dynamic greeting resource (greeting://{name})
  • Easy integration with MCP‑compatible clients like Claude Desktop
  • Serves as a reference for building custom MCP servers

Use cases of MCP Server Sample

  • Learning how to create and deploy MCP servers
  • Prototyping LLM integrations with custom tools and data sources
  • Testing the MCP protocol in a safe, minimal environment
  • Demonstrating the MCP client‑server architecture in workshops or tutorials

FAQ from MCP Server Sample

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. It works like a USB‑C port for AI applications, connecting models to data sources and tools.

What are the system requirements?

Python 3.10 or higher, MCP SDK 1.2.0 or higher, and the uv package manager.

How do I install and run the server?

Add "mcp[cli]" to your project with uv add "mcp[cli]" or pip install "mcp[cli]". Write a server.py file, then run mcp dev server.py for interactive testing or mcp install server.py to register with Claude Desktop.

What capabilities does this server demonstrate?

It demonstrates two core MCP capabilities: a tool (add that sums two integers) and a resource (greeting://{name} that returns a personalized greeting).

How can I extend this server?

Add more @mcp.tool() or @mcp.resource() decorators with your own functions, following the patterns shown in the quickstart code.

评论

其他 分类下的更多 MCP 服务器