deploying-openmed-mcp
यह क्या करती है
यह स्किल एक MCP सर्वर सेट अप करती है, जो OpenMed के क्लिनिकल टेक्स्ट टूल को Claude Code या Codex जैसे कोडिंग एजेंट्स और चैट क्लाइंट्स के लिए उपलब्ध कराता है। यह उन टीमों के लिए है जो चाहती हैं कि उनका सहायक डी-आइडेंटिफ़िकेशन और एंटिटी निष्कर्षण सीधे कॉल कर सके।
कब इस्तेमाल करें
- ✓जब आप चाहते हैं कि Claude Code या Codex OpenMed के डी-आइडेंटिफ़िकेशन या एंटिटी निष्कर्षण को टूल के रूप में कॉल करें।
- ✓जब आपको OpenMed MCP सर्वर को stdio या नेटवर्क कनेक्शन पर चलाना हो।
- ✓जब आपकी टीम को साझा MCP एंडपॉइंट या सर्वर के लिए कंटेनर चाहिए।
Skill का लिंक
https://github.com/maziyarpanahi/openmed/blob/master/skills/deploying-openmed-mcp/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Claude Code सेटअप में OpenMed जोड़िए, ताकि मैं सीधे उससे कोई नोट डी-आइडेंटिफ़ाई करने को कह सकूँ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट MCP एक्स्ट्रा इंस्टॉल करता है, सही ट्रांसपोर्ट के साथ सर्वर शुरू करता है, और उसे क्लाइंट की सेटिंग्स में जोड़ता है ताकि टूल डिवाइस पर उपलब्ध हों।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
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)
| Tool | What it does | Key args |
|---|---|---|
openmed_analyze_text |
clinical NER | text, model_name (disease_detection_superclinical), confidence_threshold, group_entities, aggregation_strategy, sentence_*, keep_alive |
openmed_extract_pii |
detect PII/PHI spans | text, model_name (default PII model), confidence_threshold (0.5), use_smart_merging, lang, normalize_accents |
openmed_deidentify |
mask/remove/replace/hash/shift dates | text, method (mask), confidence_threshold (0.7), keep_year, shift_dates, date_shift_days, keep_mapping, lang |
openmed_list_models |
list registry models | category, pii_language, limit |
openmed_list_pii_languages |
supported PII languages + default models | — |
openmed_loaded_models |
resident-model status of the MCP runtime | — |
openmed_unload_model |
free one model or all inactive models | model_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
// 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
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.
Workflow
- Install + launch.
pip install "openmed[mcp]", thenpython -m openmed.mcp.server(stdio) or--transport streamable-httpfor a shared endpoint. - Configure the runtime via the
ServiceRuntimeenv vars (profile, preload, keep-alive, max res
अक्सर पूछे जाने वाले सवाल
क्या यह मरीज़ का डेटा क्लाउड पर भेजती है?
मॉडल डिवाइस पर चलते हैं। स्किल सलाह देती है कि असली मरीज़ का डेटा केवल उन्हीं इंस्टेंस पर भेजें जिन्हें आप चलाते हैं।
कौन-से ट्रांसपोर्ट सपोर्ट होते हैं?
सर्वर stdio सपोर्ट करता है, जिसे कोडिंग एजेंट आम तौर पर शुरू करते हैं, और नेटवर्क एक्सेस के लिए Streamable HTTP।
क्या यह मेरी अपनी सेवाओं के लिए है?
अपनी सेवाओं के लिए आमतौर पर REST API MCP से बेहतर विकल्प है।
जानकारी
लेखक का मूल विवरण
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_un
repo: maziyarpanahi/openmed
लोकप्रियता
- GitHub स्टार
- 5.8k
- रैंकिंग में स्थान
- #14691
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
annotating-variants
5.8kआपके एजेंट को मुफ़्त सार्वजनिक एनोटेटर से जेनेटिक वेरिएंट का असर बताने, HGVS नामों को जीनोम पोज़िशन में बदलने और जनसंख्या आवृत्ति जोड़ने में मदद करती है।
ask-openmed
5.8kआपके एजेंट को क्लिनिकल टेक्स्ट अनुरोध के लिए सही OpenMed वर्कफ़्लो चुनने में मदद करती है, जहाँ मरीज़ का डेटा हो सकता है वहाँ पहले गोपनीयता जाँच से शुरू करके।
assembling-fhir-bundles
5.8kकई FHIR स्वास्थ्य रिकॉर्ड को एक ट्रांज़ैक्शन Bundle में पैक करती है, जो EHR को भेजने के लिए तैयार हो और आंतरिक संदर्भ सही जुड़े हों।
auditing-deid-leakage
5.8kडी-आइडेंटिफ़ाइड क्लिनिकल टेक्स्ट में बचे पहचानकर्ता जैसे SSN, कार्ड नंबर, ईमेल और तारीखें खोजती है, और कुछ बचा हो तो रिलीज़ रोक देती है।
मिलती-जुलती skills
mcporter
394kयह आपके एजेंट को HTTP या stdio पर MCP सर्वर और उनके टूल सूचीबद्ध करने, चलाने और जांचने देती है, और उनकी साइन-इन सेटिंग्स प्रबंधित करती है।
fastmcp
260kआपको Python में MCP सर्वर बनाने, जाँचने और तैनात करने में मदद करती है, जो AI सहायकों को आपके API, डेटाबेस या फ़ाइलों तक टूल के रूप में पहुँच देता है।
mcp-oauth-remote-gateway
260kजब Hermes किसी सर्वर पर चलता है, तो रिमोट MCP सर्वर के लिए OAuth साइन-इन हाथ से करने में मदद करती है, जहाँ सामान्य ब्राउज़र साइन-इन नहीं पहुँच पाता।