KDB-X
KDB-X MCP Server to query KDB-X data through natural language
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
Maintainer
Works with
Installation
Manual Installation
npx kdb-xConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-serverStart 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_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-keyStart 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 stdioConfigure 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.
KDB-X Alternatives — Similar Databases Servers
Looking for alternatives to KDB-X? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
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.
Set Up KDB-X in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.