DINO-X MCP服务器
英语 | 中文
DINO-X官方MCP服务器由DINO-X和接地DINO模型提供支持,为您的多模式应用程序带来细粒度的对象检测和图像理解。
Your browser does not support the video tag.
为什么选择DINO-X MCP?
使用DINO-X MCP,您可以:
- 精细理解:完整的图像检测、对象检测和区域级描述。
- 结构化输出:获取VQA和多步推理任务的对象类别、计数、位置和属性。
- 可组合:与其他MCP服务器无缝协作,构建端到端的可视化代理或自动化管道。
运输方式
DINO-X MCP支持两种传输模式:
|功能|STDIO(默认)|可流式传输HTTP| |:--|:--|:--| |运行时|本地|本地或云| |传输|标准I/O |HTTP(流式响应)| |输入源| file:// 和 https:// | https:// 只有| |可视化|支持(在本地保存带注释的图像)|不支持(目前)|
快速开始
1.准备MCP客户端
任何兼容MCP的客户端都可以工作,例如:
2.获取API密钥
在DINO-X平台上应用: 请求API密钥 (新用户获得免费配额)。
3.配置MCP
选项A:官方托管流式HTTP(推荐)
添加到MCP客户端配置中,并替换为API密钥:
{
"mcpServers": {
"dinox-mcp": {
"url": "https://mcp.deepdataspace.com/mcp?key=your-api-key"
}
}
}选项B:在本地使用NPM包(STDIO)
先安装Node.js
- 从下载安装程序
- 或者使用命令:
# macOS / Linux
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# or
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# load nvm into current shell (choose the one you use)
source ~/.bashrc || true
source ~/.zshrc || true
# install and use LTS Node.js
nvm install --lts
nvm use --lts
# Windows (one of the following)
winget install OpenJS.NodeJS.LTS
# or with Chocolatey (in admin PowerShell)
iwr -useb https://raw.githubusercontent.com/chocolatey/chocolatey/master/chocolateyInstall/InstallChocolatey.ps1 | iex
choco install nodejs-lts -y配置您的MCP客户端:
{
"mcpServers": {
"dinox-mcp": {
"command": "npx",
"args": ["-y", "@deepdataspace/dinox-mcp"],
"env": {
"DINOX_API_KEY": "your-api-key-here",
"IMAGE_STORAGE_DIRECTORY": "/path/to/your/image/directory"
}
}
}
}注:更换 your-api-key-here 用你真正的钥匙。
选项C:从本地源代码运行
确保已安装Node.js(请参阅选项B),然后:
# clone
git clone https://github.com/IDEA-Research/DINO-X-MCP.git
cd DINO-X-MCP
# install deps
npm install
# build
npm run build配置您的MCP客户端:
{
"mcpServers": {
"dinox-mcp": {
"command": "node",
"args": ["/path/to/DINO-X-MCP/build/index.js"],
"env": {
"DINOX_API_KEY": "your-api-key-here",
"IMAGE_STORAGE_DIRECTORY": "/path/to/your/image/directory"
}
}
}
}CLI标志和环境变量
- 通用旗帜
- --http:以流式HTTP模式启动(否则默认为STDIO) - --stdio:强制STDIO模式 - --dinox-api-key=...:设置API密钥 - --enable-client-key:通过URL允许API密钥 ?key= (仅限流式HTTP) - --port=8080:HTTP端口(默认3020)
- 环境变量
- DINOX_API_KEY (要求/有条件要求):DINO-X平台API密钥 - IMAGE_STORAGE_DIRECTORY (可选,STDIO):保存带注释图像的目录 - AUTH_TOKEN (可选,HTTP):如果设置,客户端必须发送 Authorization: Bearer
示例:
# STDIO (local)
node build/index.js --dinox-api-key=your-api-key
# Streamable HTTP (server provides a shared API key)
node build/index.js --http --dinox-api-key=your-api-key
# Streamable HTTP (custom port)
node build/index.js --http --dinox-api-key=your-api-key --port=8080
# Streamable HTTP (require client-provided API key via URL)
node build/index.js --http --enable-client-key使用时的客户端配置 ?key=:
{
"mcpServers": {
"dinox-mcp": {
"url": "http://localhost:3020/mcp?key=your-api-key"
}
}
}使用 AUTH_TOKEN 带有注入的网关 Authorization: Bearer :
AUTH_TOKEN=my-token node build/index.js --http --enable-client-key客户端示例 supergateway:
{
"mcpServers": {
"dinox-mcp": {
"command": "npx",
"args": [
"-y",
"supergateway",
"--streamableHttp",
"http://localhost:3020/mcp?key=your-api-key",
"--oauth2Bearer",
"my-token"
]
}
}
}工具
|能力|工具ID|运输|输入|输出| |:--|:--|:--|:--|:--| |全场景对象检测| detect-all-objects |STDIO/HTTP|图像URL|类别+bbox+(可选)标题| |文本提示对象检测| detect-objects-by-text |STDIO/HTTP|图像URL+英语名词(点分隔为多个。, person.car)|目标对象bbox+(可选)标题| |人体姿态估计| detect-human-pose-keypoints |STDIO/HTTP|图像URL|17个关键点+bbox+(可选)标题| |可视化| visualize-detection-result |仅限STDIO |图像URL+检测结果数组|带注释图像的本地路径|
🎬 用例
| 🎯 场景 | 📝 输入 | ✨ 输出 |
|---|---|---|
| 检测与定位 | 💬 提示: |
Detect and visualize the fire areas in the forest
🖼️ 输入图像: |
| | 对象计数 | 💬 提示:
Please analyze this warehouse image, detect all the cardboard boxes, count the total number
🖼️ 输入图像: | | | 特征检测 | 💬 提示:
Find all red cars in the image
🖼️ 输入图像: |
| | 属性推理 | 💬 提示:
Find the tallest person in the image, describe their clothing
🖼️ 输入图像: |
| | 全场景检测 | 💬 提示:
Find the fruit with the highest vitamin C content in the image
🖼️ 输入图像: |
*答:猕猴桃(93mg/100g)* | | 姿态分析 | 💬 提示: Please analyze what yoga pose this is
🖼️ 输入图像: |
|
常见问题解答
- 支持的图像源?
- 工作室: file:// 和 https:// - 流式HTTP: https:// 仅
- 支持的图像格式?
- jpg、jpeg、webp、png
开发与调试
在开发过程中使用监视模式自动重建:
npm run watch使用MCP检查器进行调试:
npm run inspector许可证
Apache许可证2.0
