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.

コメント

「開発者ツール」の他のコンテンツ