Skip to main content
Glama
roderickch01

mcp-server-starter

by roderickch01

mcp-server-starter

用于使用 Python 构建模型上下文协议 (MCP) 服务器的骨架。当你需要向 Claude Desktop、Claude Code 或任何兼容 MCP 的客户端公开一组自定义工具/数据时,请 fork 此项目。

什么是 MCP 服务器?

MCP 是一种开放协议,允许语言模型客户端通过标准接口调用外部工具和数据源。MCP 服务器是托管这些工具的小型进程——你编写函数,协议负责处理发现和调用。

Related MCP server: Test MCP Server

快速入门

使用 pipx 直接从本仓库安装:

pipx install git+https://github.com/roderickch01/mcp-server-starter.git

然后将其注册到你的 MCP 客户端。对于 Claude Desktop,请编辑 ~/.config/Claude/claude_desktop_config.json (Linux)、~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config.json (Windows),并添加:

{
  "mcpServers": {
    "starter": {
      "command": "mcp-server-starter"
    }
  }
}

此代码片段的副本位于 examples/claude_desktop_config.json。重启你的客户端,echoadd 工具就会出现。

包含的内容

两个用于验证连接的演示工具:

  • echo(text: str) -> str — 返回 "echo: {text}"

  • add(a: int, b: int) -> int — 返回两数之和

两者都位于 src/mcp_server_starter/server.py 中(不到 30 行代码)。

添加你自己的工具

打开 server.py 并使用 @mcp.tool() 装饰任何函数。函数签名、类型提示和文档字符串将自动成为工具的模式:

@mcp.tool()
def reverse(text: str) -> str:
    """Return the input string reversed."""
    return text[::-1]

重新安装 (pipx reinstall mcp-server-starter) 并重启你的 MCP 客户端。新工具即可被发现。

本地开发

git clone https://github.com/roderickch01/mcp-server-starter.git
cd mcp-server-starter
python -m venv .venv && source .venv/bin/activate
pip install -e .
mcp-server-starter   # runs the server over stdio

许可证

MIT — 参见 LICENSE

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Tools

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Machine Context Protocol server that enables Claude AI to interact with tools through a structured communication interface, following standard MCP patterns with server initialization and stdio transport.
    1,284
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A dual-transport MCP server that exposes your API as tools to LLM clients, supporting both stdio transport for local clients like Claude Desktop and HTTP/SSE transport for remote clients like OpenAI's Responses API.
  • F
    license
    Not graded
    quality
    D
    maintenance
    A sample MCP server that provides basic arithmetic tools like addition, subtraction, multiplication, and division. It serves as a demonstration for implementing the Model Context Protocol and connecting custom tools to clients like Claude Desktop.
  • A
    license
    Not graded
    quality
    B
    maintenance
    A dead simple MCP server for exposing your app functions to AI agents like Claude Desktop.
    44
    5
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A basic MCP server to operate on the Postman API.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/roderickch01/mcp-server-starter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server