Execute a DolphinDB query and return the results
Execute a DolphinDB script and return the results
DolphinDB MCP provides a seamless interface between AI assistants and DolphinDB, a high-performance distributed time-series database. This integration allows you to execute queries, analyze data, and leverage DolphinDB's powerful financial analytics capabilities directly through conversational AI. With this tool, financial analysts, data scientists, and developers can interact with their DolphinDB instances using natural language, making complex database operations more accessible and efficient. The server handles connection management and query execution, returning formatted results that can be easily interpreted by both the AI and the user.
DolphinDB MCP Server enables AI assistants to connect to and interact with DolphinDB databases. This allows you to query data, perform analytics, and execute DolphinDB scripts through natural language conversations.
Before installing the DolphinDB MCP Server, ensure you have:
Install the necessary packages using uv:
uv pip install fastmcp dolphindb python-dotenv
cp .env.example .env
.env
file with your DolphinDB server connection details:DOLPHINDB_HOST=your_server_host
DOLPHINDB_PORT=your_server_port
DOLPHINDB_USERNAME=your_username
DOLPHINDB_PASSWORD=your_password
To install the MCP server to your AI assistant, use the fastmcp command:
fastmcp install server.py
Once installed, you can interact with your DolphinDB instance through your AI assistant using natural language. Here are some example queries you can try:
The AI assistant will translate your requests into appropriate DolphinDB queries, execute them, and return the results in a readable format.
To add more tools or customize the server:
server.py
file to add new functionsfastmcp install server.py
If you encounter connection issues:
.env
fileFor other issues, refer to the DolphinDB Python API documentation or open an issue on the GitHub repository.