Metadata-Version: 2.5
Name: xtree-mcp
Version: 0.1.0
Summary: MCP server exposing XTREE API tools for AI agents
Project-URL: Homepage, https://www.xtree.io
Project-URL: Documentation, https://www.xtree.io/docs
Project-URL: Repository, https://github.com/xtree-io/xtree-mcp
Author-email: XTREE <business@xtree.io>
License: MIT
Keywords: agent,mcp,wechat,xtree
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Requires-Dist: mcp<2,>=1.2
Requires-Dist: xtree-sdk>=0.1.0
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# xtree-mcp — XTREE MCP server

MCP server for [XTREE](https://www.xtree.io), a real-time social media data API. This repository exposes **WeChat** tools (search, Channels, article metrics, account history, library search) plus account balance for Cursor, Claude Desktop, and any MCP client. Other live platforms are on the REST API and the [Python SDK](https://github.com/xtree-io/xtree-python). **Not** a BI or copywriting product.

Tools call `https://api.xtree.io` with your own API Key and wallet (pay per call).

## Install / run

Package may not be on PyPI yet. Prefer GitHub:

```bash
# one-shot via uvx
uvx --from "git+https://github.com/xtree-io/xtree-mcp.git" xtree-mcp
```

Or install editable after cloning:

```bash
git clone https://github.com/xtree-io/xtree-mcp.git
cd xtree-mcp
pip install xtree-sdk
pip install -e .
```

## Get an API Key

1. Sign up at [www.xtree.io](https://www.xtree.io/login?tab=signup).
2. Set `XTREE_API_KEY=xt_live_...`.

## Cursor / Claude config

```json
{
  "mcpServers": {
    "xtree": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/xtree-io/xtree-mcp.git", "xtree-mcp"],
      "env": {
        "XTREE_API_KEY": "xt_live_..."
      }
    }
  }
}
```

## Billing

Each tool call is a billed API request from your wallet (CNY). Incomplete delivery is not billed. Unit prices: [API Catalog](https://www.xtree.io/catalog). Scenario playbooks (when to call which tool, pagination): [xtree-skills](https://github.com/xtree-io/xtree-skills).

## Docs

- Website docs: https://www.xtree.io/docs
- OpenAPI: https://api.xtree.io/api/openapi.json
- Python SDK: https://github.com/xtree-io/xtree-python
- Skills: https://github.com/xtree-io/xtree-skills

## Environment

| Variable | Required | Default |
|----------|----------|---------|
| `XTREE_API_KEY` | yes | — |
| `XTREE_BASE_URL` | no | `https://api.xtree.io/api` |
| `XTREE_VERIFY_CODE` | no | — |

## Mirror notice

**Do not develop in this repository.** Public mirror only. Issues welcome. Contact: [business@xtree.io](mailto:business@xtree.io).

## License

MIT.
