DCAP Disco

DCAP Disco

Connects to the DCAP intelligence stream to discover and cache tools in real time, and enables autonomous tool acquisition by allowing agents to call any discovered tool without manual configuration, including automatic x402 payment handling.

Category
Visit Server

README

DCAP Disco - Real-Time Tool Discovery MCP Server

This project implements a DCAP (Dynamic Capability Acquisition Protocol) MCP server that connects to the DCAP intelligence stream and provides real-time access to tool discovery data.

Features

  • DCAP Stream Connection: Connects to ws://159.89.110.236:10191 for real-time tool intelligence
  • FIFO Cache: Maintains up to 100 most recently discovered tools with deduplication
  • MCP Tools: Exposes 7 tools for querying AND CALLING discovered tools
  • Autonomous Tool Acquisition: Call ANY discovered tool at runtime without manual configuration
  • x402 Payment Support: Automatic payment creation for paid tools using pipe402
  • Multi-Transport Support: SSE, HTTP streaming for remote MCP servers
  • Auto-Reconnect: Automatically reconnects if the DCAP stream connection drops
  • Real-time Updates: Processes semantic_discover, perf_update, observed_sequence, and error_pattern messages

Installation

  1. Clone this repository:

    git clone https://github.com/boorich/dcap_disco.git
    cd dcap_disco
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Configure environment (optional, for x402 payments):

    # Create .env file
    echo "X402_PRIVATE_KEY=0x..." > .env
    
    # Or export directly
    export X402_PRIVATE_KEY=0x...
    
  4. Ensure pipe402 is installed (for x402 payment support):

    which pipe402  # Should return path to pipe402 binary
    

Usage

Running the DCAP Disco MCP Server

python server.py

The server will:

  • Connect to the DCAP intelligence stream
  • Start caching tool discoveries and performance data
  • Expose MCP tools for querying the cached data

Configuring in Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "dcap-disco": {
      "command": "python",
      "args": ["/absolute/path/to/server.py"]
    }
  }
}

Configuring in Cursor

Add to your MCP settings:

{
  "mcpServers": {
    "dcap-disco": {
      "command": "python",
      "args": ["/absolute/path/to/server.py"]
    }
  }
}

Available MCP Tools

list_discovered_tools

Get all tools currently in the cache (up to 100 most recent).

Returns: List of tool discovery messages with capabilities, endpoints, and stats.

search_tools_by_capability

Search for tools by keyword in their capabilities.

Parameters:

  • query (string): Search keywords

Returns: Matching tools

get_tool_details

Get detailed information about a specific tool.

Parameters:

  • tool_name (string): Name of the tool

Returns: Tool metadata with performance history

get_recent_activity

Get recent performance updates from all tools.

Parameters:

  • limit (number, optional): Max results (default: 20, max: 100)
  • tool_name (string, optional): Filter by specific tool

Returns: Recent performance updates

get_tool_sequences

Get observed tool execution sequences (chains).

Parameters:

  • limit (number, optional): Max sequences (default: 10)

Returns: Tool usage patterns

get_stream_status

Get DCAP stream connection status.

Returns: Connection stats and cache size

call_discovered_tool ⭐ NEW

Call a discovered tool at runtime - enables autonomous tool acquisition!

This is the killer feature: you can invoke ANY tool discovered via DCAP without manual configuration. The server:

  1. Looks up the tool in cache (from semantic_discover messages)
  2. Creates x402 payment if needed (using pipe402)
  3. Establishes MCP connection (SSE/HTTP)
  4. Calls the remote tool
  5. Returns result

Parameters:

  • tool_identifier (string): Format "tool_name@server_id" (e.g., "validate_daml_business_logic@canton-mcp") or just "tool_name"
  • arguments (object): Tool-specific arguments

Returns: Tool execution result

Example:

{
  "tool_identifier": "validate_daml_business_logic@canton-mcp",
  "arguments": {
    "daml_code": "template MyContract with ..."
  }
}

Demo Flow:

1. Canton MCP broadcasts semantic_discover
   → DCAP Disco caches: validate_daml_business_logic@canton-mcp

2. Agent queries: list_discovered_tools
   → Sees: validate_daml_business_logic@canton-mcp

3. Agent calls: call_discovered_tool
   → DCAP Disco:
     - Creates x402 payment (pipe402)
     - Connects to Canton MCP (SSE)
     - Calls validate_daml_business_logic
     - Returns result

4. Agent gets result - no manual configuration needed!

Environment Variables

Required for x402 Payment

  • X402_PRIVATE_KEY: Private key for creating x402 payments (hex string starting with 0x)

Optional Bearer Tokens

For tools requiring bearer token auth, set:

  • <SERVER_ID>_TOKEN: Token for specific server (e.g., ROBONET_MCP_TOKEN)

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                    DCAP Disco MCP Server                        │
│                                                                 │
│  ┌──────────────┐      ┌─────────────┐      ┌───────────────┐ │
│  │ DCAP Stream  │─────▶│   Cache     │─────▶│  MCP Tools    │ │
│  │   Client     │      │ (Discover)  │      │ (Query/List)  │ │
│  └──────────────┘      └─────────────┘      └───────────────┘ │
│                                                                 │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │           Tool Connection Manager (NEW!)                  │  │
│  │                                                           │  │
│  │  ┌──────────┐  ┌──────────┐  ┌──────────────────────┐  │  │
│  │  │  x402    │  │   MCP    │  │  Dynamic Tool Call   │  │  │
│  │  │ Payment  │─▶│  Client  │─▶│  (SSE/HTTP/stdio)    │  │  │
│  │  │ (pipe402)│  │ (httpx)  │  │                      │  │  │
│  │  └──────────┘  └──────────┘  └──────────────────────┘  │  │
│  └──────────────────────────────────────────────────────────┘  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
           │                                    ▲
           │ discovers                          │ invokes
           ▼                                    │
  ┌──────────────────┐                 ┌──────────────────┐
  │  Canton MCP      │                 │  Canton MCP      │
  │  (broadcasts)    │                 │  (executes)      │
  └──────────────────┘                 └──────────────────┘

What Makes This Special?

Traditional MCP Setup:

// You must manually configure EVERY tool server:
{
  "mcpServers": {
    "canton-mcp": { "command": "...", "args": [...] },
    "robonet-mcp": { "command": "...", "args": [...] },
    "workbench-mcp": { "command": "...", "args": [...] }
    // ... manually add 100 more ...
  }
}

With DCAP Disco:

// You configure ONLY the dcap-disco server:
{
  "mcpServers": {
    "dcap-disco": { "command": "python", "args": ["server.py"] }
  }
}

// Now you can call ANY tool discovered on the network!
// No manual configuration. Just discovery + acquisition.

This is "Google for AI agents" - autonomous capability acquisition at runtime.

Use Cases

1. Zero-Config Tool Access

Agent: "What DAML validation tools are available?"
DCAP Disco: "validate_daml_business_logic@canton-mcp"

Agent: "Call it with this code..."
DCAP Disco: 
  - Creates x402 payment automatically
  - Connects to Canton MCP
  - Calls tool
  - Returns result

NO MANUAL CONFIGURATION!

2. Multi-Server Orchestration

Agent task: "Build a DAML contract AND test a trading strategy"

Agent:
1. Calls validate_daml_business_logic@canton-mcp
   → DCAP Disco connects to Canton MCP (first time)
   
2. Calls get_strategy_code@robonet-mcp
   → DCAP Disco connects to Robonet MCP (first time)

All automatic. All paid via x402. All discovered via DCAP.

3. Real-Time Network Intelligence

Show VC:
- Stream of tools being discovered (semantic_discover)
- Agent querying available tools (list_discovered_tools)
- Agent calling tools dynamically (call_discovered_tool)
- x402 payments flowing
- Intelligence emerging from usage patterns

THIS IS THE FUTURE OF MCP.

License

MIT License

Contributing

Pull requests welcome! For major changes, please open an issue first.

Contact

Questions? Reach out via [empeamtk@googlemail.com]


Ready to show VCs the future of autonomous agents? 🚀

This is what happens when you combine:

  • DCAP (the open protocol for tool discovery)
  • x402 (streaming micropayments for tool usage)
  • MCP (the standard for agent-tool communication)

Result: Agents that can discover and use tools autonomously, with no manual configuration.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured