<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Miguel Branco</title>
    <description>The latest articles on DEV Community by Miguel Branco (@miguelbranco_80).</description>
    <link>https://dev.to/miguelbranco_80</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3291080%2Ff38c434f-1801-4af5-8d09-6643097d9954.jpeg</url>
      <title>DEV Community: Miguel Branco</title>
      <link>https://dev.to/miguelbranco_80</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/miguelbranco_80"/>
    <language>en</language>
    <item>
      <title>MXCP: Build Your Own Enterprise-Grade MCP Server</title>
      <dc:creator>Miguel Branco</dc:creator>
      <pubDate>Tue, 24 Jun 2025 13:27:07 +0000</pubDate>
      <link>https://dev.to/miguelbranco_80/mxcp-build-your-own-enterprise-grade-mcp-server-4n94</link>
      <guid>https://dev.to/miguelbranco_80/mxcp-build-your-own-enterprise-grade-mcp-server-4n94</guid>
      <description>&lt;p&gt;We've open-sourced MXCP, a framework for building secure, testable MCP servers using YAML, SQL, and Python. It’s designed for teams that want to expose operational data to LLMs without giving up control over security, data quality, or governance.&lt;/p&gt;

&lt;p&gt;MXCP isn't just a library, but closer to a complete methodology for designing and operating MCP endpoints with the same rigor you’d apply to traditional APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;First-class support for models&lt;/strong&gt;, using dbt: Build on top of versioned, tested data models. We use DuckDB locally for fast execution without infra. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clear API contracts&lt;/strong&gt;: Define parameters, types, and policies using YAML. MXCP validates everything before serving. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth &amp;amp; RBAC&lt;/strong&gt;: Supports OAuth2, user contexts, role-based access, and fine-grained policies (via CEL). &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit Logging&lt;/strong&gt;: Every request and tool call is logged, searchable, and exportable (JSONL or DuckDB). &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drift Detection&lt;/strong&gt;: Snapshot schemas and detect changes over time, across environments. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing &amp;amp; Evaluation&lt;/strong&gt;: Write unit tests, integration tests, and LLM evaluations directly in YAML. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tooling&lt;/strong&gt;: Includes CLI for validation, serving, drift checking, and audit exploration to integrate in any CI/CD flows. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can define tools in either SQL or Python — or both — and MXCP handles typing, validation, policy enforcement, and audit automatically. Python tools get access to a runtime for secure DB access, config, and secrets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quickstart
&lt;/h2&gt;

&lt;p&gt;Install and run a working MCP server quickly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;mxcp
mxcp init &lt;span class="nt"&gt;--bootstrap&lt;/span&gt;
mxcp serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives you a working project structure with example tools, policies, and tests. The server is ready to connect to any LLM client that speaks MCP, e.g. Claude Desktop, Claude.ai, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example Use Case: dbt + LLM Interface
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use dbt to transform and test your data &lt;/li&gt;
&lt;li&gt;Expose dbt tables via SQL endpoints with policies and validation &lt;/li&gt;
&lt;li&gt;Add Python tools for complex logic or ML &lt;/li&gt;
&lt;li&gt;Test with mxcp test, run mxcp evals to check LLM behavior &lt;/li&gt;
&lt;li&gt;Use mxcp drift-check to track schema changes across environments &lt;/li&gt;
&lt;li&gt;Export audit logs for review or compliance &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Project Philosophy
&lt;/h3&gt;

&lt;p&gt;We built MXCP because we needed a better way to expose internal data to LLMs without reinventing API infrastructure every time. We wanted:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A reproducible, versioned process for building LLM tools &lt;/li&gt;
&lt;li&gt;Strong guarantees around data contracts, auth, and audits &lt;/li&gt;
&lt;li&gt;Local development without having to deploy infra &lt;/li&gt;
&lt;li&gt;Support for hybrid teams working in SQL, Python, and YAML 
MXCP gives us that - and we’re sharing it in case it helps others trying to solve the same problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Get Started
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Website: &lt;a href="https://mxcp.dev" rel="noopener noreferrer"&gt;https://mxcp.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/raw-labs/mxcp" rel="noopener noreferrer"&gt;https://github.com/raw-labs/mxcp&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’re actively developing MXCP and would love feedback.&lt;/p&gt;

&lt;p&gt;If you find it useful, try it out, open an issue, or give it a star on &lt;a href="https://github.com/raw-labs/mxcp" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. Thank you!&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>openai</category>
      <category>chatgpt</category>
    </item>
  </channel>
</rss>
