Skip to main content
Glama
README.md
# d3p MCP Server

MCP server for the [digital3 agent protocol (d3p)](https://digital3.ai) — exposes all d3p services as MCP tools that any MCP client can call.

Auto-discovers services from the d3p manifest and registers each as a tool, plus protocol-level tools for discovery, compatibility checking, pipeline execution, reputation, and pricing.

## Quick Start

### Install

```bash
pip install d3p-mcp-server
```

Or install from source:

```bash
git clone https://github.com/digital3/d3p-mcp-server.git
cd d3p-mcp-server
pip install -e .
```

### Claude Desktop

Add to your `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`, Windows: `%APPDATA%\Claude\claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "d3p": {
      "command": "d3p-mcp-server",
      "env": {
        "D3P_BASE_URL": "https://labs.digital3.ai",
        "D3P_MOCK_PAYMENTS": "true"
      }
    }
  }
}
```

Or run directly with Python:

```json
{
  "mcpServers": {
    "d3p": {
      "command": "python3",
      "args": ["-m", "d3p_mcp_server"],
      "env": {
        "D3P_MOCK_PAYMENTS": "true"
      }
    }
  }
}
```

### Claude Code

```bash
claude mcp add d3p -- d3p-mcp-server
```

### SSE Mode (Remote)

```bash
d3p-mcp-server --sse --port 8888
```

## Available Tools

### Service Tools (auto-discovered)

Each d3p service is registered as `d3p_{service_id}`. All accept a JSON string parameter with the service's input fields.

Examples: `d3p_btc-price`, `d3p_search`, `d3p_weather`, `d3p_vibe-check`, etc.

### Protocol Tools

| Tool | Description |
|------|-------------|
| `d3p_list_services` | List all services with pricing and descriptions |
| `d3p_discover` | Search services by capability, price, reputation, latency |
| `d3p_check_compatibility` | Check if two services can be chained (output→input) |
| `d3p_pipeline_execute` | Execute a multi-service pipeline with atomic payments |
| `d3p_pipeline_status` | Check status of a running pipeline |
| `d3p_pipeline_result` | Get final result of a completed pipeline |
| `d3p_pipeline_validate` | Dry-run a pipeline (cost estimate, no execution) |
| `d3p_pipeline_templates` | List pre-built pipeline templates |
| `d3p_reputation` | Get reputation score for a service |
| `d3p_price_quote` | Get dynamic price quote for a service |
| `d3p_protocol_info` | Get protocol configuration info |

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `D3P_BASE_URL` | `https://labs.digital3.ai` | Base URL for d3p services |
| `D3P_MANIFEST_URL` | `{BASE_URL}/api/services/manifest` | Manifest endpoint |
| `D3P_MOCK_PAYMENTS` | `true` | Set `false` for live L402 Lightning payments |
| `D3P_TIMEOUT` | `15` | Request timeout in seconds |

## Examples

### List services
Ask Claude: "What d3p services are available?"

### Get Bitcoin price
Ask Claude: "Use d3p to get the current Bitcoin price in USD"

### Chain services
Ask Claude: "Search for Bitcoin news and then run sentiment analysis on the results using d3p"

### Discover by capability
Ask Claude: "Find d3p services that do text analysis for under 50 sats"

## Architecture

```
Claude Desktop / claude-code / Cursor
    │
    │ MCP (stdio or SSE)
    ▼
d3p MCP Server
    │
    │ HTTPS
    ▼
labs.digital3.ai (d3p protocol)
    │
    │ L402 Lightning
    ▼
autonom rails (payment layer)
```

## Development

```bash
git clone https://github.com/digital3/d3p-mcp-server.git
cd d3p-mcp-server
pip install -e .
d3p-mcp-server --test
```

## License

MIT

TDQS

B3.1/5.0

Scored across 34 tools

Disambiguation4/5

Most tools have distinct purposes, but there are a few overlaps: d3p_btc-price and d3p_bitcoin-price-in-gold-ounces both deal with Bitcoin price, and d3p_vibe-check and d3p_emoji-sentiment both analyze sentiment. The pipeline tools are distinct from the utility tools, but within the utility set, some boundaries are fuzzy.

Naming Consistency2/5

Tool names mix conventions: some use hyphens (d3p_ext-search-v2, d3p_btc-price), some use underscores (d3p_vibe_check? Actually it's d3p_vibe-check with hyphen, but also d3p_list_services with underscore), and verbs vary (list, discover, check, execute). There is no consistent verb_noun pattern, and the prefix 'd3p_' is the only unifying element.

Tool Count3/5

With 34 tools, the server feels slightly overloaded. The pipeline management tools (approx. 6) are well-scoped, but the remaining 28 utility tools range from essential (weather, search) to niche (cat-name-generator, roast-my-idea). The count is borderline heavy for a coherent set.

Completeness3/5

The pipeline and service discovery tools seem complete (execute, validate, status, result, templates, discover, compatibility, price quote). However, the utility tools are a random collection with no clear domain coverage; for example, there are multiple sentiment tools but no tool to update or delete services. Significant gaps in covering any specific domain.

Maintenance

ActivityInactive
ResponsivenessNo issues