<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MCP guides on Mergeway</title><link>https://mergewayhq.github.io/docs/how-to/mcp/</link><description>Recent content in MCP guides on Mergeway</description><generator>Hugo</generator><language>en</language><atom:link href="https://mergewayhq.github.io/docs/how-to/mcp/index.xml" rel="self" type="application/rss+xml"/><item><title>Connect Codex over stdio</title><link>https://mergewayhq.github.io/docs/how-to/mcp/connect-stdio/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/how-to/mcp/connect-stdio/</guid><description>&lt;h1 id="connect-codex-over-stdio"&gt;Connect Codex over stdio&lt;a class="anchor" href="#connect-codex-over-stdio"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Install &lt;code&gt;mergeway-mcp&lt;/code&gt;, validate the repository, and resolve both paths:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;command -v mergeway-mcp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd /path/to/repository
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mergeway-cli validate
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pwd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add the local server. Replace both example paths with the absolute values above:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;codex mcp add mergeway -- /absolute/path/to/mergeway-mcp &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --root /absolute/path/to/repository
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;codex mcp list&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Codex CLI and the Codex IDE extension share MCP configuration. The equivalent &lt;code&gt;~/.codex/config.toml&lt;/code&gt; entry is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[&lt;span style="color:#a6e22e"&gt;mcp_servers&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;mergeway&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;command&lt;/span&gt; = &lt;span style="color:#e6db74"&gt;&amp;#34;/absolute/path/to/mergeway-mcp&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;args&lt;/span&gt; = [&lt;span style="color:#e6db74"&gt;&amp;#34;--root&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;/absolute/path/to/repository&amp;#34;&lt;/span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Restart a running client so it reloads configuration. Ask it to list the Mergeway entities, then compare the answer with &lt;code&gt;mergeway-cli entity list&lt;/code&gt;. If the server is missing, use &lt;code&gt;codex mcp --help&lt;/code&gt;, &lt;code&gt;codex mcp list&lt;/code&gt;, and the &lt;a href="../troubleshoot/"&gt;troubleshooting guide&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Restrict MCP to selected entities</title><link>https://mergewayhq.github.io/docs/how-to/mcp/restrict-entities/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/how-to/mcp/restrict-entities/</guid><description>&lt;h1 id="restrict-mcp-to-selected-entities"&gt;Restrict MCP to selected entities&lt;a class="anchor" href="#restrict-mcp-to-selected-entities"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Choose the minimum exact entity set the task needs. For example, expose users and posts but not comments or tags:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mergeway-mcp --root /absolute/path/to/repository &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --entity User --entity Post&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Put the same repeated arguments in a stdio client&amp;rsquo;s configuration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[&lt;span style="color:#a6e22e"&gt;mcp_servers&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;mergeway&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;command&lt;/span&gt; = &lt;span style="color:#e6db74"&gt;&amp;#34;/absolute/path/to/mergeway-mcp&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;args&lt;/span&gt; = [
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;--root&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;/absolute/path/to/repository&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;--entity&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;User&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;--entity&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;Post&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Restart the client. &lt;code&gt;entity_list&lt;/code&gt; should return only &lt;code&gt;Post&lt;/code&gt; and &lt;code&gt;User&lt;/code&gt;; &lt;code&gt;entity_show&lt;/code&gt; for &lt;code&gt;Comment&lt;/code&gt; should fail with &lt;code&gt;entity_not_allowed&lt;/code&gt;. Names are case-sensitive. Inheritance does not widen the rule: allowing a parent does not allow its descendants.&lt;/p&gt;</description></item><item><title>Serve MCP over HTTP</title><link>https://mergewayhq.github.io/docs/how-to/mcp/serve-http/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/how-to/mcp/serve-http/</guid><description>&lt;h1 id="serve-mcp-over-http"&gt;Serve MCP over HTTP&lt;a class="anchor" href="#serve-mcp-over-http"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Prefer stdio for one local client. Use HTTP when a compatible client needs a separately managed streamable endpoint.&lt;/p&gt;
&lt;p&gt;Start the loopback-only default:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mergeway-mcp --root /absolute/path/to/repository --transport&lt;span style="color:#f92672"&gt;=&lt;/span&gt;http&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Configure the client endpoint as &lt;code&gt;http://127.0.0.1:8080/&lt;/code&gt;. To avoid a port conflict or mount behind a local proxy:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mergeway-mcp --root /absolute/path/to/repository &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --transport&lt;span style="color:#f92672"&gt;=&lt;/span&gt;http &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --http-listen 127.0.0.1:9090 &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --http-base-path /mcp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The endpoint is then &lt;code&gt;http://127.0.0.1:9090/mcp&lt;/code&gt;; &lt;code&gt;/&lt;/code&gt; and &lt;code&gt;/mcp/anything&lt;/code&gt; return &lt;code&gt;404&lt;/code&gt;. Configure &lt;code&gt;--entity&lt;/code&gt; at server startup when the client should see less than the whole repository.&lt;/p&gt;</description></item><item><title>Troubleshoot MCP connections and stdout</title><link>https://mergewayhq.github.io/docs/how-to/mcp/troubleshoot/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/how-to/mcp/troubleshoot/</guid><description>&lt;h1 id="troubleshoot-mcp-connections-and-stdout"&gt;Troubleshoot MCP connections and stdout&lt;a class="anchor" href="#troubleshoot-mcp-connections-and-stdout"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="the-process-exits-immediately"&gt;The process exits immediately&lt;a class="anchor" href="#the-process-exits-immediately"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Run the configured command directly with the same absolute paths. Diagnostics are on stderr:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/absolute/path/to/mergeway-mcp --root /absolute/path/to/repository --help
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/absolute/path/to/mergeway-mcp --root /absolute/path/to/repository &amp;lt; /dev/null&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Check that the root exists, contains &lt;code&gt;mergeway.yaml&lt;/code&gt; or &lt;code&gt;mergeway.yml&lt;/code&gt; directly, and every &lt;code&gt;--entity&lt;/code&gt; uses exact case. Exit &lt;code&gt;2&lt;/code&gt; indicates flags; exit &lt;code&gt;1&lt;/code&gt; indicates repository or server startup/runtime.&lt;/p&gt;
&lt;h2 id="the-client-reports-invalid-json-or-loses-the-stdio-connection"&gt;The client reports invalid JSON or loses the stdio connection&lt;a class="anchor" href="#the-client-reports-invalid-json-or-loses-the-stdio-connection"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Remove wrappers that print banners, shell tracing, progress, or logging to stdout. Stdio reserves stdout for newline-delimited JSON-RPC. Send wrapper diagnostics to stderr. Do not run the server through a formatter or pipe that rewrites stdout.&lt;/p&gt;</description></item></channel></rss>