Skills

Deploying Openmed MCP

Run OpenMed's Model Context Protocol (MCP) server so coding agents (Claude Code, Codex)...

Install

npx skills add maziyarpanahi/openmed --skill deploying-openmed-mcp -g -a claude-code -y
Repository
maziyarpanahi/openmed5.8k
Category
AI and agents
Updated
4d ago
License
Apache-2.0
Context cost
Mediumabout 1,719 tokens
Runs scripts
No, instructions only

What it does

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.

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

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
# 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)

Read the whole SKILL.md on GitHub

More in AI and agents