MCP.so
登录

Introduction to MCP Server

@LiteObject

基本信息

分类

其他

传输方式

stdio

作者

LiteObject

关于 Introduction to MCP Server

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.

Introduction to MCP Server 配置

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

{
  "mcpServers": {
    "introduction-to-mcp": {
      "command": "python",
      "args": [
        "server.py"
      ]
    }
  }
}

Introduction to MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 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 dev and direct Python execution

常见问题

1

What transports are supported?

The server supports stdio (client launched as subprocess) and SSE (client connects via HTTP event stream).

2

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.

3

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).

4

What dependencies are required?

The project lists dependencies in `requirements.txt` and requires the `mcp` package (install with `pip install mcp[cli]`).

评论

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