Metadata-Version: 2.4
Name: pharmguide-mcp
Version: 0.3.0
Summary: MCP server for Omiclamp: cited pharmacogenomic guideline evidence and graded nutrigenomics, as an educational reference.
Project-URL: Homepage, https://www.omiclamp.com
Project-URL: Documentation, https://www.omiclamp.com/developers
Keywords: mcp,pharmacogenomics,pgx,nutrigenomics,cpic,omiclamp
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: mcp<2,>=1.2
Requires-Dist: pydantic>=2.0
Requires-Dist: PyYAML>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"

# pharmguide-mcp

An MCP server that gives Claude and other AI agents the evidence behind [Omiclamp](https://www.omiclamp.com):

- **Pharmacogenomics (PGx):** what published guideline bodies (CPIC, DPWG, the FDA, Health Canada, ClinPGx, with PharmGKB shown verbatim) say about how a person's genes affect a medication. Every evidence row carries its source, citation, link and date.
- **Nutrigenomics (NGX):** ten gene-diet topics graded for scientific validity against the Grimaldi et al. 2017 framework, with failed replications and guideline dissent surfaced as conflicts.

It runs on your machine. Nothing you ask it, including a genotype, is sent anywhere. The engine and its compiled data ship inside the package, so the answers match www.omiclamp.com for the same build.

## Use it for what it is

This is an **educational reference, not medical or dietary advice and not clinical decision support.** It reports and contrasts what sources say; it does not tell anyone what to take.

- Do not use it to make or automate prescribing, dosing or dietary decisions for a particular person.
- Keep the `educational_disclaimer` (or `disclaimer`) and the sources attached to anything you show from a response.
- Cite the guideline body on each row, not this server, and honour its licence: CPIC is CC BY 4.0; DPWG, ClinPGx and PharmGKB are CC BY-SA 4.0 (share-alike; PharmGKB verbatim only); FDA tables are US public domain. `describe_capabilities` returns the full table.
- Every response carries `provenance` with the compile date. Say how current the data is.

## Install

Needs [uv](https://docs.astral.sh/uv/). Nothing else to install: `uvx` fetches the package on first run.

**Claude Code**

```bash
claude mcp add omiclamp -- uvx pharmguide-mcp
```

**Claude Desktop and other MCP clients**

```json
{
  "mcpServers": {
    "omiclamp": {
      "command": "uvx",
      "args": ["pharmguide-mcp"]
    }
  }
}
```

## Tools

| Tool | What it returns |
|---|---|
| `describe_capabilities` | Call first. Coverage, the meaning of every coded field, source licences and how to cite. |
| `lookup_drug` | A drug (generic or brand) with its guideline stance, per-source cited evidence, source agreement, conflicts and jurisdictions. |
| `lookup_pair` | One gene and one drug: the evidence rows for that gene, plus the drug's conflicts. |
| `translate_genotype` | A star-allele genotype (for example `{"CYP2C19": "*1/*2"}`) to its CPIC phenotype, from CPIC's diplotype tables. |
| `list_catalog` | Every queryable drug name, generic and brand. |
| `ngx_list_topics` | The graded nutrigenomics topics: gene, claim, grade, actionability. |
| `ngx_lookup_topic` | One topic's full assessment: grade, conflicts, evidence and references. |

## Develop

From a checkout of the Omiclamp repository:

```bash
cd pharmguide-mcp
PYTHONPATH=..:. python -m pytest -q        # includes parity with every record the site serves
PYTHONPATH=..:. python -m pharmguide_mcp.server
./build.sh                                  # wheel + sdist into dist/, engine and data bundled
```

The server only registers tools and framing (`server.py`); `tools.py` delegates to the `pharmguide.signal` engine and reshapes its output, with no clinical logic of its own. NGX is served from the YAMLs in `ngx_data/`, kept identical to `pharmguide-web/ngx-evidence/`.

## Release

Bump `version` in `pyproject.toml`, merge, then push a matching tag: `git tag mcp-v0.3.0 && git push origin mcp-v0.3.0`. The `Publish MCP server` workflow tests, builds and publishes to PyPI. Rebuild and release whenever the compiled data changes, or installed copies keep serving the old evidence.
