Metadata-Version: 2.4
Name: meddata-mcp
Version: 0.2.0
Summary: MCP server for the MedData API: drug and supplement lookup and interaction checks from free U.S. government health databases.
Project-URL: Homepage, https://meddata.anthesia.io
Project-URL: Documentation, https://meddata.anthesia.io/docs
Project-URL: Repository, https://github.com/anthesiallc/meddata-mcp
Author-email: Anthesia <support@anthesia.io>
License: MIT
License-File: LICENSE
Keywords: drug,fda,healthcare,interactions,mcp,model-context-protocol,openfda,pharmacy,rxnorm,supplement
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.2.0
Provides-Extra: http
Requires-Dist: uvicorn>=0.30.0; extra == 'http'
Description-Content-Type: text/markdown

# MedData MCP Server

mcp-name: io.github.anthesiallc/meddata

A [Model Context Protocol](https://modelcontextprotocol.io) server that exposes the
[MedData API](https://meddata.anthesia.io) as tools, so any MCP client (Claude
Desktop, Cursor, ChatGPT connectors, or an agent framework) can look up drug and
supplement data and check interactions conversationally.

It's a thin wrapper: each tool maps to one MedData REST endpoint. All the data
work happens in the API.

## Tools

| Tool | What it does |
|------|--------------|
| `search_drugs` | Search drugs by brand or generic name; returns RxCUI + details |
| `get_drug` | Full drug profile by RxCUI |
| `get_drug_by_ndc` | Drug profile by NDC package code |
| `search_supplements` | Search supplements by name; returns supplement IDs |
| `get_supplement` | Full supplement fact sheet by ID |
| `check_interactions` | Interactions across a mixed list of 2-10 drugs/supplements |
| `get_usage` | Current billing period usage and plan limit |

## Get an API key

Free tier is 250 calls/month, no credit card:

```bash
curl -X POST https://meddata.anthesia.io/api/v1/signup \
  -H 'Content-Type: application/json' \
  -d '{"email":"you@example.com"}'
```

The key comes back in the `api_key` field of the response.

## Install and run

The easiest way is with [uv](https://docs.astral.sh/uv/) (no manual venv needed):

```bash
# stdio transport (default — for Claude Desktop, Cursor, most local clients)
MEDDATA_API_KEY=md_your_key uvx meddata-mcp

# streamable-HTTP transport (for remote / web clients)
MEDDATA_API_KEY=md_your_key uvx meddata-mcp --http
```

Or install with pip into its own environment:

```bash
pip install meddata-mcp
MEDDATA_API_KEY=md_your_key meddata-mcp
```

> Note: install into a dedicated environment. The `mcp` SDK requires a newer
> `starlette` than the MedData API app pins, so the two will conflict if installed
> together.

Environment variables:

- `MEDDATA_API_KEY` (required) — your MedData API key.
- `MEDDATA_BASE_URL` (optional) — defaults to `https://meddata.anthesia.io`.
- `MEDDATA_TIMEOUT` (optional) — request timeout in seconds, default `30`.

## Client configuration

### Claude Desktop

Add to `claude_desktop_config.json` (Settings → Developer → Edit Config):

```json
{
  "mcpServers": {
    "meddata": {
      "command": "uvx",
      "args": ["meddata-mcp"],
      "env": { "MEDDATA_API_KEY": "md_your_key" }
    }
  }
}
```

### Cursor

Add the same block to `~/.cursor/mcp.json` (or the project `.cursor/mcp.json`).

## Develop from source

```bash
cd mcp_server
python -m venv .venv
.venv/Scripts/python -m pip install -e .   # Windows
# .venv/bin/pip install -e .                # macOS/Linux
MEDDATA_API_KEY=md_your_key .venv/Scripts/python -m meddata_mcp.server
```

## Notes

- Data is for informational purposes only and is not medical advice.
- Interaction data comes from established medical databases; an empty result
  means none were found in those sources, not that a combination is proven safe.
