phenoforge

phenoforge

Enables semantic retrieval and assembly of ICD-10-CM value sets from natural language descriptions for clinical cohort definitions.

Category
Visit Server

README

phenoforge

Semantic value set assembly for clinical cohort definitions, over MCP.

Status: in development. Nothing works yet.

What it does

Turns a plain-English patient population description into a defensible set of ICD-10-CM codes, where every code carries provenance — whether it came from a peer-reviewed phenotype definition, from hierarchy expansion, or from semantic retrieval that a human should check.

"adults with type 2 diabetes and diabetic nephropathy"
  → checks OHDSI Phenotype Library for a validated definition
  → expands seed concepts through the ICD-10-CM hierarchy
  → returns a ConceptSet with per-code provenance and citations

Why not an existing terminology server

Several good MCP terminology servers exist. They solve lookup — "what is code X", "map X to Y". This solves set assembly, which is the actual task in cohort definition. It also covers US ICD-10-CM, which the existing servers do not, and uses semantic retrieval rather than proxied keyword search, which fails when a population description and a code description share no vocabulary.

See DESIGN.md for the full rationale.

Architecture

Three layers — a retrieval engine, a thin MCP server, and a LangGraph agent. The MCP server and the agent are independent consumers of the same engine.

Roadmap

  • [ ] v0.1 — vocabulary layer. Athena loader, DuckDB schema, hierarchy queries
  • [ ] v0.2 — retrieval. BioLORD-2023 embeddings, LanceDB index, BM25, hybrid scoring
  • [ ] v0.3 — expansion + provenance. ConceptSet model, descendant expansion, OHDSI PL matching
  • [ ] v0.4 — MCP server. stdio transport, four tools, Claude Desktop config
  • [ ] v0.5 — eval harness. Ontology-aware metrics, curated sets as ground truth
  • [ ] v0.6 — encoder benchmark. BioLORD vs SapBERT vs MedCPT vs general-purpose
  • [ ] v0.7 — LangGraph agent. Tiered trust routing, HITL confirmation gate
  • [ ] v1.0 — packaging. PyPI, docs, validation and limitations section

Deferred: literature-derived phenotype algorithms (published tier), RxNorm and LOINC domains, temporal cohort logic, hosted HTTP transport.

Tools (planned)

Tool Purpose
search_concepts Semantic + lexical search over ICD-10-CM
expand_value_set Seed codes → full descendant expansion with hierarchy provenance
find_curated_definition Search OHDSI Phenotype Library before generating anything
explain_inclusion Why is this code in this set, via which path, with what evidence

License

Apache 2.0. Vocabulary content carries its own terms — see DESIGN.md.

Not a clinical decision tool

This produces code sets for research and analytics. It does not make clinical determinations and has not been validated for patient care.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured