Metadata-Version: 2.3
Name: blair812-mcp-demo
Version: 0.1.1
Summary: A demo MCP server built with the official Python SDK (mcp 2.x), exposing an add tool and a greeting resource template.
Author: Blair812
Author-email: Blair812 <tian196321@126.com>
Requires-Dist: mcp[cli]>=2.3.0
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# blair812-mcp-demo

A demo [Model Context Protocol](https://modelcontextprotocol.io) server built with the
official Python SDK (`mcp` 2.x, `MCPServer`). It exposes a simple `add` tool and a
`greeting` resource template — a minimal, working starting point for your own MCP server.

## Requirements

- Python `>=3.13`
- [`uv`](https://docs.astral.sh/uv/) (recommended) or `pip`

## Usage

The easiest way to run it is with `uvx`, which fetches and runs the package in an
isolated environment — no manual install needed.

Add this to your MCP client configuration (Qoder, Claude Desktop, etc.):

```json
{
  "mcpServers": {
    "blair812-mcp-demo": {
      "command": "uvx",
      "args": ["blair812-mcp-demo"]
    }
  }
}
```

Alternatively, install it and point your client at the `blair812-mcp-demo` command:

```bash
pip install blair812-mcp-demo
```

```json
{
  "mcpServers": {
    "blair812-mcp-demo": {
      "command": "blair812-mcp-demo"
    }
  }
}
```

The server speaks MCP over **stdio**.

## What's inside

| Type | Name | Description |
| --- | --- | --- |
| Tool | `add(a: int, b: int) -> int` | Returns the sum of `a` and `b`. |
| Resource template | `greeting://{name}` | Returns `Hello, {name}!`. |

## Local development

Clone the project, then use the MCP Inspector to debug it interactively:

```bash
uv sync
uv run mcp dev src/mcp_demo/server.py
```

This opens the MCP Inspector in your browser so you can list and call tools and read
resources.

## License

Demo project — use it freely as a template for your own MCP servers.
