<?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: Mario Thomas</title>
    <description>The latest articles on DEV Community by Mario Thomas (@mariothomas).</description>
    <link>https://dev.to/mariothomas</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%2F3803456%2F6c797372-0834-4d6f-b8d4-52453347a91d.png</url>
      <title>DEV Community: Mario Thomas</title>
      <link>https://dev.to/mariothomas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mariothomas"/>
    <language>en</language>
    <item>
      <title>MCP has a discovery problem. Here's a fix.</title>
      <dc:creator>Mario Thomas</dc:creator>
      <pubDate>Wed, 04 Mar 2026 09:54:21 +0000</pubDate>
      <link>https://dev.to/mariothomas/mcp-has-a-discovery-problem-heres-a-fix-1paa</link>
      <guid>https://dev.to/mariothomas/mcp-has-a-discovery-problem-heres-a-fix-1paa</guid>
      <description>&lt;p&gt;Model Context Protocol defines how AI agents connect to tools. It says nothing about how agents discover which tools exist.&lt;/p&gt;

&lt;p&gt;Today, the answer is manual configuration. A developer decides which MCP servers an agent has access to, hard-codes those addresses at build time, and hopes the list stays accurate. This works for a single developer with a handful of tools. It doesn't work for an organisation deploying dozens of agents across hundreds of systems.&lt;/p&gt;

&lt;p&gt;The problem has a name in distributed systems: the n×m integration problem. n agents × m servers = n×m bespoke configuration decisions. With a discovery layer, that becomes n+m: each agent knows where to find the registry, each server registers itself once.&lt;/p&gt;

&lt;h2&gt;
  
  
  DNS has solved this before
&lt;/h2&gt;

&lt;p&gt;Email clients find mail servers via MX records. Services advertise endpoints via SRV records. &lt;code&gt;_dmarc&lt;/code&gt; handles email authentication. In each case the pattern is the same: a well-known naming convention points any compliant client to the right service, without prior configuration or bilateral agreement between the parties.&lt;/p&gt;

&lt;p&gt;The same pattern works for MCP.&lt;/p&gt;

&lt;h2&gt;
  
  
  The proposal
&lt;/h2&gt;

&lt;p&gt;Publish a single DNS TXT record at &lt;code&gt;_mcp.yourdomain.com&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_mcp.yourdomain.com  300  IN  TXT  "v=mcp1;
  registry=https://mcp.yourdomain.com/registry;
  public=true;
  auth=https://auth.yourdomain.com/token;
  version=2026-02"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any compliant agent that knows your domain resolves that record and finds your entire MCP ecosystem. No central directory. No proprietary SDK. No new protocol.&lt;/p&gt;

&lt;h2&gt;
  
  
  The registry is itself an MCP server
&lt;/h2&gt;

&lt;p&gt;This is the key design decision. Rather than introducing a separate discovery API, the registry exposes four tools via the standard MCP protocol:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;discover_servers&lt;/code&gt; — returns all servers the agent is authorised to see&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_server_details&lt;/code&gt; — returns connection details for a specific server&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;search_servers&lt;/code&gt; — searches by capability, data type, or keyword&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;check_server_health&lt;/code&gt; — returns last-known health status&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agents discover the registry using the same &lt;code&gt;tools/list&lt;/code&gt; and &lt;code&gt;tools/call&lt;/code&gt; calls they already make. Zero new client behaviour required. An agent that speaks MCP can use this registry without modification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Public and private in one deployment
&lt;/h2&gt;

&lt;p&gt;The registry supports two access tiers from a single deployment. Unauthenticated requests return public servers — tools any agent can use. Authenticated requests (RS256 JWT bearer token) additionally surface private servers — internal systems, sensitive data, governed tools.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;auth=&lt;/code&gt; field in the DNS record is a pointer to a token endpoint. It's a signpost, not a gate. Authentication and authorisation remain the responsibility of the registry and each individual MCP server.&lt;/p&gt;

&lt;h2&gt;
  
  
  The discovery flow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Agent resolves _mcp.yourdomain.com TXT record
2. Agent finds registry URL: https://mcp.yourdomain.com/registry
3. Agent sends tools/list to registry — gets discover_servers tool
4. Agent calls discover_servers — gets list of available MCP servers
5. Agent connects to individual servers and calls tools/list on each
6. Agent now has full capability picture — ready to act
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Steps 1–4 are what this proposal addresses. Step 5 onwards is standard MCP.&lt;/p&gt;

&lt;h2&gt;
  
  
  The governance angle
&lt;/h2&gt;

&lt;p&gt;Every registry change is a pull request. An engineer raises a PR to the registry repository. A designated reviewer approves it. On merge, a GitHub Actions workflow writes the change to DynamoDB. Every change is attributed, reviewed, and revertible.&lt;/p&gt;

&lt;p&gt;The read path is fully serverless — CloudFront and &lt;a href="mailto:Lambda@Edge"&gt;Lambda@Edge&lt;/a&gt;. The write path is where governance lives. This produces something organisations will increasingly need: a queryable log of every agent that accessed the registry, what it requested, and when.&lt;/p&gt;

&lt;h2&gt;
  
  
  Infrastructure and cost
&lt;/h2&gt;

&lt;p&gt;The reference implementation uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS Lambda@Edge&lt;/strong&gt; — request parsing, JWT validation, JSON-RPC routing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon DynamoDB Global Tables&lt;/strong&gt; — registry data, globally replicated&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon CloudFront&lt;/strong&gt; — global distribution, sub-50ms response times&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route 53&lt;/strong&gt; — DNS hosting for the &lt;code&gt;_mcp&lt;/code&gt; record&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Total cost at 1 million queries/month: under $5. The architecture is vendor-neutral — equivalent implementations are possible on Cloudflare Workers + KV, Azure Front Door + Cosmos DB, or any CDN with edge compute and an associated data store.&lt;/p&gt;

&lt;h2&gt;
  
  
  It's live right now
&lt;/h2&gt;

&lt;p&gt;A working reference implementation is running at &lt;a href="https://mcp.mariothomas.com" rel="noopener noreferrer"&gt;mcp.mariothomas.com&lt;/a&gt;. Three servers registered: articles and locations (public), documents (authenticated).&lt;/p&gt;

&lt;p&gt;Verify the DNS record:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig TXT _mcp.mariothomas.com +short
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Query the live registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://mcp.mariothomas.com/registry &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"discover_servers","arguments":{}}}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Where to go next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full architecture paper&lt;/strong&gt; (security model, IANA considerations, deployment guide): &lt;a href="https://mariothomas.com/whitepapers/mcp-dns-registry/" rel="noopener noreferrer"&gt;mariothomas.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source code, SPEC.md, CloudFormation template&lt;/strong&gt;: &lt;a href="https://github.com/mariothomas/mcp-dns-registry" rel="noopener noreferrer"&gt;github.com/mariothomas/mcp-dns-registry&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community discussion&lt;/strong&gt;: open in the &lt;a href="https://github.com/modelcontextprotocol/modelcontextprotocol/discussions/2334" rel="noopener noreferrer"&gt;modelcontextprotocol/modelcontextprotocol&lt;/a&gt; repository&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The proposal is seeking community feedback — particularly on the field syntax, the layering model relative to SEP #1959, and the path to formal standardisation. Issues and alternative implementations are welcome.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>dns</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
