deploying-openmed-mcp
하는 일
이 스킬은 OpenMed의 임상 텍스트 도구를 Claude Code나 Codex 같은 코딩 에이전트와 채팅 클라이언트에 노출하는 MCP 서버를 설정합니다. 어시스턴트가 비식별화와 개체 추출을 직접 호출하도록 하고 싶은 팀을 위한 스킬입니다.
사용하는 경우
- ✓Claude Code나 Codex가 OpenMed 비식별화나 개체 추출을 도구로 호출하게 하고 싶을 때.
- ✓stdio 또는 네트워크 연결을 통해 OpenMed MCP 서버를 실행해야 할 때.
- ✓팀이 공유하는 MCP 엔드포인트나 서버용 컨테이너가 필요할 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/deploying-openmed-mcp/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Claude Code에 OpenMed를 추가해서, 메모를 직접 비식별화해 달라고 요청할 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 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를 지원합니다.
자체 서비스에 쓰기에도 좋은가요?
자체 서비스에는 보통 MCP보다 REST API가 더 알맞습니다.
상세 정보
작성자의 원본 설명
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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
annotating-variants
5.8k에이전트가 유전 변이의 효과를 예측하고, HGVS 이름을 게놈 위치로 바꾸고, 무료 공개 주석 도구를 사용해 인구 빈도를 붙이도록 돕습니다.
ask-openmed
5.8k에이전트가 임상 텍스트 요청에 맞는 OpenMed 워크플로를 고르도록 돕되, 환자 데이터가 있을 수 있으면 먼저 개인 정보 확인을 거치게 합니다.
assembling-fhir-bundles
5.8k여러 FHIR 건강 기록을 EHR로 보낼 수 있도록 하나의 트랜잭션 Bundle로 묶고, 내부 참조를 올바르게 연결하도록 에이전트를 돕습니다.
auditing-deid-leakage
5.8k비식별화된 임상 텍스트에 남은 SSN, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.
비슷한 스킬
mcporter
394k에이전트가 HTTP나 stdio로 MCP 서버와 그 도구를 목록화하고, 호출하고, 점검하며, 로그인 설정을 관리하도록 돕습니다.
fastmcp
260kAPI, 데이터베이스, 파일에 AI 어시스턴트가 도구로 접근할 수 있도록 Python MCP 서버를 만들고 테스트하고 배포하도록 돕습니다.
mcp-oauth-remote-gateway
260kHermes가 서버에서 실행될 때 일반 브라우저 로그인이 닿지 않는 경우를 위해, 원격 MCP 서버의 OAuth 로그인을 단계별로 안내합니다.