Metadata-Version: 2.4
Name: thesrc-mcp
Version: 0.4.1
Summary: MCP connector for The Source. Self-contained REST client for api.thesrc.ai.
Author-email: The Source <hi@thesrc.ai>
License: MIT
Keywords: anthropic,knowledge-graph,mcp,pharmacogenomics,receipts
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: mcp[cli]>=1.2.0
Requires-Dist: pydantic-settings>=2.6
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Description-Content-Type: text/markdown

# thesrc-mcp (source-mcp)

MCP connector for The Source. Thin wrapper over `source-sdk`.

## Install

```bash
pip install thesrc-mcp        # PyPI distribution name
# or: uvx thesrc-mcp          # run without installing
```

Console scripts `source-mcp` and `thesrc-mcp` are equivalent (same entrypoint).

Two tools:
- `source_search` — find an entity (Drug or Gene) by partial name
- `source_ask` — ask a structured question, get a full answer with authority chain

## Configuration

Reads from environment:

| Var | Default | Notes |
|-----|---------|-------|
| `SOURCE_API_URL` | `https://api.thesrc.ai` | Override to `http://localhost:8000` for local dev |
| `SOURCE_API_TOKEN` | — | API key (`src_live_...`) sent as `X-API-Key`, or JWT sent as Bearer |
| `SOURCE_TIMEOUT` | `30` | Per-request timeout, seconds |

## Run

```bash
source-mcp
```

The Claude Code / Claude Desktop config block:

```json
{
  "source-mcp": {
    "command": "source-mcp",
    "env": {
      "SOURCE_API_URL": "https://api.thesrc.ai",
      "SOURCE_API_TOKEN": "src_live_..."
    }
  }
}
```

## Claude Code install

See [INSTALL_CLAUDE_CODE.md](INSTALL_CLAUDE_CODE.md) and the **source** plugin under `plugins/source/`.
