mcp-terminology
Unified LOINC / SNOMED CT / RxNorm / ICD-10 MCP server — v1.0.0 Part of the fhir-mcp-suite monorepo.
Query four major clinical terminology systems through a single MCP server backed by the free public FHIR R4 terminology server (tx.fhir.org/r4).
Tools
| Tool | Description | Backend operation |
|---|---|---|
lookup_code |
Look up a single code — returns display, definition, designations | CodeSystem/$lookup |
search_codes |
Free-text search within LOINC, SNOMED CT, or RxNorm | ValueSet/$expand?filter= |
translate_code |
Translate a code across systems (SNOMED ↔ ICD-10-CM, etc.) | ConceptMap/$translate |
expand_valueset |
Expand any canonical FHIR ValueSet by URL | ValueSet/$expand |
Supported systems for lookup_code
| Alias | URI |
|---|---|
loinc |
http://loinc.org |
snomed / snomed-ct |
http://snomed.info/sct |
rxnorm |
http://www.nlm.nih.gov/research/umls/rxnorm |
icd-10-cm |
http://hl7.org/fhir/sid/icd-10-cm |
icd-10 |
http://hl7.org/fhir/sid/icd-10 |
cvx |
http://hl7.org/fhir/sid/cvx |
cpt |
http://www.ama-assn.org/go/cpt |
ndc |
http://hl7.org/fhir/sid/ndc |
ucum |
http://unitsofmeasure.org |
Quick start
# Install into the monorepo workspace
uv sync --all-packages
# Run (stdio mode — for Claude Desktop)
uv run mcp-terminology
# Run with SSE transport (port 8001)
MCP_TRANSPORT=sse uv run mcp-terminology
Claude Desktop configuration
{
"mcpServers": {
"terminology": {
"command": "uv",
"args": [
"--directory",
"/path/to/fhir-mcp-suite",
"run",
"mcp-terminology"
],
"env": {
"TERMINOLOGY_BASE_URL": "https://tx.fhir.org/r4",
"LOG_LEVEL": "WARNING"
}
}
}
}
Example tool calls
Look up a LOINC code
{ "system": "loinc", "code": "8302-2" }
{
"system_url": "http://loinc.org",
"system_name": "LOINC",
"code": "8302-2",
"display": "Body height",
"definition": "...",
"designations": [...],
"version": "2.78"
}
Translate SNOMED → ICD-10-CM
{
"code": "73211009",
"source_system": "snomed",
"target_system": "icd-10-cm"
}
Expand a ValueSet
{ "url": "http://hl7.org/fhir/ValueSet/administrative-gender" }
Architecture
Claude Desktop / LangGraph agent
│ MCP stdio
mcp-terminology (this package)
│ HTTPS
tx.fhir.org/r4 (free public FHIR R4 terminology server)
└── CodeSystem/$lookup
└── ValueSet/$expand
└── ConceptMap/$translate
Observability: every tool call is traced in LangFuse (input, output, latency, response bytes).
Set LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY / LANGFUSE_HOST to enable.
Eval results
mcp-terminology eval — 21 golden cases
Error/security cases: 6/6 100% (network-independent)
Integration cases: run with `--tags lookup search translate expand`
CI threshold: 85% pass rate
Run locally:
# Error cases only (no network needed):
uv run python evals/mcp-terminology/run_eval.py --tags error
# Full suite (requires tx.fhir.org):
uv run python evals/mcp-terminology/run_eval.py
# CI gate:
uv run python evals/mcp-terminology/run_eval.py --ci --threshold 0.85
Security
- Input sanitization on all parameters (regex allowlist on codes, http/https-only URLs, control-char stripping on filters)
- Hard cap of 100 results per query
- No PHI — uses only synthetic/public code lookups
- See
validation.pyfor the full allowlist
License
Apache-2.0 — see LICENSE.
Metadata
Release files for mcp-terminology 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_terminology-1.0.0.tar.gz | 12.2 kB | With provenance | Details for mcp_terminology-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_terminology-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_terminology-1.0.0-py3-none-any.whl |
Total release size: 28.3 kB
Release files / mcp_terminology-1.0.0.tar.gz
| Download URL | mcp_terminology-1.0.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc9b3b2a200bc9608f72976ed96037b2ecd82ac1bbe0ab762906ac1b16d4a08a
|
|
BLAKE2b-256 checksum How to use checksums |
ca4b2288230b702e9512ce02e80ea788158e7ed32ec53b4053727d3b7d3413c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 20, 2026.
Transparency logRelease files / mcp_terminology-1.0.0-py3-none-any.whl
| Download URL | mcp_terminology-1.0.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6177cbc339d200877dc29fd8641be3faff87ed3739764f3f4b0e8417ee2feaf7
|
|
BLAKE2b-256 checksum How to use checksums |
435fe906b9e14c759224728afcdff4b732420b3d6a80e0428bc45dd6ae75032e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 20, 2026.
Transparency logSecurity for mcp-terminology 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mcp_terminology-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.