RAW Model Context Protocol
Project description
MXCP: Instantly Serve Your Operational Data to LLMs โ Safely
โจ Why MXCP?
MXCP (Model eXecution + Context Protocol) is a developer-first tool that bridges the gap between your operational data and AI applications. It lets you:
- ๐ Go from data to AI in minutes โ Define interfaces in YAML + SQL, serve instantly
- ๐ Keep control of your data โ Run locally, with full observability and type safety
- ๐ฏ Build production-ready AI tools โ Combine real-time data, caching, and business logic
- ๐ ๏ธ Use familiar tools โ DuckDB for execution, dbt for modeling, Git for versioning
๐ Quick Start
# Install globally
pip install mxcp
# Install with Vault support (optional)
pip install "mxcp[vault]"
# Or develop locally
git clone https://github.com/raw-labs/mxcp.git && cd mxcp
python -m venv .venv && source .venv/bin/activate
pip install -e .
Try the included Earthquakes example:
cd examples/earthquakes
mxcp serve
๐ก Key Features
1. Declarative Interface Definition
# tools/summarize_earthquakes.yml
mxcp: "1.0.0"
tool:
name: summarize_earthquakes
description: "Summarize earthquakes for a given date"
parameters:
- name: date
type: string
format: date
description: "Date to summarize earthquakes for"
return:
type: object
properties:
summary:
type: string
description: "Summary of earthquakes for the date"
source:
code: |
SELECT 'Summary for ' || $date || ': ' || COUNT(*) || ' earthquakes' AS summary
FROM earthquakes
WHERE event_date = $date
- Type-safe โ Strong typing for LLM safety and schema tracing
- Fast restart โ Quick server restarts for development
- dbt integration โ Directly use your dbt models in endpoints
2. Powerful Data Engine
- DuckDB-powered โ Run instantly, with no infrastructure
- Rich integrations โ PostgreSQL, Parquet, CSV, JSON, HTTP, S3, and more
- Full SQL support โ Joins, filters, aggregations, UDFs
3. Production-Ready Features
- dbt integration โ Use your data models directly
- Git-based workflow โ Version control and collaboration
- Validation tools โ Type checking, SQL linting, and testing
- Drift detection โ Monitor schema and endpoint changes across environments
๐ ๏ธ Core Concepts
Tools, Resources, Prompts
Define your AI interface using MCP (Model Context Protocol) specs:
- Tools โ Functions that process data and return results
- Resources โ Data sources and caches
- Prompts โ Templates for LLM interactions
Project Structure
your-project/
โโโ mxcp-site.yml # Project configuration
โโโ tools/ # Tool definitions
โโโ resources/ # Data sources
โโโ prompts/ # LLM templates
โโโ models/ # (Optional) dbt transformations & caches
CLI Commands
mxcp serve # Start local MCP server
mxcp list # List all endpoints
mxcp validate # Check types, SQL, and references
mxcp test # Run endpoint tests
mxcp query # Execute SQL queries
mxcp init # Initialize new project
mxcp dbt-config # Configure dbt integration
mxcp dbt # Run dbt commands
mxcp drift-snapshot # Create drift detection baseline
mxcp drift-check # Check for schema and endpoint drift
mxcp log # Query audit logs
๐ LLM Integration
MXCP implements the Model Context Protocol (MCP), making it compatible with:
- Claude Desktop โ Native MCP support
- OpenAI-compatible tools โ Via MCP adapters
- Custom integrations โ Using the MCP specification
For specific setup instructions, see:
- Earthquakes Example โ Complete Claude Desktop setup walkthrough
- Integration Guide โ Claude Desktop, OpenAI, mcp-cli, and custom integrations
๐ Documentation
- Overview โ Core concepts and architecture
- Quickstart โ Get up and running
- CLI Reference โ Command-line tools
- Configuration โ Project setup
- Plugins โ Extend DuckDB with custom Python functions
- Authentication โ OAuth authentication setup
- Policy Enforcement โ Access control and data filtering
- Audit Logging โ Enterprise-grade execution logging
- Type System โ Data types and validation
- Integrations โ Data sources and tools
- Drift Detection โ Schema and endpoint change monitoring
๐ค Contributing
We welcome contributions! See our development guide to get started.
๐ง About
MXCP is developed by RAW Labs, combining the best of:
- dbt's modular data modeling
- DuckDB's speed and connectors
- Python MCP official server
- Modern AI-native workflows
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mxcp-0.1.0.tar.gz.
File metadata
- Download URL: mxcp-0.1.0.tar.gz
- Upload date:
- Size: 109.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e89f66ff77ca6e9590722f2f35b6c915359bb6b90be7f719951d61c047f0b49f
|
|
| MD5 |
6f70ec4205ae30e51040781be52ab029
|
|
| BLAKE2b-256 |
39e5c60f35cdb501981980ff2951a32c775281dbe44201bf3d6731e890552dcc
|
File details
Details for the file mxcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mxcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 108.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c454c9cb73070a9316ac993e522bb6ed6a30866f38ff9bfc422f2a2091868d3c
|
|
| MD5 |
d28afb7dcacff31620980fa20127d3ed
|
|
| BLAKE2b-256 |
bd40a67c3007b4bca2d5acd46332dd177e791d9f634f9f18ca2c0e919975ca2e
|