Agent skill

Deploying Openmed MCP

by maziyarpanahi in maziyarpanahi/openmed

Run OpenMed's Model Context Protocol (MCP) server so coding agents (Claude Code, Codex) and chat clients can call clinical NER, PII extraction, and de-identification as tools, on-device.

Apache-2.0Auto-check passedAgent Workflows

Install Deploying Openmed MCP

skills CLI
$ npx skills add maziyarpanahi/openmed --skill deploying-openmed-mcp -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install maziyarpanahi/openmed deploying-openmed-mcp --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/deploying-openmed-mcp .claude/skills/deploying-openmed-mcp && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
deploying-openmed-mcp
GitHub stars
5.5k
Token cost
~1.9k tokens
SKILL.md length
655 words
Files
1
Skills in repo
74
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run OpenMed's Model Context Protocol (MCP) server so coding agents (Claude Code, Codex) and chat clients can call clinical NER, PII extraction, and de-identification as tools, on-device.

  • Works in 6 steps: Install + launch. pip install… → Configure the runtime via the… → Register with the client. Add the… → …
  • The user wants to add OpenMed to an agents MCP config
  • SKILL.md covers When to use this skill, Quick start, The 7 tools (confirmed in… and Adding it to a coding agent, plus 6 more sections
  • Calls python and pip

What it does

Deploying Openmed MCP is an agent skill from maziyarpanahi/openmed. Run OpenMed's Model Context Protocol (MCP) server so coding agents (Claude Code, Codex) and chat clients can call clinical NER, PII extraction, and de-identification as tools, on-device. Use when the user wants to add OpenMed to an agent's MCP config, expose de-id/NER as MCP tools, run an MCP server over stdio or Streamable HTTP, give Claude/Codex access to OpenMed, or containerize the MCP server. Covers the mcp extra, createmcpserver, the 7 tools (openmedanalyzetext, openmedextractpii, openmeddeidentify…

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol. The repository describes itself as: Local-first healthcare AI: clinical NER and HIPAA PII de-identification on hardware you control. 2,200+ medical models, 35 model-backed PII languages, and Python, MLX, Android… The licence is Apache-2.0.

When your agent uses it

  • The user wants to add OpenMed to an agents MCP config
  • Expose de-id/NER as MCP tools
  • Run an MCP server over stdio
  • Streamable HTTP

Example prompts

  • “/deploying-openmed-mcp”

Requirements

  • Python 3
  • Docker

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Install + launch. pip install "openmed[mcp]", then
  2. Configure the runtime via the ServiceRuntime env vars (profile,
  3. Register with the client. Add the mcpServers entry (stdio command, or
  4. Front HTTP with auth/TLS if remote — the server has none built in; keep
  5. Let the agent call tools (openmed_deidentify before sharing a snippet,
  6. Manage memory with openmed_loaded_models / openmed_unload_model.

What it can do on your machine

Read from SKILL.md and the folder at commit 34d7b8c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • modelcontextprotocol.io
    • docs.anthropic.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Deploying Openmed MCP loads about 1.9k tokens when it runs. Until then it costs about 189 tokens; SKILL.md has 655 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~189
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from maziyarpanahi/openmed at commit 34d7b8c, republished under its Apache-2.0 licence (© maziyarpanahi). 655 words, ~1,944 tokens.

Download SKILL.mdSave it as .claude/skills/deploying-openmed-mcp/SKILL.md (or your agent's skills folder).
name
deploying-openmed-mcp
description
Run OpenMed's Model Context Protocol (MCP) server so coding agents (Claude Code, Codex) and chat clients can call clinical NER, PII extraction, and de-identification as tools, on-device. Use when the user wants to add OpenMed to an agent's MCP config, expose de-id/NER as MCP tools, run an MCP server over stdio or Streamable HTTP, give Claude/Codex access to OpenMed, or containerize the MCP server. Covers the mcp extra, create_mcp_server, the 7 tools (openmed_analyze_text, openmed_extract_pii, openmed_deidentify, openmed_list_models, openmed_list_pii_languages, openmed_loaded_models, openmed_unload_model), the resources and prompts, stdio vs streamable-http transports, ServiceRuntime env config, and MCP client config snippets.
license
Apache-2.0
metadata.project
OpenMed
metadata.category
deployment-ops
metadata.pairs
adjacent
metadata.version
1.0

Deploying the OpenMed MCP server

openmed.mcp.server exposes OpenMed's clinical NLP as Model Context Protocol tools, so coding agents (Claude Code, Codex) and chat clients can de-identify and analyze clinical text by calling tools instead of writing glue code. It runs on-device — models are local, no telemetry — and the server instructs clients to send real PHI only to instances the user operates.

When to use this skill

When an agent or LLM client should be able to invoke OpenMed: add it to a coding agent's MCP config, give a chat client de-id/NER tools, or run a shared MCP endpoint for a team. For programmatic HTTP from your own services, prefer serving-openmed-rest-api; for corpora, batch-processing-clinical-text.

Quick start

bash
pip install "openmed[mcp]"                 # FastMCP / MCP SDK

# stdio transport (what coding agents spawn): default
python -m openmed.mcp.server

# Streamable HTTP transport (network-reachable):
python -m openmed.mcp.server --transport streamable-http --host 127.0.0.1 --port 8081
python
# Or embed it:
from openmed.mcp.server import create_mcp_server
server = create_mcp_server()              # FastMCP("OpenMed", ...) with tools+resources+prompts
server.run(transport="stdio")             # or "streamable-http"

CLI flags (build_arg_parser): --transport {stdio,streamable-http,http}, --host, --port, --streamable-http-path (default /mcp), --version. Env equivalents: OPENMED_MCP_TRANSPORT, OPENMED_MCP_HOST, OPENMED_MCP_PORT (8081), OPENMED_MCP_PATH.

The 7 tools (confirmed in openmed/mcp/server.py)

ToolWhat it doesKey args
openmed_analyze_textclinical NERtext, model_name (disease_detection_superclinical), confidence_threshold, group_entities, aggregation_strategy, sentence_*, keep_alive
openmed_extract_piidetect PII/PHI spanstext, model_name (default PII model), confidence_threshold (0.5), use_smart_merging, lang, normalize_accents
openmed_deidentifymask/remove/replace/hash/shift datestext, method (mask), confidence_threshold (0.7), keep_year, shift_dates, date_shift_days, keep_mapping, lang
openmed_list_modelslist registry modelscategory, pii_language, limit
openmed_list_pii_languagessupported PII languages + default models—
openmed_loaded_modelsresident-model status of the MCP runtime—
openmed_unload_modelfree one model or all inactive modelsmodel_name, all_models

It also registers resources — openmed://models, openmed://pii-languages, openmed://examples (synthetic) — and prompts openmed-clinical-ner and openmed-pii-deidentify that nudge the agent toward safe, correct calls.

Adding it to a coding agent

json
// Claude Code: .mcp.json (or ~/.claude.json) — stdio transport
{
  "mcpServers": {
    "openmed": {
      "command": "python",
      "args": ["-m", "openmed.mcp.server"],
      "env": { "OPENMED_PROFILE": "prod" }
    }
  }
}

For a shared HTTP deployment, run --transport streamable-http and point the client at http://<host>:8081/mcp. The agent then sees the 7 tools and can call e.g. openmed_deidentify on a snippet before sending it elsewhere.

Runtime config

The MCP server shares OpenMed's ServiceRuntime (ServiceRuntime.from_env()), so the same env vars as the REST service apply: OPENMED_PROFILE, OPENMED_SERVICE_PRELOAD_MODELS, OPENMED_SERVICE_KEEP_ALIVE, OPENMED_SERVICE_MAX_RESIDENT_MODELS. Preload to avoid first-call latency; openmed_unload_model/openmed_loaded_models let an agent manage memory.

Running in Docker

dockerfile
FROM python:3.11-slim
RUN pip install --no-cache-dir "openmed[mcp]"
ENV OPENMED_MCP_TRANSPORT=streamable-http \
    OPENMED_MCP_HOST=0.0.0.0 OPENMED_MCP_PORT=8081 \
    OPENMED_SERVICE_PRELOAD_MODELS="OpenMed/OpenMed-PII-SuperClinical-Small-44M-v1"
EXPOSE 8081
CMD ["python", "-m", "openmed.mcp.server"]

stdio servers are spawned by the client and don't need a port; use HTTP only for shared/remote access, behind your own auth proxy. Mount the model cache so the container starts offline.

Show full SKILL.md (313 more words)Show less

Workflow

  1. Install + launch. pip install "openmed[mcp]", then python -m openmed.mcp.server (stdio) or --transport streamable-http for a shared endpoint.
  2. Configure the runtime via the ServiceRuntime env vars (profile, preload, keep-alive, max resident) so first calls aren't cold.
  3. Register with the client. Add the mcpServers entry (stdio command, or HTTP URL) to the agent's config; the 7 tools, resources, and prompts appear.
  4. Front HTTP with auth/TLS if remote — the server has none built in; keep stdio/local for untrusted-network scenarios.
  5. Let the agent call tools (openmed_deidentify before sharing a snippet, openmed_analyze_text for NER), and discover models via openmed_list_models rather than hardcoding.
  6. Manage memory with openmed_loaded_models / openmed_unload_model.

Hand-off to / from OpenMed

  • Same engine: each tool calls openmed.analyze_text / extract_pii / deidentify through the shared runtime — identical results to the library and the REST service.
  • REST sibling: serving-openmed-rest-api exposes the same operations as HTTP routes for non-agent callers.
  • Discovery: openmed_list_models / openmed_list_pii_languages mirror the library's list_* functions — agents should query, not hardcode.

Edge cases & gotchas

  • stdio vs HTTP. Coding agents spawn the server over stdio (default) and manage its lifecycle; use streamable-http only for a shared endpoint, and put auth/TLS in front of it (the server has none built in).
  • PHI trust boundary. The server's instructions tell clients to send real PHI only to instances the user controls. Keep it local/self-hosted; don't point agents at an OpenMed MCP you don't operate.
  • keep_mapping=True returns a re-identification map in the openmed_deidentify response — only enable for trusted agents, treat the mapping as PHI, never log it.
  • No raw PHI in logs. Don't add transcript/body logging around the server.
  • Use synthetic examples in docs/tests/prompts — the bundled openmed://examples resource is synthetic on purpose.
  • --transport http is accepted as an alias for streamable-http.

Standards & references

© maziyarpanahi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/deploying-openmed-mcp of maziyarpanahi/openmed.

Open the folder on GitHubat commit 34d7b8c

Compare with similar skills

Deploying Openmed MCP next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Deploying Openmed MCP compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Deploying Openmed MCP this skillmaziyarpanahi/openmed5.5k—~1.9kAutomated safety check: PassApache-2.0
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k4 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official38k11 repos~3.1kAutomated safety check: PassApache-2.0
Crush Configurationcharmbracelet/crush29k—~3.7kAutomated safety check: PassCustom licence
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 4 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    38k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Crush Configuration

    charmbracelet/crush

    Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.

    29k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Migrates the compatible subset of settings and global file-based MCP servers from the Warp desktop app into Warp Agent CLI without exposing credentials or state.

    65k GitHub starsUsed in 1 repo~2.1k tokens
    Agent WorkflowsAuto-check passed

More from maziyarpanahi/openmed

All 74 skills in this repo
  • Checks OpenMed de-identified clinical text against the 18 HIPAA Safe Harbor identifier categories and reports gaps and residual re-identification risk.

    5.5k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • OpenMed Model Card Writer

    maziyarpanahi/openmed

    Fills in a model card for an OpenMed clinical NER or de-identification model from its evaluation reports: intended use, metrics, subgroups and limitations.

    5.5k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Walks a data pipeline against the HIPAA Privacy and Security Rule checklist and produces a gap report before it processes patient data.

    5.5k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • ICD-10 Coding Assistant

    maziyarpanahi/openmed

    Suggests candidate ICD-10-CM diagnosis and ICD-10-PCS procedure codes for clinical text extracted by OpenMed, with rationale for a certified coder to review.

    5.5k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • OpenMed ETL to OMOP CDM

    maziyarpanahi/openmed

    Maps OpenMed-extracted, terminology-coded conditions, drugs and measurements into OMOP CDM v5.4 tables for OHDSI and ATLAS analytics.

    5.5k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Extracting SDOH and Z-Codes

    maziyarpanahi/openmed

    Finds social risks such as housing instability or food insecurity in clinical notes and proposes matching ICD-10-CM Z-codes for a coder to confirm.

    5.5k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Categories

Questions about Deploying Openmed MCP

What does Deploying Openmed MCP do?

Run OpenMed's Model Context Protocol (MCP) server so coding agents (Claude Code, Codex) and chat clients can call clinical NER, PII extraction, and de-identification as tools, on-device. Deploying Openmed MCP is an agent skill from maziyarpanahi/openmed. Run OpenMed's Model Context Protocol (MCP) server so coding agents (Claude Code, Codex) and chat clients can call clinical NER, PII extraction, and de-identification as tools, on-device.

When should I use Deploying Openmed MCP?

Deploying Openmed MCP fits situations like: the user wants to add OpenMed to an agents MCP config; expose de-id/NER as MCP tools; run an MCP server over stdio; streamable HTTP.

How do I install Deploying Openmed MCP in Claude Code?

Run `npx skills add maziyarpanahi/openmed --skill deploying-openmed-mcp -a claude-code`. Or copy the skill folder (skills/deploying-openmed-mcp in maziyarpanahi/openmed) into .claude/skills/deploying-openmed-mcp in your project. Claude Code loads it when a task matches its description.

How do I install Deploying Openmed MCP in Codex?

Run `npx skills add maziyarpanahi/openmed --skill deploying-openmed-mcp -a codex`. Or copy the skill folder (skills/deploying-openmed-mcp in maziyarpanahi/openmed) into .agents/skills/deploying-openmed-mcp in your project. Codex loads it when a task matches its description.

Can I use Deploying Openmed MCP in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add maziyarpanahi/openmed --skill deploying-openmed-mcp -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/deploying-openmed-mcp, .gemini/skills/deploying-openmed-mcp, .github/skills/deploying-openmed-mcp and .opencode/skills/deploying-openmed-mcp in your project.

What does Deploying Openmed MCP need to run?

Going by SKILL.md and its folder, Deploying Openmed MCP needs the command-line tools its instructions call (python and pip). Our summary lists: Python 3; Docker.

Does Deploying Openmed MCP access the network?

SKILL.md names 2 domains. As links in the text: modelcontextprotocol.io and docs.anthropic.com. This is read from the text; nothing was executed.

Is Deploying Openmed MCP safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Deploying Openmed MCP use?

Deploying Openmed MCP is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Deploying Openmed MCP use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Deploying Openmed MCP?

Skills that share tags, products or a category with Deploying Openmed MCP: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 38k stars) and Crush Configuration (charmbracelet/crush, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Deploying Openmed MCP?

maziyarpanahi (a GitHub user) maintains it in maziyarpanahi/openmed, which has 5,506 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on October 11, 2026.

Source: maziyarpanahi/openmed on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.