blog: speed run - connect Hermes to Odoo via MCP

This commit is contained in:
Oliver
2026-06-16 14:39:16 -03:00
parent 886c9efcad
commit 69dc53b02e
2 changed files with 356 additions and 0 deletions
+347
View File
@@ -0,0 +1,347 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="index, follow" />
<link rel="canonical" href="https://derez.ai/blog/posts/speed-run-odoo-mcp.html" />
<title>Speed Run: Connect Hermes Agent to Odoo via MCP — derez.ai Blog</title>
<meta name="description" content="From zero to an MCP-connected Odoo agent in 5 steps. Clone the server, set env vars, add to Hermes Agent, and start querying your ERP through the Model Context Protocol." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://derez.ai/blog/posts/speed-run-odoo-mcp.html" />
<meta property="og:title" content="Speed Run: Connect Hermes Agent to Odoo via MCP" />
<meta property="og:description" content="From zero to an MCP-connected Odoo agent in 5 steps. Clone, set env vars, add to Hermes, and query your ERP through the Model Context Protocol." />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Speed Run: Connect Hermes Agent to Odoo via MCP" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&display=swap" rel="stylesheet" />
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: #08080c;
color: #e8e8f0;
font-family: 'Inter', sans-serif;
line-height: 1.7;
padding: 40px 20px;
}
.container { max-width: 720px; margin: 0 auto; }
a { color: #00f5ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.back { margin-bottom: 32px; display: inline-block; font-size: 0.9rem; color: #888; }
.back:hover { color: #00f5ff; }
h1 { font-size: 1.9rem; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.meta { font-size: 0.85rem; color: #888; margin-bottom: 40px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.area-tag {
display: inline-block;
background: #f472b6;
color: #000;
font-size: 0.75rem;
font-weight: 700;
padding: 2px 10px;
border-radius: 20px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.chip-tag {
display: inline-block;
background: rgba(0,245,255,0.1);
color: #00f5ff;
border: 1px solid rgba(0,245,255,0.3);
font-size: 0.75rem;
font-weight: 600;
padding: 2px 10px;
border-radius: 20px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
h2 { font-size: 1.3rem; font-weight: 600; margin: 36px 0 12px; color: #f0f0ff; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 24px 0 8px; color: #e0e0f0; }
p { margin-bottom: 16px; color: #c8c8d8; }
ul, ol { margin: 0 0 16px 24px; color: #c8c8d8; }
li { margin-bottom: 6px; }
code { background: #0e0e14; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; color: #00f5ff; }
pre {
background: #0e0e14;
border: 1px solid #1a1a24;
border-radius: 10px;
padding: 16px 20px;
margin: 0 0 20px;
overflow-x: auto;
font-size: 0.85rem;
color: #c8f0ff;
}
pre code { background: none; padding: 0; color: inherit; }
strong { color: #f0f0ff; }
.pro-tip {
background: rgba(0,245,255,0.06);
border-left: 3px solid #00f5ff;
border-radius: 8px;
padding: 16px 20px;
margin: 20px 0;
font-size: 0.92rem;
color: #d0d0e0;
}
.pro-tip strong { color: #00f5ff; }
.step-num {
display: inline-block;
background: #00f5ff;
color: #000;
font-weight: 700;
font-size: 0.75rem;
width: 24px;
height: 24px;
line-height: 24px;
text-align: center;
border-radius: 50%;
margin-right: 8px;
}
.cta-box {
background: #12121c;
border: 1px solid rgba(0,245,255,0.2);
border-radius: 14px;
padding: 28px 32px;
margin: 32px 0;
text-align: center;
}
.cta-box h3 { font-size: 1.2rem; margin-bottom: 8px; color: #f0f0ff; }
.cta-box p { color: #999; margin-bottom: 16px; }
.btn {
display: inline-block;
background: transparent;
border: 1px solid #00f5ff;
color: #00f5ff;
padding: 10px 28px;
border-radius: 8px;
font-weight: 600;
font-size: 0.95rem;
transition: all .2s;
}
.btn:hover { background: rgba(0,245,255,0.1); text-decoration: none; }
@media (max-width: 600px) {
body { padding: 24px 16px; }
h1 { font-size: 1.5rem; }
.cta-box { padding: 20px 16px; }
}
</style>
</head>
<body>
<div class="container">
<a class="back" href="https://derez.ai/#blog">&larr; Back to Blog</a>
<h1>Speed Run: Connect Hermes Agent to Odoo via MCP</h1>
<div class="meta">
<span>June 16, 2026</span>
<span class="area-tag">speed-run</span>
<span class="chip-tag">hermes</span>
<span class="chip-tag">mcp</span>
</div>
<p>
Earlier this week we showed you a <a href="https://derez.ai/blog/posts/speed-run-odoo-community-agent.html">speed run connecting Hermes Agent to Odoo via direct XML-RPC</a>
a dedicated Odoo user, direct API calls, no middle layer. That's the approach we recommend for production.
</p>
<p>
But there's another way: <strong>the Model Context Protocol (MCP)</strong>. Instead of the agent talking directly
to Odoo's API, an MCP server sits in between as a translation layer. The agent talks MCP, the MCP server talks
XML-RPC to Odoo. It's an open standard from Anthropic, adopted by Claude Desktop, VS Code, Cursor, and now
<strong>Hermes Agent</strong>.
</p>
<p>
This speed run walks through the MCP approach in 5 steps. Clone, configure, connect, done.
</p>
<div class="pro-tip">
<p><strong>Pro Tip:</strong> We covered the <a href="https://derez.ai/blog/posts/direct-odoo-api-vs-mcp.html">direct API vs MCP trade-offs in detail here</a>.
TL;DR: Direct access wins on security, latency, and flexibility for single-ERP setups. MCP shines when your agent
needs to talk to many different tools through one protocol. Pick the right tool for your use case.</p>
</div>
<h2>How It Works</h2>
<p>
The architecture is simple:
</p>
<pre><code>Hermes Agent → MCP Protocol → mcp-server-odoo → Odoo XML-RPC</code></pre>
<p>
The MCP server (<code>mcp-server-odoo</code> by <a href="https://github.com/ivnvxd/mcp-server-odoo?utm_source=derez">ivnvxd</a>, 300+ GitHub stars)
exposes a set of tools — <code>search_records</code>, <code>create_record</code>, <code>read_record</code>,
<code>count_records</code>, <code>inspect_model</code> — that your agent can call. It runs locally on your
Hermes instance and communicates over HTTP (streamable-http transport).
</p>
<h2>Prerequisites</h2>
<p>You'll need an Odoo instance with XML-RPC enabled and an API key. Grab a free trial from
<a href="https://ODOO4projects.com?utm_source=derez" target="_blank" rel="noopener">ODOO4projects.com</a> if you don't have one.</p>
<div class="prereq-group" style="margin-bottom:24px">
<p style="font-weight:600;color:#f472b6;margin-bottom:4px">Integration — ODOO Community</p>
<ul>
<li><strong>URL</strong><code>https://006-003-1d9183bb-8430-41a8-85a3-842b2b4d279d.odoo4projects.com/</code></li>
<li><strong>API Key</strong><code>602e6ea0a0adda65b344a282495da3b05525f63f</code></li>
<li><strong>Database</strong><code>006-003-1d9183bb-8430-41a8-85a3-842b2b4d279d</code></li>
<li><strong>Hermes Agent</strong> — Any Hermes instance (derez.ai or self-hosted) running on Linux</li>
</ul>
</div>
<h2>Step 1 — Clone the MCP Server</h2>
<p>
The MCP server runs on your <strong>local machine</strong> — the same server where Hermes Agent is installed.
It does <em>not</em> run on the Odoo server itself.
</p>
<pre><code>git clone https://github.com/ivnvxd/mcp-server-odoo.git
cd mcp-server-odoo</code></pre>
<p>
The repo has 315 stars, 144 forks, and 198 commits as of this writing. It's actively maintained and supports
Odoo 16.0+ with both standard (MCP module) and YOLO (direct XML-RPC) modes.
</p>
<h2>Step 2 — Install Dependencies</h2>
<p>
The recommended way to run it is via <code>uvx</code> (from the <code>uv</code> Python package manager).
If you don't have uv installed:
</p>
<pre><code>curl -LsSf https://astral.sh/uv/install.sh | sh</code></pre>
<p>
That's it — <code>uvx mcp-server-odoo</code> handles the rest automatically.
</p>
<h2>Step 3 — Create the Startup Script</h2>
<p>
Create a bash script that sets the environment variables and launches the MCP server in
<strong>YOLO read-only mode</strong> (no MCP module needed on the Odoo side):
</p>
<pre><code>#!/usr/bin/env bash
# Odoo MCP configuration
export ODOO_URL="https://006-003-1d9183bb-8430-41a8-85a3-842b2b4d279d.odoo4projects.com/"
export ODOO_DB="006-003-1d9183bb-8430-41a8-85a3-842b2b4d279d"
export ODOO_USER="changeme@odoo4projects.com"
export ODOO_API_KEY="602e6ea0a0adda65b344a282495da3b05525f63f"
export ODOO_READONLY=1
export ODOO_MCP_TRANSPORT=streamable-http
export ODOO_MCP_PORT=8000
export ODOO_YOLO=read
uvx mcp-server-odoo</code></pre>
<p>
Save this as <code>run-odoo-mcp.sh</code>, make it executable (<code>chmod +x run-odoo-mcp.sh</code>), and
run it. The server starts on <code>http://localhost:8000/mcp</code>.
</p>
<div class="pro-tip">
<p><strong>Pro Tip:</strong> YOLO mode (<code>ODOO_YOLO=read</code>) bypasses the need for the Odoo MCP module.
This is great for testing and speed runs. For production, install the
<a href="https://apps.odoo.com/apps/modules/19.0/mcp_server?utm_source=derez" target="_blank" rel="noopener">Odoo MCP module</a>
on your Odoo instance and set <code>ODOO_YOLO=off</code> for full security controls.</p>
</div>
<h2>Step 4 — Register the MCP Server with Hermes</h2>
<p>
With the MCP server running, tell Hermes Agent about it:
</p>
<pre><code>hermes mcp add odoo --url http://localhost:8000/mcp</code></pre>
<p>
This registers the MCP endpoint with Hermes. From now on, any Hermes session can discover the Odoo tools
automatically. The <code>hermes mcp add</code> command takes a name (we used <code>odoo</code>) and the
server's URL.
</p>
<p>
To verify it worked:
</p>
<pre><code>hermes mcp list</code></pre>
<p>
You should see <code>odoo</code> listed with status <code>connected</code>.
</p>
<h2>Step 5 — Start Hermes and Use the Tools</h2>
<p>
Start a Hermes session and ask your agent to work with Odoo:
</p>
<pre><code>hermes run</code></pre>
<p>
Then in the chat, try something like:
</p>
<pre><code>Show me my 5 most recent leads from Odoo CRM.</code></pre>
<p>
The agent discovers the available MCP tools, calls <code>search_records</code> on the
<code>crm.lead</code> model, and returns the results. Same goes for partners, products, invoices,
sales orders — any model your Odoo user has access to.
</p>
<h2>Comparison at a Glance</h2>
<div style="background:#12121c;border:1px solid #1a1a2e;border-radius:14px;padding:20px 24px;margin:20px 0;">
<table style="width:100%;border-collapse:collapse;font-size:0.9rem;">
<tr>
<th style="text-align:left;padding:8px 12px;color:#00f5ff;font-weight:600;border-bottom:1px solid #1a1a2e;">Aspect</th>
<th style="text-align:left;padding:8px 12px;color:#f472b6;font-weight:600;border-bottom:1px solid #1a1a2e;">Direct API (Speed Run)</th>
<th style="text-align:left;padding:8px 12px;color:#ffaa00;font-weight:600;border-bottom:1px solid #1a1a2e;">MCP (This Post)</th>
</tr>
<tr>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">Setup time</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">~3 min (paste credentials)</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">~5 min (clone + run server)</td>
</tr>
<tr>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">Components</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">None — agent talks directly to Odoo</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">MCP server process + Hermes MCP client</td>
</tr>
<tr>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">Latency</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">1 hop (agent → Odoo)</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">2 hops (agent → MCP → Odoo)</td>
</tr>
<tr>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">Tool surface</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">Full Odoo model access (any method)</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:1px solid #1a1a2e;">Predefined MCP tools (search, read, create, etc.)</td>
</tr>
<tr>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:none;">Multi-tool agent</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:none;">Each tool needs its own integration</td>
<td style="padding:8px 12px;color:#c8c8d8;border-bottom:none;">One protocol for all tools (GitHub, Slack, Jira, etc.)</td>
</tr>
</table>
</div>
<h2>Wrap Up</h2>
<p>
In 5 steps and about 5 minutes, you connected Hermes Agent to Odoo through the Model Context Protocol.
Clone the repo, set the env vars, start the server, register with Hermes, and your agent can query
CRM leads, partners, products, invoices — anything your Odoo user has access to.
</p>
<p>
Which approach should you use?
</p>
<ul>
<li><strong>Direct API</strong> — if Hermes Agent is your only tool and Odoo is your only backend. Faster,
no middle layer, full model access.</li>
<li><strong>MCP</strong> — if you're building a multi-tool agent (Odoo + GitHub + Notion + Slack) and want
one protocol to rule them all.</li>
</ul>
<p>
Both work. Both connect your agent to live Odoo data. Both take under 10 minutes. The right choice
depends on your architecture.
</p>
<div class="pro-tip">
<p><strong>Pro Tip:</strong> You can run both. Use MCP for the tools that benefit from a unified protocol
(docs, chat, code repos) and direct API for Odoo. Hermes Agent supports mixed setups — MCP tools and
direct integrations coexist in the same session. Pick the best connection for each backend.</p>
</div>
<div class="cta-box">
<h3>Try It Yourself — $9.50 Off</h3>
<p>Deploy a Hermes Agent in 10 minutes with either MCP or direct Odoo integration. Use coupon code
<strong>BLOG950</strong> for $9.50 off your first month.</p>
<a href="https://derez.ai/#pricing" class="btn">Get Your Agent →</a>
</div>
<p style="margin-top:48px;padding-top:24px;border-top:1px solid #1a1a2e;font-size:0.85rem;color:#666;">
<a href="https://derez.ai" style="color:#00f5ff">derez.ai</a> — Deploy your AI agent in 10 Minutes. &middot;
<a href="https://derez.ai/blog/posts/direct-odoo-api-vs-mcp.html">Direct Odoo API vs MCP</a> &middot;
<a href="https://derez.ai/blog/posts/speed-run-odoo-community-agent.html">Direct Odoo Speed Run</a>
</p>
</div>
</body>
</html>