OOREP MCP服务器
](https://www.npmjs.com/package/oorep-mcp)       ](https://github.com/Dhi13man/oorep-mcp/network/members) ](https://github.com/Dhi13man/oorep-mcp/stargazers) 

模型上下文协议服务器(和客户端SDK)为AI助手提供访问OOREP的权限,OOREP是一个全面的顺势疗法储备和药物数据库。
太长,读不下去了
# Install and run (no setup required)
npx oorep-mcp// Or use programmatically
import { createOOREPClient } from 'oorep-mcp';
const client = createOOREPClient();
const results = await client.searchRepertory({ symptom: 'headache worse motion' });
console.log(results.rubrics);
client.destroy();问你的AI助手: *“在OOREP上搜索治疗因光线而加重的悸动性头痛的药物”*
OOREP是什么?
OOREP(开放在线汇编) 是一个开源顺势疗法数据库,包含:
- 12+汇编 -症状的系统指数映射到补救措施(Kent、Boger、Boericke等)
- 多种药物 -详细的治疗说明和治疗适应症
- 600+补救措施 -包含名称、缩写和替代词的综合补救数据库
顺势疗法数据的结构
graph TB
subgraph Repertory[Repertory Structure]
Chapter[Chapter
e.g. Head]
Rubric[Rubric
e.g. Pain - Throbbing]
R1[Belladonna - 4]
R2[Glonoine - 3]
R3[Natrum mur - 2]
Chapter --> Rubric
Rubric --> R1
Rubric --> R2
Rubric --> R3
end
subgraph MateriaMedica[Materia Medica Structure]
Remedy[Remedy
e.g. Belladonna]
S1[Mind: Sudden onset...]
S2[Head: Throbbing pain...]
S3[...]
Remedy --> S1
Remedy --> S2
Remedy --> S3
end此MCP服务器使AI助手能够以编程方式查询此数据。
特性
| 特性 | 描述 |
|---|---|
| 搜索汇编 | 在12个以上的剧目中查询症状,获得与加权补救措施相匹配的量规 |
| 搜索药物 | 从多个来源查找补救措施描述和指示 |
| 补救信息 | 获取600多种补救措施的全面详细信息 |
| 列出资源 | 浏览可用的剧目、药物和疗法 |
| 引导式工作流程 | 症状分析、药物比较、病例重复提示 |
| 结构化响应 | MCP 2025-06-18符合输出模式和结构化内容 |
| 演出 | 内置缓存(5分钟TTL),请求重复数据删除,自动重试 |
| 类型安全 | 对所有输入进行Zod验证的完整TypeScript |
| 安全 | 输入净化、错误消息净化、无需凭据 |
| SDK适配器 | 与OpenAI、Vercel AI SDK、LangChain、Google Gemini直接集成 |
快速开始
1.添加到克劳德桌面
macOS: 编辑 ~/Library/Application Support/Claude/claude_desktop_config.json 窗户: 编辑 %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"oorep": {
"command": "npx",
"args": ["-y", "oorep-mcp"]
}
}
}2.重新启动克劳德桌面
完全退出(Cmd+Q/Alt+F4),然后重新打开。
3.开始使用
你: “在OOREP中搜索夜间头痛加重的补救措施”
克劳德将:
- 呼叫
search_repertory症状“头痛加重” - 返回带有补救措施及其权重的匹配量规
- 结合上下文解释结果
安装
NPX(推荐)
无需安装:
npx oorep-mcpnpm Global
npm install -g oorep-mcp
oorep-mcpnpm Local(用于SDK使用)
npm install oorep-mcp平台配置
克劳德代码
选项A:CLI
claude mcp add oorep -- npx -y oorep-mcp选项B:配置文件(~/.claude.json)
{
"mcpServers": {
"oorep": {
"command": "npx",
"args": ["-y", "oorep-mcp"],
"env": {
"OOREP_MCP_BASE_URL": "https://www.oorep.com",
"OOREP_MCP_LOG_LEVEL": "info"
}
}
}
}验证:运行 /mcp 克劳德代码
克劳德桌面
配置位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗户:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"oorep": {
"command": "npx",
"args": ["-y", "oorep-mcp"],
"env": {
"OOREP_MCP_BASE_URL": "https://www.oorep.com",
"OOREP_MCP_LOG_LEVEL": "info"
}
}
}
}重要提示: 完全退出(Cmd+Q),而不仅仅是关闭窗口。
Codex CLI
配置: ~/.codex/config.toml (macOS/Linux)或 C:\Users\\.codex\config.toml (Windows)
[mcp_servers.oorep]
command = "npx"
args = ["-y", "oorep-mcp"]
startup_timeout_sec = 15.0
tool_timeout_sec = 60.0
[mcp_servers.oorep.env]
OOREP_MCP_BASE_URL = "https://www.oorep.com"
OOREP_MCP_LOG_LEVEL = "info"或者通过CLI:
codex mcp add oorep --env OOREP_MCP_BASE_URL=https://www.oorep.com --env OOREP_MCP_LOG_LEVEL=info -- npx -y oorep-mcp验证:运行 codex mcp list
双子星命令行工具
配置: ~/.gemini/settings.json
{
"mcpServers": {
"oorep": {
"command": "npx",
"args": ["-y", "oorep-mcp"],
"env": {
"OOREP_MCP_BASE_URL": "https://www.oorep.com",
"OOREP_MCP_LOG_LEVEL": "info"
},
"timeout": 30000
}
}
}使用示例
安装后,您可以通过Claude自然地与OOREP交互:
寻找补救措施
你: “你能在OOREP上搜索夜间头痛更严重的治疗方法吗?”
克劳德将:
- 使用
search_repertory工具 - 在默认曲目中搜索“头痛更严重的夜晚”
- 返回带有补救建议及其权重的匹配量规
获取详细的补救信息
你: “告诉我更多关于Aconite的信息——它用于什么条件?”
克劳德将:
- 使用
get_remedy_info获取Aconite详细信息的工具 - 提供有关其常见用途、特征和治疗应用的信息
比较补救措施
你: “比较乌头和颠茄的发热症状”
克劳德将:
- 使用
remedy-comparison提示 - 在药物中搜索这两种疗法
- 提供并排比较,重点关注发烧症状
- 突出关键差异化因素
案例汇编
你: “我想重复一个有这些症状的病例:焦虑、心悸和失眠”
克劳德将:
- 使用
repertorization-workflow提示 - 指导您进行系统的症状分析
- 搜索每个症状的相关评价标准
- 帮助综合结果,以确定适合的补救措施
浏览可用资源
你: “OOREP中有哪些剧目?”
克劳德将:
- 使用
list_available_repertories工具 - 显示所有12个以上可用曲目及其名称和描述
API 参考
工具
search_repertory
在顺势疗法药物中寻找症状。
参数:
| 名称 | 类型 | 必填 | 默认 | 描述 |
|---|---|---|---|---|
symptom | string | 是 | - | 要搜索的症状(3-200个字符)。支持通配符。 |
repertory | string | 否 | publicum | 汇编缩写(例如。, kent, boger) |
minWeight | 编号 | 否 | 1 | 最小补救重量(1-4) |
maxResults | 编号 | 否 | 20 | 最多可返回的评分标准(1-100) |
includeRemedyStats | boolean | 否 | true | 包括汇总的补救统计数据 |
退货:
{
totalResults: number;
rubrics: Array Pain > Throbbing"
text: string | null; // Additional rubric text
repertory: string; // Repertory abbreviation
remedies: Array;
}>;
remedyStats?: Array;
}search_materia_medica
在药物文本中搜索药物描述。
参数:
| 名称 | 类型 | 必填 | 默认 | 描述 |
|---|---|---|---|---|
symptom | string | 是 | - | 要搜索的症状(3-200个字符) |
materiamedica | string | 否 | boericke | 药物缩写 |
remedy | string | 否 | - | 筛选到特定补救措施 |
maxResults | 编号 | 否 | 10 | 最大结果(1-50) |
退货:
{
totalResults: number;
results: Array;
}>;
}get_remedy_info
获取有关特定补救措施的详细信息。
参数:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
remedy | string | 是 | 补救措施名称、缩写或备用名称(1-100个字符) |
退货:
{
id: number;
nameAbbrev: string; // "Acon."
nameLong: string; // "Aconitum napellus"
namealt: string[]; // ["Aconite", "Monkshood"]
} | null // null if not found匹配行为:
- 缩写、长名称或备用名称完全匹配(不区分大小写)
- 查询部分匹配≥3个字符
list_available_repertories
列出所有可访问的曲目。
参数:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
language | string | 否 | 按语言代码过滤(例如。, en, de) |
退货:
Arraylist_available_materia_medicas
列出所有可访问的药物文本。
参数:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
language | string | 否 | 按语言代码筛选 |
退货:
Array结构化响应格式
所有工具均支持MCP 2025-06-18规范,并具有结构化响应:
响应结构:
{
// Text content for backwards compatibility
content: [{
type: 'text',
text: '{"totalResults": 42, "rubrics": [...]}' // JSON string
}],
// Machine-parseable structured content
structuredContent: {
totalResults: 42,
rubrics: [...] // Actual JavaScript object
}
}优点:
- 输出方案:每个工具定义都包含一个定义预期输出结构的JSON模式
- 结构化内容:无需JSON解析即可直接访问键入的结果
- 向后兼容的:始终为老客户提供文本内容
- 错误处理:返回错误
isError: true用于LLM自校正
资源
| URI | 描述 | 内容类型 |
|---|---|---|
oorep://remedies/list | 所有600+补救措施的完整列表 | JSON |
oorep://repertories/list | 所有可用的带有元数据的曲目 | JSON |
oorep://materia-medicas/list | 所有可用的药物 | JSON |
oorep://help/search-syntax | 带示例的搜索语法指南 | 文本 |
提示
analyze-symptoms
系统症状分析的指导工作流程。
论据:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
symptom_description | string | 否 | 初始症状描述 |
工作流程: 通过症状收集提供指导→ 模态分析→ 曲目检索→ 合成
remedy-comparison
并排比较多种补救措施。
论据:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
remedies | string | 是 | 逗号分隔的补救措施名称(2-6种补救措施) |
例子: remedies: "Aconite, Belladonna, Gelsemium"
repertorization-workflow
一步一步地进行案例分析和重复。
工作流程: 从症状收集到辨证施治的7步过程。
搜索语法
基本搜索
headache # Simple term
headache night # Multiple terms (AND)通配符
head* # Matches: head, headache, heading
*ache # Matches: headache, stomachache精确短语
"worse at night" # Exact phrase match
"throbbing pain" # Must appear together除外条款
headache -migraine # Headache but not migraine
fever -intermittent # Fever excluding intermittent组合的
head* pain -chronic "worse motion"提示
- 每学期至少3个字符
- 通配符仅在单词边界处
- 使用特定于剧目的术语以获得更好的结果
SDK集成
有关AI框架的程序化使用,请参阅 SDK集成指南.
支持的框架: OpenAI、Vercel AI SDK、LangChain/LangGraph、谷歌Gemini
快速示例:
import { createOOREPClient } from 'oorep-mcp';
const client = createOOREPClient();
const results = await client.searchRepertory({ symptom: 'headache worse motion' });
console.log(results.rubrics);
client.destroy();配置
所有通过环境变量进行的配置:
| 变量 | 默认值 | 描述 | |||
|---|---|---|---|---|---|
OOREP_MCP_BASE_URL | https://www.oorep.com | ooredo API基础URL | |||
OOREP_MCP_TIMEOUT_MS | 30000 | 请求超时(ms) | |||
OOREP_MCP_CACHE_TTL_MS | 300000 | 缓存TTL(ms),0表示禁用 | |||
OOREP_MCP_MAX_RESULTS | 100 | 最大结果上限 | |||
OOREP_MCP_LOG_LEVEL | info | debug | info | warn | error |
OOREP_MCP_DEFAULT_REPERTORY | publicum | 默认曲目 | |||
OOREP_MCP_DEFAULT_MATERIA_MEDICA | boericke | 默认药物 | |||
OOREP_MCP_REMOTE_USER | *(未设置)* | 如果设置,则发送 X-Remote-User 所有上游请求的标头(数字成员ID) |
MCP服务器自动维护匿名OOREP会话。它执行一个轻量级的引导请求来获取所需的Cookie,并在后续的搜索调用中重用它们,因此不需要对公共数据进行额外的身份验证设置。
自定义配置示例:
{
"mcpServers": {
"oorep": {
"command": "npx",
"args": ["-y", "oorep-mcp"],
"env": {
"OOREP_MCP_TIMEOUT_MS": "60000",
"OOREP_MCP_CACHE_TTL_MS": "600000",
"OOREP_MCP_LOG_LEVEL": "debug"
}
}
}
}建筑
graph TB
subgraph Client[MCP Client]
MCPClient((Claude, Codex,
Gemini, etc.))
end
subgraph Server[OOREP MCP Server]
Tools[Tools]
Resources[Resources]
Prompts[Prompts]
SDK[SDK]
subgraph SDKClient[OOREPClient]
Cache[(Cache)]
Dedup[Deduplicator]
Validators[Validators]
end
subgraph HTTPClient[OOREPClient - HTTP]
Session[Session mgmt]
Retry[Retry logic]
Timeout[Timeout handling]
end
Tools --> SDKClient
Resources --> SDKClient
Prompts --> SDKClient
SDK --> SDKClient
SDKClient --> HTTPClient
end
subgraph External[OOREP API]
API[https://www.oorep.com]
end
MCPClient -->|MCP Protocol| Server
HTTPClient -->|HTTPS| API关键部件:
- 缓存:具有可配置TTL的内存LRU缓存(默认5分钟)
- 除尘器:防止对同一数据的重复并发请求
- 验证器:Zod架构在API调用之前验证所有输入
- 会话管理:OOREP API的自动cookie处理
安全注意事项
输入验证
所有输入都使用Zod模式进行验证:
- 症状搜索:3-200个字符,去掉空格
- 补救措施名称:1-100个字符
- 服务器端清理:OOREP API处理额外的输入清理
错误处理
- 所有错误在返回给客户端之前都会被清理干净
- 内部细节(堆栈跟踪、文件路径)永远不会公开
- 网络错误返回通用消息
数据隐私
- 不存储或不需要用户凭据
- OOREP会话是匿名的,基于cookie
- 没有数据被持久化到磁盘(仅内存缓存)
- 使用Zod模式验证所有输入
- 错误在返回给客户之前会被清除
速率限制
OOREP MCP服务器未实现内部速率限制。然而:
API限值
上游OOREP API可能有速率限制。如果你超过了它们,你会得到一个 RateLimitError:
{
content: [{ type: 'text', text: 'Error: Rate limit exceeded. Please try again later.' }],
isError: true
}缓解策略
- 启用缓存 (默认值:5分钟TTL)
"env": { "OOREP_MCP_CACHE_TTL_MS": "300000" }- 减少并发请求 通过使用特定的搜索词
- 增加缓存TTL 用于频繁访问的数据
"env": { "OOREP_MCP_CACHE_TTL_MS": "600000" }请求重复数据删除
SDK客户端自动消除并发相同请求的重复数据,从而减少API负载。
TypeScript类型导入
直接从包中导入类型以进行类型安全开发:
import type {
// Tool argument types
SearchRepertoryArgs,
SearchMateriaMedicaArgs,
GetRemedyInfoArgs,
ListRepertoriesArgs,
ListMateriaMedicasArgs,
// Result types
RepertorySearchResult,
MateriaMedicaSearchResult,
RemedyInfo,
RepertoryMetadata,
MateriaMedicaMetadata,
// Supporting types
Rubric,
Remedy,
MateriaMedicaResult,
MateriaMedicaSection,
// SDK Client types
OOREPClient,
OOREPSDKConfig,
} from 'oorep-mcp';架构验证
您还可以导入Zod模式进行运行时验证:
import {
SearchRepertoryArgsSchema,
RepertorySearchResultSchema,
RemedyInfoSchema,
} from 'oorep-mcp';
// Validate external data
const validated = SearchRepertoryArgsSchema.parse(untrustedInput);故障排除
服务器未出现在Claude桌面中
问题: 配置后MCP指示灯不显示。
解决:
- 完全退出克劳德桌面 (macOS上的Cmd+Q,而不仅仅是关闭窗口)
- 重新启动克劳德桌面 等待10-15秒进行MCP初始化
- 检查配置文件 获取有效的JSON语法(使用JSON验证器)
- 检查日志:
- macOS: ~/Library/Logs/Claude/mcp*.log - 窗户: %APPDATA%\Claude\Logs\mcp*.log
- 验证npx是否正常工作: 跑
npx -y oorep-mcp在终端中检查它是否启动
连接超时错误
问题: “连接超时”或“请求超时”错误。
解决:
- 增加超时时间 在配置中:
"env": {
"OOREP_MCP_TIMEOUT_MS": "60000"
}- 检查网络连接 到 :
curl https://www.oorep.com- 检查防火墙/代理问题 这可能会阻止连接
未返回任何结果
问题: 搜索返回空结果或“未找到结果”。
解决:
- 尝试更广泛的搜索词 (例如,“头痛”而不是“下午3点头痛更严重”)
- 移除过滤器 喜欢
minWeight或特定的曲目限制 - 检查OOREP网站是否可访问 在
- 尝试不同的曲目:
问克劳德: “在肯特剧目中搜索”
内存使用率高
问题: MCP服务器占用过多内存。
解决:
- 减少缓存TTL 要更频繁地清除缓存,请执行以下操作:
"env": {
"OOREP_MCP_CACHE_TTL_MS": "60000"
}- 减少最大结果:
"env": {
"OOREP_MCP_MAX_RESULTS": "50"
}- 重新启动克劳德桌面 定期清除缓存
macOS/Linux上的权限错误
问题: 运行服务器时“权限被拒绝”。
解决:
- 对于全局安装: 确保适当的npm权限
sudo npm install -g oorep-mcp- 对于npx(推荐): 无需权限,请使用
-y标志:
npx -y oorep-mcp查看详细日志
要查看详细的调试日志以进行故障排除,请执行以下操作:
- 设置要调试的日志级别:
"env": {
"OOREP_MCP_LOG_LEVEL": "debug"
}- 检查MCP日志:
- macOS: tail -f ~/Library/Logs/Claude/mcp*.log - 窗户: 检查 %APPDATA%\Claude\Logs\
- 查找特定的错误模式:
- NetworkError -连接问题 - TimeoutError -请求时间过长 - ValidationError -输入无效 - RateLimitError -请求太多
还有问题吗?
- 检查现有问题:
- 报告新问题: 包括:
- 您的操作系统和版本 - Node.js版本(node --version) - 克劳德桌面版 - 配置(删除任何敏感数据) - MCP日志文件中的错误日志
- 加入讨论: 分享您的经验并获得社区帮助
发展
先决条件
- Node.js≥18.0.0
- npm≥8.0.0
设置
git clone https://github.com/Dhi13man/oorep-mcp.git
cd oorep-mcp
npm install命令
npm run build # Compile TypeScript
npm run typecheck # Type checking only
npm run dev # Development mode with watch
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report
npm run lint # ESLint
npm run format # Prettier测试结构
src/
├── **/*.unit.test.ts # Unit tests (mocked dependencies)
└── **/*.integration.test.ts # Integration tests (real implementations)- 1100+次测试 和 95%以上的覆盖率
- 单元测试使用模拟的依赖关系
- 集成测试使用模拟HTTP的真实实现
免责声明
此工具仅用于教育和信息目的。
- 不是医疗建议 -不能替代专业医疗咨询
- 咨询从业者 -始终咨询合格的顺势疗法医生
- 不用于诊断 -不用于诊断或治疗医疗状况
顺势疗法治疗只能在合格专业人员的指导下进行。
许可证
MIT许可证-请参阅 许可证 文件以获取详细信息。
致谢
- OOREP团队:用于创建和维护开源OOREP平台
- Anthropic:用于模型上下文协议和Claude
- MCP社区:用于工具、文档和支持
链接
- OOREP网站:
- OOREP GitHub:
- MCP文件:
- 问题追踪:
- npm包:
