SuperAPI AI Directory

mxcp

MXCP (Model eXecution + Context Protocol) is an enterprise-grade MCP (Model Context Protocol) framework developed by RAW Labs for building production-oriented AI application servers. It is not a simple MCP implementation, but a complete structured methodology: start with dbt data models and contracts, define types, security policies, and API contracts, use SQL for data queries, Python for complex logic, or a combination of both, and complete validation, testing, linting, and LLM behavior evaluation before deployment. The framework has built-in OAuth authentication, RBAC, policy enforcement, complete audit logs, type-safety validation across SQL and Python, unit/integration/LLM testing, caching and asynchronous support, schema drift detection, and OpenTelemetry distributed tracing. MXCP is compatible with Claude Desktop, OpenAI-compatible tools, and custom MCP integrations. It is released under the Business Source License 1.1; development, testing, and most production scenarios are free, but providing MXCP to third parties as a hosted or managed service for model execution, workflows, or database queries requires a commercial license; each version automatically converts to the MIT license four years after release.

Open website

About this tool

MXCP (Model eXecution + Context Protocol) is an enterprise-grade MCP framework developed by RAW Labs, with the goal of providing production-grade infrastructure from data to AI. It is officially positioned as a structured methodology for building production-ready MCP servers, not merely another MCP implementation.

I. Purpose and Core Philosophy MXCP is used to build production-oriented AI application servers, unifying data sources, security policies, and LLM access within a single framework. The methodology it advocates consists of five steps: data modeling first (start with dbt models, data contracts, and quality tests); service design (define types, security policies, and API contracts in advance); intelligent implementation (use SQL for data, Python for logic, or a combination of both); quality assurance (perform validation, testing, linting, and evaluation before deployment); production operations (monitor drift, trace audits, and ensure performance).

II. Main Capabilities The framework has multiple built-in enterprise-grade capabilities, officially listed in three categories:

  1. Security and governance: OAuth 2.0 authentication and authorization, RBAC, session management; policy enforcement, including fine-grained access control and data filtering; complete audit logs that track every operation to meet compliance requirements.
  2. Quality assurance: schema and type validation; complete endpoint testing; metadata optimization lint for LLMs; LLM behavior and safety evaluation.
  3. Operations and monitoring: schema drift detection, monitoring changes across environments; native dbt integration for data transformation; direct command-line execution and monitoring endpoints; OpenTelemetry-based distributed tracing and metrics. In addition, MXCP provides type safety and validation across SQL and Python, caching strategies, asynchronous support, and a security layer, policy engine, and type system between LLMs and the system. The framework supports both SQL and Python implementation approaches and shares the same enterprise features; Python endpoints also support database access, secret management, and lifecycle hooks (initialization and cleanup).

III. Usage and Core Concepts MXCP implements the Model Context Protocol (MCP) specification. Core concepts include: Tools (functions that process data and return results, which can be written in SQL or Python), Resources (data sources and caching), Prompts (LLM interaction templates). In terms of implementation language, SQL is suitable for data queries, aggregation, and transformation, a SQL engine based on DuckDB; Python is suitable for complex logic, external API calls, machine learning, data science operations, file processing, and asynchronous operations, with access to the full Python ecosystem. Projects are organized and managed through an enforced directory structure.

The official documentation provides a real-world example combining SQL and Python: a dbt model fetches and transforms COVID data from Our World in Data into DuckDB tables; the SQL endpoint performs simple aggregate queries on the tables; the Python endpoint performs complex analysis and forecasting on the same data; audit logs record every query and function call; policies uniformly constrain the data visibility scope for both SQL and Python. Users can ask Claude to "show the COVID vaccination rates for Germany and France" (queried on the fly via SQL), or "predict next month's trend" (running an ML model on the same data via Python).

MXCP provides a 60-second Quickstart, along with examples, including the Earthquakes example (a complete Claude Desktop setup) and the COVID + dbt example (advanced dbt integration). For LLM integration, it is compatible with Claude Desktop (native MCP support), OpenAI-compatible tools (via an MCP adapter), and custom integrations (using the MCP specification).

IV. Documentation and Support The official documentation covers: Overview, Quickstart Guide, Features Overview, Python Endpoints, Policy Enforcement, Drift Detection, Audit Logging, Configuration Guide, Authentication, Integrations, Quality & Testing, CLI Reference, Type System, Plugins, etc. The project welcomes contributions and includes a development guide. For enterprise support, custom integrations, or consulting, contact mxcp@raw-labs.com; the official website is mxcp.dev.

V. License and Restrictions MXCP is released under the Business Source License 1.1 (BSL). Development, testing, and most production scenarios can be used freeof charge. However, if MXCP is used as part of a hosted or managed service that enables third parties to run models, workflows, or database queries, a commercial license is required, specifically including: model execution platforms, API marketplaces, Database-as-a-Service (DBaaS) products, and any hosted service that provides MXCP functionality to third parties. Four years after each version's release, the license automatically converts to the MIT license. For commercial licensing inquiries, email mxcp@raw-labs.com.

VI. Use Cases Suitable for teams that need to securely connect enterprise data to LLMs, especially production environments that use dbt for data transformation and require audit compliance, type safety, and policy control; it is also suitable for hybrid workflows that need to leverage both SQL data querying and complex Python logic. For lightweight scenarios that only need a simple MCP connection and do not involve enterprise governance requirements, the official documentation emphasizes its differences from simple MCP servers, but does not provide specific performance or cost comparison data.