MCP.so
Sign In

Model Context Protocol (MCP) Example

@iddv

About Model Context Protocol (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.

Basic information

Category

Developer Tools

License

MIT

Runtime

python

Transports

stdio

Publisher

iddv

Config

Add this server to your MCP-compatible client using the configuration below.

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

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

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

FAQ from Model Context Protocol (MCP) Example

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.

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.

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.

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.

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.

Comments

More Developer Tools MCP servers