dolphindb-mcp-server
About
dolphindb-mcp-server is an MCP (Model Context Protocol) server that exposes DolphinDB database operations as tools for AI agents and LLM-based applications. It enables users to query databases, list tables, check disk usage, and run arbitrary DolphinDB scripts through…
Details
- Author
- tradercjz
- GitHub stars
- 7
- Downloads
- 222
- Categories
- Other
Jump to
- Installation via pip, uvx, or local build
- Configurable DolphinDB connection through environment variables
- Provides list_dbs(), list_tbs(dbName) queries
- Exposes query_table_diskusage(database, tableName) tool
- Supports arbitrary script execution via query_dolphindb(script)
- Compatible with MCP frontends and LLM toolchains
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
dolphindb-mcp-serverCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install via pip install dolphindb-mcp-server or uvx install dolphindb-mcp-server. Optionally set environment variables (DDB_HOST, DDB_PORT, DDB_USER, DDB_PASSWD) to configure the connection. Start the server by running dolphindb-mcp-server (or uvx dolphindb-mcp-server). Once running, the tool functions are available via the MCP protocol.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"dolphindb-mcp-server": {
"dolphindb-mcp-server": {
"command": "uvx",
"args": [
"dolphindb-mcp-server"
]
}
}
}
}
McpServers
{
"dolphindb-mcp-server": {
"command": "uvx",
"args": [
"dolphindb-mcp-server"
]
}
}
🧱 安装方式
✅ 方法一:使用 uvx(推荐)
通过 uvx 安装并运行:
uvx install dolphindb-mcp-server
安装完成后,直接运行:
uvx dolphindb-mcp-server
> 📌 注意:
uvx 安装方式需要通过 uv.pack 构建并上传到 Universe。如果你尚未上传,请参考 uv 文档进行打包与发布。
✅ 方法二:从 PyPI 安装
pip install dolphindb-mcp-server
安装后运行:
dolphindb-mcp-server
✅ 方法三:本地构建 & 安装
git clone https://github.com/your-org/dolphindb-mcp-server.git
cd dolphindb-mcp-server
创建并激活虚拟环境
python -m venv .venv
source .venv/bin/activate
构建并安装
pip install build
python -m build
pip install dist/.whl
安装后运行:
dolphindb-mcp-server
🧪 测试运行
运行后你可以直接使用工具,例如:
dolphindb-mcp-server
或(如果是 uvx 安装):
uvx dolphindb-mcp-server
好的,这是转换后的 Markdown 版本:
好的,这是转换后的 Markdown 版本:
---
🚀 使用方法
1. 配置环境变量(可选)
你可以通过 .env 文件或系统环境变量配置 DolphinDB 的连接信息:
DDB_HOST=127.0.0.1
DDB_PORT=8848
DDB_USER=admin
DDB_PASSWD=123456
也可以不设置,系统将使用默认值。
2. 启动服务
dolphindb-mcp-server
该命令会启动 MCP 插件服务,供外部调用。
3. FastMCP Agent 使用示例
启动后,你的工具将通过 FastMCP 对外暴露以下函数接口:
list_dbs()
list_tbs(dbName: str)
query_table_diskusage(database: str, tableName: str)
* query_dolphindb(script: str)
可通过 MCP 前端界面或对接 LLM 工具链来进行访问。
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



