<!-- Source: https://docs.squirro.com/en/latest/technical/data-virtualization/building-custom-mcp-servers-mxcp.html -->
# Custom MCP Servers with MXCP

MXCP is an enterprise framework for building and deploying MCP servers. It adds production-grade capabilities on top of the Model Context Protocol, including authentication, authorization, audit logging, schema validation, and testing. That makes it well suited for teams that need to expose internal data and APIs to AI agents securely and without building custom infrastructure.

## How It Works

MXCP sits between your data sources and AI agents. You define tools declaratively, and MXCP generates the MCP server and handles all protocol communication.

Tools are defined in YAML configuration files and implemented in one of three supported languages:

- **SQL**

  For querying databases directly. The YAML configuration references a `.sql` file containing the query.
- **Python**

  For REST APIs, machine learning models, and custom business logic.
- **dbt**

  For teams with existing dbt projects, MXCP provides first-class integration.

The LLM receives the tool names, descriptions, parameter schemas, and return types declared in the YAML configuration.

## Using MXCP with Squirro

Once your MXCP server is running, connect it to a Squirro Chat agent using the MCP Server Tools. For configuration steps and available parameters, see the [MCP Server Tools](../agents/mcp-server-tools.md#mcp-server-tools) page.

## Getting Assistance

For assistance integrating MXCP with the Squirro platform, visit the [Squirro Support website](https://go.squirro.com/support) and submit a technical support request. To learn more about MXCP, visit the [RAW Labs](https://raw-labs.com/platform/mxcp/) website.
