# Model Context Protocol (MCP) Server

*This page introduces the KDB-X MCP Server and explains how to connect natural language clients to KDB-X using the Model Context Protocol (MCP).*

## Overview

The **MCP Server integration** connects **KDB-X** to any client that supports [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro){target=_blank}. This setup allows both users and AI models to interact with KDB-X using **natural language** through AI-powered applications like Claude, GPT, or Gemini.

When exposed to an MCP-compliant client, KDB-X can process user queries and return context-aware responses using its production-grade resources, intelligent prompts, and robust tools, without requiring users to write q code.

The integration follows the MCP standard defined by Anthropic, ensuring compatibility with a growing ecosystem of third-party clients. Its modular design also allows technical teams to tailor and extend functionality with product-specific APIs and custom logic.

KDB-X MCP Server is built on a flexible framework with:

- **Curated prompts and tools for running SQL**, exploring tables, and guiding AI behavior
- **Configurable templates** for customizing behavior per product or use case
- **Built-in protections** for safe query execution (for example, blocking destructive SQL)
- **Auto-discovery** of new tools and resources without manual registration

## How it works

In this setup, the end user submits a natural language request through an **MCP client application**. The LLM, embedded within or accessible to that client, interprets the request and determines which **tools, prompts, or resources** (included in the MCP Server) to invoke to complete the task.

The selected action is then passed to the MCP Server, which routes the call to the **KDB-X backend** (via its SQL interface) and returns a structured result. This design supports repeatable use cases such as enterprise AI assistants, database explorers, and conversational data tools.

## Why use MCP with KDB-X?
Read our blog post exploring this integration and example workflows: [The Future of FinTech is Agentic — Build it with KDB-X MCP](https://medium.com/kx-systems/the-future-of-fintech-is-agentic-build-yours-with-the-kdb-x-mcp-server-35e1c830107d){target=_blank}.

## Compatibility

Compatible with **KDB-X 1.0. and later**.

## Get started

Configuration and usage instructions are available in the [MCP Server README file](https://github.com/KxSystems/kdb-x-mcp-server){target=_blank}.
