Back to MCP Catalog

DolphinDB MCP Server

DatabasesPython
Query and interact with DolphinDB databases directly from your AI assistant
Available Tools

query_dolphindb

Execute a DolphinDB query and return the results

query

execute_script

Execute a DolphinDB script and return the results

script

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.

Overview

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.

Installation

Prerequisites

Before installing the DolphinDB MCP Server, ensure you have:

  1. Access to a DolphinDB server instance
  2. Python installed on your system
  3. uv package manager (recommended)

Step 1: Install Required Packages

Install the necessary packages using uv:

uv pip install fastmcp dolphindb python-dotenv

Step 2: Configure DolphinDB Connection

  1. Clone the repository or download the source files
  2. Create a configuration file by copying the example:
cp .env.example .env
  1. Edit the .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

Step 3: Install to Claude Desktop or Other AI Assistant

To install the MCP server to your AI assistant, use the fastmcp command:

fastmcp install server.py

Usage

Once installed, you can interact with your DolphinDB instance through your AI assistant using natural language. Here are some example queries you can try:

  • "Query the latest stock prices from my DolphinDB database"
  • "Run a time series analysis on the trading data in DolphinDB"
  • "Execute this DolphinDB script: select * from trades where date=2023.01.01"
  • "Create a new table in my DolphinDB instance"

The AI assistant will translate your requests into appropriate DolphinDB queries, execute them, and return the results in a readable format.

Extending Functionality

To add more tools or customize the server:

  1. Modify the server.py file to add new functions
  2. Update the tool definitions to expose these functions to the AI assistant
  3. Reinstall the MCP server using fastmcp install server.py

Troubleshooting

If you encounter connection issues:

  • Verify your DolphinDB server is running and accessible
  • Check the credentials in your .env file
  • Ensure your network allows connections to the DolphinDB port

For other issues, refer to the DolphinDB Python API documentation or open an issue on the GitHub repository.

Related MCPs

Milvus Vector Database
DatabasesPython

Connect to Milvus vector database for semantic search and vector operations

MotherDuck DuckDB
DatabasesPython

SQL analytics with DuckDB and MotherDuck for AI assistants

Alibaba Cloud Tablestore
DatabasesJava, Python

Connect to Alibaba Cloud Tablestore for vector search and RAG applications

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.