KDB-X

v1.0.0Databasesstable

KDB-X MCP Server to query KDB-X data through natural language

kdb-xmcpai-integration
Share:
11
Stars
0
Downloads
0
Weekly
0/5

What is KDB-X?

KDB-X is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to kdb-x mcp server to query kdb-x data through natural language

KDB-X MCP Server to query KDB-X data through natural language

This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • KDB-X MCP Server to query KDB-X data through natural languag

Use Cases

Query KDB-X time series databases through natural language.
Analyze financial tick data with AI-powered queries.
KxSystems

Maintainer

LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedMar 26, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx kdb-x

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use KDB-X

KDB-X MCP Server enables natural-language querying of KDB-X and KDB+ time-series databases. It exposes SQL query execution, vector similarity search, and hybrid search tools that let AI assistants translate plain-English questions into optimized kdb+ queries — ideal for financial tick data analysis, market data exploration, and time-series analytics workflows.

Prerequisites

  • uv package manager installed (pip install uv or brew install uv)
  • A running KDB-X or KDB+ instance with a valid license and the pykx feature
  • For KDB-X: kx.ai module loaded; for KDB+: s.k_ SQL interface loaded
  • Optional: OpenAI API key if using OpenAI embeddings for similarity search
  • An MCP-compatible client such as Claude Desktop
1

Clone the repository

Clone the KDB-X MCP server repository from KxSystems on GitHub.

git clone https://github.com/KxSystems/kdb-x-mcp-server.git
cd kdb-x-mcp-server
2

Start your KDB-X or KDB+ service

Launch your kdb+ process on the default port 5000. For KDB-X, load the AI and SQL interfaces; for KDB+, load the SQL interface manually.

# Start q on port 5000
q -p 5000

# In the q console — KDB-X:
.ai:use`kx.ai
.s.init[]

# In the q console — KDB+:
\l s.k_
3

Configure environment variables

Create a .env file in the repository root to specify the database connection details and MCP server settings.

# .env
KDBX_DB_HOST=127.0.0.1
KDBX_DB_PORT=5000
KDBX_DB_USERNAME=your_username
KDBX_DB_PASSWORD=your_password
KDBX_MCP_TRANSPORT=streamable-http
KDBX_MCP_PORT=8000
# Optional: for vector similarity search
OPENAI_API_KEY=sk-your-openai-key
4

Start the MCP server

Use uv to run the MCP server. It defaults to streamable-http transport on port 8000.

uv run mcp-server
# Or with a custom port:
uv run mcp-server --mcp.port 7001
# Or with stdio transport for Claude Desktop subprocess mode:
uv run mcp-server --mcp.transport stdio
5

Configure Claude Desktop

Add the KDB-X MCP server to your claude_desktop_config.json. For streamable-http transport, point to the running server URL.

{
  "mcpServers": {
    "kdb-x": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/kdb-x-mcp-server",
        "run",
        "mcp-server",
        "--mcp.transport",
        "stdio"
      ],
      "env": {
        "KDBX_DB_HOST": "127.0.0.1",
        "KDBX_DB_PORT": "5000",
        "KDBX_DB_USERNAME": "your_username",
        "KDBX_DB_PASSWORD": "your_password"
      }
    }
  }
}

KDB-X Examples

Client configuration

claude_desktop_config.json entry for the KDB-X MCP server using stdio transport and uv to run from the cloned directory.

{
  "mcpServers": {
    "kdb-x": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/yourname/kdb-x-mcp-server",
        "run",
        "mcp-server",
        "--mcp.transport",
        "stdio"
      ],
      "env": {
        "KDBX_DB_HOST": "127.0.0.1",
        "KDBX_DB_PORT": "5000",
        "KDBX_DB_USERNAME": "admin",
        "KDBX_DB_PASSWORD": "password"
      }
    }
  }
}

Prompts to try

Example natural-language prompts to use with the KDB-X MCP server for time-series data analysis.

- "Show me all available tables in the KDB-X database and their schemas"
- "Query the trade table for the top 10 most traded symbols by volume in the last hour"
- "Find rows in the quotes table where the bid-ask spread exceeded 0.05 today"
- "Run a similarity search on the market_events table for events similar to 'flash crash'"
- "Generate a statistical analysis of the AAPL price data for the past 30 days"
- "What is the average daily trade volume across all symbols in the trade table?"

Troubleshooting KDB-X

Connection refused when the MCP server tries to reach KDB-X

Ensure your KDB+/KDB-X process is running and listening on the port specified in KDBX_DB_PORT (default 5000). Test connectivity with: echo "" | nc 127.0.0.1 5000. Verify the host and port values match your running q process.

uv command not found when starting the server

Install uv with: curl -LsSf https://astral.sh/uv/install.sh | sh (Linux/macOS) or via pip install uv. Restart your terminal after installation and verify with: uv --version.

Similarity search tools return errors about embeddings

Vector similarity search (kdbx_similarity_search and kdbx_hybrid_search) require OPENAI_API_KEY to be set and a valid embeddings CSV path configured via KDBX_DB_EMBEDDING_CSV_PATH. Ensure the CSV file exists and the OpenAI key is valid.

Frequently Asked Questions about KDB-X

What is KDB-X?

KDB-X is a Model Context Protocol (MCP) server that kdb-x mcp server to query kdb-x data through natural language It connects AI assistants to external tools and data sources through a standardized interface.

How do I install KDB-X?

Follow the installation instructions on the KDB-X GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with KDB-X?

KDB-X works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is KDB-X free to use?

Yes, KDB-X is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Databases MCP Servers

Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "kdb-x": { "command": "npx", "args": ["-y", "kdb-x"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use KDB-X?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides