MCP.so
登录

MCP Example

@iddv

基本信息

分类

开发工具

许可证

MIT

传输方式

stdio

作者

iddv

关于 MCP Example

A reference implementation of the Model Context Protocol (MCP) enabling seamless tool calling between LLMs and applications. Features client/server architecture with HTTP APIs, local CLI execution, and AWS Bedrock integration in a production-ready, extensible framework.

MCP Example 配置

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

{
  "mcpServers": {
    "mcp-example": {
      "command": "python",
      "args": [
        "examples/servers/minesweeper_server.py",
        "--transport",
        "http",
        "--port",
        "8000"
      ]
    }
  }
}

MCP Example 工具

工具列表暂未提供

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

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

概览

What is Model Context Protocol (MCP) Example?

Model Context Protocol (MCP) Example is a repository of example servers and clients for building MCP-based AI applications, featuring a living Minesweeper game server as a showcase. Powered by FastMCP 2.0, it provides templates, educational resources, and enterprise features such as multiple transport protocols, session management, and OAuth 2.0 authentication. It is intended for developers who want to learn how to create sophisticated MCP servers or integrate them into production systems.

How to use Model Context Protocol (MCP) Example?

Clone the repository and install dependencies using Poetry (poetry install) or pip (pip install -e .). Start the Minesweeper server in development mode with mcp dev examples/servers/minesweeper_server.py or as an HTTP server with python examples/servers/minesweeper_server.py --transport http --port 8000. For production, configure transport via mcp.run(transport="streamable-http") or mcp.run(transport="websocket"). Test servers interactively using mcp dev or programmatically with the built-in testing module.

Key features of Model Context Protocol (MCP) Example

  • Living Minesweeper example demonstrating AI logical reasoning
  • Multiple transport protocols: stdio, HTTP, WebSocket
  • Session management for concurrent game instances
  • OAuth 2.0 authentication ready
  • Real-time data streaming and game state resources
  • Strategy guides, pattern library, and AI prompts

Use cases of Model Context Protocol (MCP) Example

  • Building interactive game servers with real-time state
  • Creating data processing servers that stream analysis results
  • Integrating external APIs through MCP tools and resources
  • Developing educational tools for teaching AI reasoning
  • Automating tasks with productivity-focused MCP servers

常见问题

1

What are the prerequisites for using Model Context Protocol (MCP) Example?

You need Python 3.10+ and either Poetry or pip for package management. FastMCP 2.0 is required and listed as a dependency.

2

How do I run the Minesweeper server?

Use `mcp dev examples/servers/minesweeper_server.py` for development mode with the MCP inspector, or start it as an HTTP server with `python examples/servers/minesweeper_server.py --transport http --port 8000`.

3

Can I use Model Context Protocol (MCP) Example with Claude Desktop?

Yes. Copy the configuration from `examples/configs/claude_desktop_config.json`, update the server paths, and restart Claude Desktop.

4

What transport protocols are supported?

The server supports stdio (default), HTTP (`streamable-http`), and WebSocket transports, chosen by the `--transport` argument or `mcp.run()` transport parameter.

5

What authentication mechanisms are available?

OAuth 2.0 is supported. Configure authorization URL, token URL, client ID, and scopes via the `@mcp.set_auth_config` decorator.

评论

开发工具 分类下的更多 MCP 服务器