mcpField
M
mcp-terminology

mcp-terminology

Local
github.com/pcmedsingeHealth0Updated 19w ago

About mcp-terminology

mcp-terminology is an MCP server for clinical terminology lookup and operations, intended for healthcare applications and agents. It queries public FHIR R4 terminology services across common coding systems.

Key features

  1. 01Look up codes and definitions
  2. 02Search LOINC, SNOMED CT, and RxNorm
  3. 03Translate codes between systems
  4. 04Expand canonical FHIR ValueSets

Use cases

  1. 01Check a clinical code’s display and definition
  2. 02Find terminology codes from free text
  3. 03Translate SNOMED codes to ICD-10-CM
  4. 04Retrieve the contents of a FHIR ValueSet

MCP support

Exposes terminology lookup, search, translation, and ValueSet expansion as tools to MCP clients. It uses tx.fhir.org/r4 as its backend.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"pcmedsinge-mcp-terminology": {
"command": "uvx",
"args": [
"mcp-terminology"
],
"env": {
"TERMINOLOGY_BASE_URL": "<TERMINOLOGY_BASE_URL>"
}
}
}
}
Run commanduvx mcp-terminology
Environment variables to set
TERMINOLOGY_BASE_URLBase URL of the FHIR terminology server (default: https://tx.fhir.org/r4)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimcp-terminology1.0.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

mcp-terminology

Unified LOINC / SNOMED CT / RxNorm / ICD-10 MCP server — v1.0.0 Part of the fhir-mcp-suite monorepo.

License Python

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

ToolDescriptionBackend operation
lookup_codeLook up a single code — returns display, definition, designationsCodeSystem/$lookup
search_codesFree-text search within LOINC, SNOMED CT, or RxNormValueSet/$expand?filter=
translate_codeTranslate a code across systems (SNOMED ↔ ICD-10-CM, etc.)ConceptMap/$translate
expand_valuesetExpand any canonical FHIR ValueSet by URLValueSet/$expand
Supported systems for lookup_code
AliasURI
loinchttp://loinc.org
snomed / snomed-cthttp://snomed.info/sct
rxnormhttp://www.nlm.nih.gov/research/umls/rxnorm
icd-10-cmhttp://hl7.org/fhir/sid/icd-10-cm
icd-10http://hl7.org/fhir/sid/icd-10
cvxhttp://hl7.org/fhir/sid/cvx
cpthttp://www.ama-assn.org/go/cpt
ndchttp://hl7.org/fhir/sid/ndc
ucumhttp://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.py for the full allowlist

License

Apache-2.0 — see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.