← All posts

Building a Federated Model Context Protocol Registry: Dynamic Discovery for Autonomous Agents

Moving beyond hardcoded configurations to a decentralized, self-configuring directory schema for AI tool discovery.

2026-05-27

The Hardcoded Integration Wall

We are building increasingly powerful autonomous AI agents, yet our integration plumbing is stuck in the past.

If you inspect a production-grade Cursor, Claude Desktop, or Claude Code editor today, you’ll find that every single tool integration is hardcoded. If you want to give the assistant access to Slack, Stripe, or a local database, you must manually write and save configuration files (like claude_desktop_config.json):

{
  "mcpServers": {
    "stripe": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-stripe"]
    }
  }
}

This works fine for a developer’s local laptop. But as we transition to fully autonomous, multi-agent networks that navigate the public web, this static, hardcoded paradigm fails.

An autonomous web agent cannot predict which digital storefront, API specification, or SaaS database it will encounter during its execution sweep. If the agent is instructed to "Audit our payments across Stripe, verify stock on everlane.com, and log the results in Notion," it cannot stop and ask a human developer to write custom JSON configuration blocks for each system.

To achieve true agent autonomy, we must move beyond hardcoded lists and build Federated Model Context Protocol Registries.

By standardizing a decentralized tool discovery protocol, agents can dynamically query public directories, resolve API schemas on the fly, validate security credentials, and register new tools programmatically at runtime.


Designing a Federated Registry Architecture

A federated MCP registry functions as a decentralized domain name system (DNS) for AI tools. The architecture consists of three core components:

┌────────────────────────────────────────────────────────────────────────┐
│                        Federated Registry Flow                         │
├────────────────────────────────────────────────────────────────────────┤
│  1. Publisher: Publishes OpenAPI Spec → Edge Gateway Registry          │
├────────────────────────────────────────────────────────────────────────┤
│  2. Edge Registry: Indexes & compiles spec to standard MCP schema     │
├────────────────────────────────────────────────────────────────────────┤
│  3. Agent Client: Queries Registry → Resolves tool dynamically         │
└────────────────────────────────────────────────────────────────────────┘
  1. The Tool Publisher: API builders, storefronts, and SaaS platforms host a standardized manifest file at a known path (e.g. /.well-known/mcp.json). This file points to their OpenAPI specifications and outlines required authentication methods.
  2. The Federated Registry Nodes: Edge-hosted directories (such as wmcp.sh) that continuously crawl these manifests, compile raw OpenAPI specs into standardized MCP tool schemas, and index them globally.
  3. The Dynamic Agent Client: When the orchestrator encounters a target domain (e.g., everlane.com), it queries the federated registry. The registry returns the dynamic tool schemas and edge execution endpoints. The agent binds these tools in memory, resolves credentials using an out-of-band PKCE proxy, and executes actions immediately.

This eliminates static build steps and environment setup debt entirely, allowing agents to self-configure on the fly.


Dynamic tool Discovery in Python

Below is a complete, production-grade Python script illustrating how an autonomous agent can query a federated MCP registry, dynamically resolve a storefront's tool schemas at runtime, and bind them to a standard tool execution loop:

import json
import requests

class FederatedMcpRegistry:
    def __init__(self, registry_endpoint: str = "https://wmcp.sh/api/v1"):
        self.registry = registry_endpoint

    def discover_tools(self, target_host: str) -> dict | None:
        """Dynamic discovery: query the edge registry for a specific domain."""
        print(f"[Discovery] Querying federated registry for: {target_host}...")
        try:
            r = requests.get(
                f"{self.registry}/tools",
                params={"url": f"https://{target_host}"},
                timeout=8
            )
            if r.status_code != 200:
                print(f"[Discovery Fail] No registered tools found for {target_host}")
                return None
            return r.json()
        except Exception as e:
            print(f"[Discovery Error] Connection failed: {str(e)}")
            return None

class AutonomousAgentOrchestrator:
    def __init__(self):
        self.registry = FederatedMcpRegistry()
        self.active_tool_cache = {}

    def prepare_execution_context(self, domain: str) -> bool:
        """Resolve, validate, and bind tools programmatically at runtime."""
        tool_data = self.registry.discover_tools(domain)
        if not tool_data:
            return False
            
        host = tool_data.get("host")
        tools = tool_data.get("tools", [])
        
        # Cache tools in memory
        self.active_tool_cache[host] = {
            "tools": tools,
            "adapter": tool_data.get("adapter", "generic"),
            "endpoints": tool_data.get("endpoints", {})
        }
        
        print(f"[Context Loaded] Dynamically bound {len(tools)} tools for {host}!")
        return True

# Local Verification Run
if __name__ == "__main__":
    orchestrator = AutonomousAgentOrchestrator()
    
    # Dynamic web target encountered during execution sweep
    target_site = "www.everlane.com"
    
    # Agent self-configures by fetching from federated registry
    success = orchestrator.prepare_execution_context(target_site)
    
    if success:
        cached_data = orchestrator.active_tool_cache[target_site]
        print("\nActive Tool Bindings:")
        for tool in cached_data["tools"][:3]:
            print(f" - Tool: {tool['name']} | Description: {tool['description'][:50]}...")

Scaling the Agentic Web

At wmcp.sh, we built our platform to serve as the foundational Federated Registry Node for e-commerce and OpenAPI specs.

Instead of requiring developers to manually build and register individual server blocks, our edge-hosted Cloudflare Worker indexes public storefront APIs and SaaS definitions dynamically, enabling autonomous assistants to discover, authenticate, and execute integrations on demand globally.

Stop building closed, hardcoded tool silos. Embrace decentralized, federated registries, let edge CDNs handle dynamic discovery, and help scale the open agentic web today.

Want this implemented on your stack? Custom adapter + hosted MCP + verified directory listing. From $499 one-time setup.
See /managed → Submit (free)