使用说明
StatPearls MCP服务器
A. 模型上下文协议(MCP) 从中获取疾病信息的服务器 雕像珍珠,同行评审医疗内容的可靠来源。
为你的人工智能系统的下一次对话提供可靠的医学知识来源。
特性
- 在StatPearls上搜索疾病和医疗状况
- 从StatPearls检索全面、可靠的医疗信息
- 将HTML内容转换为格式良好的Markdown,使其对人工智能友好
- 通过模型上下文协议与AI模型集成
如果您还没有模型上下文协议(MCP)客户端:
如果你是一个普通用户,你可以使用 克劳德桌面 开始使用MCP服务器。它是一个免费的开源桌面应用程序,允许您在本地运行MCP服务器并连接到它们。
如果您是高级用户/开发人员,我建议您将VSCode与 房间代码 扩展,使您能够连接 MCP服务器 为您的开发环境带来无限可能!
安装
一旦你有了一个支持MCP的AI客户端,你就可以在本地运行这个服务器。
最简单的启动和运行方法是从 发布页面。这将为您提供一个自包含的可执行文件,无需任何额外设置即可运行。
将此可执行文件放置在您选择的目录中。然后,只需将以下内容添加到您的 mcp_settings.json 文件:
对于Windows:
{
"mcpServers": {
...
"statpearls": {
"command": "{path_to_executable_here}\\statpearls-mcp.exe"
},
...
}
}
#### For Mac/Linux:
```json
{
"mcpServers": {
...
"statpearls": {
"command": "{path_to_executable_here}/statpearls-mcp"
},
...
}
}
通过Smithery安装
通过以下方式自动安装克劳德桌面的statpearls mcp 史密瑟里:
npx -y @smithery/cli install @jpoles1/statpearls-mcp --client claude
对于开发者:
您还可以从源代码运行服务器。这需要 包子 安装在您的系统上。
- 克隆存储库
- 安装依赖项(
bun install) - 编译服务器(
bun run build) - 现在,您可以将服务器添加到您的
mcp_settings.json文件:
{
"mcpServers": {
...
"statpearls": {
"command": "node",
"args": [
"{path_to_proj_here}/dist/index.js"
]
},
...
}
}
工具定义
服务器提供了一个工具:
- statpearls_disease_info:从StatPearls获取有关疾病的全面、可靠的医疗信息。
输入架构
{
"query": "diabetes",
"format_options": {
"includeToc": true,
"maxLength": 50000
}
}
query:要搜索的疾病或医疗状况(必填)format_options:可选格式首选项includeToc:是否包含目录(默认值:true)maxLength:返回内容的最大长度(以字符为单位)(默认值:50000)
输出示例
该工具返回格式化的Markdown内容:
- 标题和来源信息
- 目录(可选)
- 结构化部分,包括病因、流行病学、病理生理学、临床特征、诊断、治疗和预后(如有)
发展
项目结构
statpearls-mcp/
├── src/ # Source code
│ ├── index.ts # Main entry point and server setup
│ ├── test-html-parser.ts # Test utility for HTML parser
│ ├── test-statpearls-parser.ts # Test utility for StatPearls parser
│ ├── testrun.ts # Test runner utility
│ ├── tools/ # Tool definitions and handlers
│ │ └── statpearls.ts # StatPearls tool definition and handler
│ ├── services/ # Core functionality services
│ │ ├── search.ts # Search functionality
│ │ ├── content.ts # Content retrieval and processing
│ │ └── markdown.ts # HTML to Markdown conversion
│ ├── types/ # Type definitions
│ │ ├── index.ts # Common type definitions
│ │ └── statpearls.ts # StatPearls-specific type definitions
│ └── utils/ # Utility functions
│ ├── html.ts # HTML parsing utilities
│ ├── error.ts # Error handling utilities
│ └── statpearls-parser.ts # StatPearls content parsing utilities
├── scripts/ # Build and utility scripts
│ ├── build.ts # Build script for creating Node.js compatible bundle
│ ├── compile.ts # Script for compiling executables
│ ├── release.ts # Script for handling releases
│ └── version.ts # Script for managing versioning
├── dist/ # Build output directory (not in repository)
├── package.json # Project configuration and dependencies
├── tsconfig.json # TypeScript configuration
├── bun.lock # Bun dependency lock file
├── README.md # Main project documentation
└── RELEASE-PROCESS.md # Documentation for release process
构建与释放
建筑
构建过程创建了一个可以用vanilla Node.js运行的JavaScript文件:
# Production build
bun run build
# or
bun run build:prod
# Development build
bun run build:dev
这将在以下位置创建一个捆绑文件 dist/index.js 这包括所有依赖关系。
编译可执行文件
您可以使用Bun的编译功能编译特定于平台的可执行文件:
# Compile for all platforms
bun run compile:all
# Compile for specific platforms
bun run compile:linux
bun run compile:windows
bun run compile:mac
这将在中创建可执行文件 dist 目录:
statpearls-mcp(默认可执行文件)statpearls-mcp-linux-x64(Linux)statpearls-mcp-windows-x64.exe(Windows)statpearls-mcp-darwin-x64(macOS)
释放
发布过程处理版本控制、构建、编译和Git操作:
# Release a patch version (bug fixes)
bun run release:patch
# Release a minor version (new features, backward compatible)
bun run release:minor
# Release a major version (breaking changes)
bun run release:major
此过程:
- 更新package.json中的版本
- 生成分发文件
- 为所有平台编译可执行文件
- 使用版本号创建Git提交
- 为版本创建Git标记
- 将提交和标签推送到GitHub
版本控制
该项目遵循语义版本控制。您可以通过以下方式检查当前版本:
bun run version
许可证
此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。