Metadata-Version: 2.4
Name: ddg-agent-services-mcp
Version: 0.3.1
Summary: Payment-aware MCP server + multi-framework SDK for DDG Agent Services (109 services, 90 paid x402/direct-crypto operations, OpenAI-compatible gateway)
Project-URL: Homepage, https://agents.daedalusdevelopmentgroup.com/.well-known/ai
Project-URL: Documentation, https://agents.daedalusdevelopmentgroup.com/.well-known/ddg-agent-swarm-mcp-design.md
Project-URL: Repository, https://github.com/daedalusdevelopmentgroup/ddg-agent-payable-services
Project-URL: Issues, https://github.com/daedalusdevelopmentgroup/ddg-agent-payable-services/issues
Author-email: Daedalus Development Group <0xcircuitbreaker@protonmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: agent-commerce,ai-agents,bazaar,machine-payments,mcp,mcp-registry,openapi,x402
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Security
Requires-Python: >=3.11
Requires-Dist: aiohttp>=3.14.1
Requires-Dist: cryptography>=48.0.1
Requires-Dist: mcp>=1.23.0
Requires-Dist: pydantic-settings>=2.14.2
Requires-Dist: pygments>=2.20.0
Requires-Dist: pyjwt>=2.13.0
Requires-Dist: pynacl>=1.6.2
Requires-Dist: python-multipart>=0.0.31
Requires-Dist: starlette>=1.3.1
Requires-Dist: tornado>=6.5.7
Requires-Dist: urllib3>=2.7.0
Provides-Extra: dev
Requires-Dist: pytest>=9.0.3; extra == 'dev'
Description-Content-Type: text/markdown

<!-- mcp-name: io.github.daedalusdevelopmentgroup/ddg-agent-services-mcp -->
# DDG Agent-Payable Services

**109 x402/direct-crypto services for AI agents, exposed as 114 OpenAPI operations.** DDG covers low-cost utilities, GPU-backed AI services, OpenAI-compatible chat/embedding routes, and specialized agent-commerce proof work. Use DDG when an agent needs a callable service now, or when a seller needs payment readiness, MCP security, discovery repair, browser proof, repo context, receipts, and marketplace-ready artifacts.

```text
https://agents.daedalusdevelopmentgroup.com
```

## Best first calls

| Route | Price | Use it when |
|---|---:|---|
| `/v1/tx-smoke-test` | \$0.01 | Prove your agent can complete a paid DDG request and receive a receipt. |
| `/v1/site-audit` | \$0.03 | Buy a low-cost read-only artifact and verify paid artifact delivery. |
| `/v1/agent-readiness-scorecard` | \$0.01 | Score discovery, OpenAPI, llms.txt, payment 402 behavior, MCP status, and agent-commerce signals. |
| `/v1/agent-discovery-pack` | \$0.01 | Repair llms.txt, OpenAPI, pricing/catalog JSON, examples, and agent-readable docs. |
| `/v1/agent-payment-readiness-audit` | \$0.02 | Audit x402/MPP/402 readiness, idempotency, receipts, and discovery assets. |
| `/v1/mcp-tool-security-audit` | \$0.02 | Review MCP/tool permissions, auth boundaries, prompt-injection exposure, and dangerous capabilities. |

DDG is not only a generic model gateway. The gateway exists, but the defensible wedge is agent-commerce audits, proof artifacts, and security/discovery repair that broad model routers usually do not sell.

## Quick Start

### MCP one-liner

```bash
DDG_MCP_AGENT_ID=your-agent uvx --from ddg-agent-services-mcp ddg-agent-services-mcp
```

### One-liner SDK (zero framework deps)

```python
from ddg_agent_services_mcp import ddg

client = ddg(agent_id="my-agent", private_key="0x...")
result = client.post("/v1/site-audit", {"url": "https://example.com"})
```

Or configure once via environment:

```bash
export DDG_AGENT_ID="my-agent"
export DDG_PRIVATE_KEY="0x..."
```

```python
from ddg_agent_services_mcp import ddg
client = ddg()  # reads from env
```

### OpenAI-compatible gateway

Drop-in replacement for `openai-python` — point any OpenAI client at DDG:

```python
from ddg_agent_services_mcp import create_openai_client

client = create_openai_client(agent_id="my-agent", private_key="0x...")
response = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
```

**Supported routes:** `GET /v1/models`, `POST /v1/chat/completions`, `POST /v1/embeddings`

Or use the standard `openai` package directly:

```python
from openai import OpenAI
client = OpenAI(
    base_url="https://agents.daedalusdevelopmentgroup.com/v1",
    api_key="ddg-x402",
    default_headers={"X-Agent-Id": "my-agent"},
)
```

### Install

```bash
pip install ddg-agent-services-mcp

# With framework support:
pip install ddg-agent-services-mcp[langchain]     # or crewai, openai-agents, autogen, etc.
pip install ddg-agent-services-mcp[all-frameworks] # everything
```

### Use with any framework

```python
from ddg_agent_services_mcp.tools import create_langchain_tools

tools = create_langchain_tools(
    agent_id="my-agent",
    private_key="0x...",  # Your EVM wallet key (Base USDC)
)
# Pass tools to your LangChain agent
```

**8 frameworks supported:** LangChain, CrewAI, OpenAI Agents SDK, AutoGen, PydanticAI, LlamaIndex, Google ADK, and MCP.

### MCP (Claude / Cursor / Hermes)

```json
{
  "mcpServers": {
    "ddg-agent-services": {
      "command": "npx",
      "args": ["-y", "@smithery/cli@latest", "install", "0xcircuitbreaker/ddg-agent-services-mcp"]
    }
  }
}
```

Or direct HTTP: `https://mcp.daedalusdevelopmentgroup.com/mcp`

## Payment Rails

| Rail | Status | Networks |
|---|---|---|
| **x402** | ✅ Live | Base, Polygon, Arbitrum, World Chain, Solana (USDC) |
| **direct_crypto_auto** | ✅ Live | 13 asset families: EVM/stablecoins (ETH, USDC, USDT), BTC, BCH, LTC, DOGE, SOL, TRX, XRP, XLM, ALGO, DOT, ZEC, XMR |
| **direct_crypto_manual** | ✅ Live | Operator-confirmed fallback |
| **MPP/Tempo** | ✅ Live | Settlement-proven |

## Service Catalog (109 services / 114 OpenAPI operations)

### AI / ML (GPU-backed on GTX 1080)
| Service | Price | Description |
|---|---|---|
| `/v1/chat/completions` | pay-per-call | OpenAI-compatible chat completions gateway |
| `/v1/models` | free | List available model aliases |
| `/v1/embeddings` | \$0.0005 | 768-dim vectors (Ollama nomic-embed-text) |
| `/v1/image-generation` | \$0.03 | Stable Diffusion v1.5 on GPU |
| `/v1/model/agent-run` | pay-per-call | Bounded agent-task endpoint (local runtime) |
| `/v1/model-consensus` | \$0.02 | Multi-model consensus via llm-judge |
| `/v1/llm-judge` | \$0.01 | Neutral judge for multi-model consensus |
| `/v1/summarize` | \$0.005 | Local LLM summarization |
| `/v1/sentiment` | \$0.002 | Sentiment analysis |
| `/v1/translate` | \$0.003 | Language translation |
| `/v1/language-detect` | \$0.001 | Language detection |

### Network & Web
| Service | Price | Description |
|---|---|---|
| `/v1/web-search` | \$0.005 | SearXNG aggregator (20+ engines) |
| `/v1/url-fetch` | \$0.002 | Raw content + headers from any URL |
| `/v1/url-status` | \$0.001 | Quick HEAD liveness check |
| `/v1/robots-check` | \$0.001 | robots.txt compliance check |
| `/v1/ip-geolocation` | \$0.001 | IP → country/city/ISP |
| `/v1/dns-lookup` | \$0.001 | DNS records (A/AAAA/MX/TXT/NS) |
| `/v1/whois-lookup` | \$0.002 | Domain registration data |
| `/v1/link-extract` | \$0.002 | Extract hyperlinks from a page |
| `/v1/fetch-as-markdown` | \$0.002 | Clean markdown extraction |
| `/v1/screenshot` | \$0.005 | Headless Chromium screenshot |

### Security
| Service | Price | Description |
|---|---|---|
| `/v1/threat-check` | \$0.005 | URL/wallet reputation (URLhaus + TLS) |
| `/v1/ssl-cert-info` | \$0.002 | SSL certificate chain + expiry |
| `/v1/http-headers` | \$0.001 | Security header analysis |
| `/v1/subdomain-enumerate` | \$0.005 | Subdomain discovery via CT logs |
| `/v1/tls-version-check` | \$0.002 | TLS version + cipher suite audit |
| `/v1/prompt-injection-scan` | \$0.01 | Prompt injection vulnerability scan |
| `/v1/mcp-tool-security-audit` | \$0.02 | MCP server security audit |

### Blockchain
| Service | Price | Description |
|---|---|---|
| `/v1/contract-abi` | \$0.002 | Verified ABI from block explorers |
| `/v1/ethereum/rpc` | \$0.005 | EVM RPC proxy (Base/Ethereum) |

### Compute & Documents
| Service | Price | Description |
|---|---|---|
| `/v1/code-execution` | \$0.01 | Python in Docker sandbox (no network) |
| `/v1/pdf-extract` | \$0.005 | Text extraction from PDFs |
| `/v1/ocr` | \$0.005 | Image text extraction (Tesseract) |
| `/v1/qr-code` | \$0.001 | QR code PNG generation |
| `/v1/image-generation` | \$0.03 | Text-to-image (Stable Diffusion) |

### Utilities (\$0.001 each)
| Service | Description |
|---|---|
| `/v1/hash-compute` | SHA-256/MD5/BLAKE2 hashing |
| `/v1/base64-codec` | Encode/decode base64 |
| `/v1/uuid-generate` | UUID v1/v3/v4/v5 |
| `/v1/timestamp` | Current time in all formats |
| `/v1/random` | Secure random data |
| `/v1/json-validate` | JSON Schema validation |
| `/v1/schema-infer` | Infer JSON Schema from sample |
| `/v1/diff-text` | Text comparison/diff |
| `/v1/language-detect` | Language detection |
| `/v1/price-feed` | Crypto/forex prices |

### Full catalog
See [pricing.json](https://agents.daedalusdevelopmentgroup.com/.well-known/ddg-agent-pricing.json) for all 109 services. The OpenAPI contract currently exposes 90 paid operations and 24 intentionally free utility/discovery operations.

## Discovery

| Surface | URL |
|---|---|
| AI manifest | `/.well-known/ai` |
| x402 discovery | `/.well-known/x402` |
| OpenAPI spec | `/openapi.json` (113 paths) |
| llms.txt | `/llms.txt` |
| Pricing | `/.well-known/ddg-agent-pricing.json` |
| Status | `/.well-known/ddg-agent-status.json` |
| Agent catalog | `/.well-known/agent-catalog.json` |

## Infrastructure

| Component | Hardware |
|---|---|
| Payment edge | T620 (48 cores, 377GB RAM, 24/7) |
| GPU (SD + embeddings) | T620 GTX 1080 8GB |
| LLM inference | T620 Ollama (24 models) |
| Code execution | Docker isolated containers |
| Web search | SearXNG (self-hosted, 20+ engines) |
| Email relay | Postfix |
| Node | Alienware RTX 3080 8GB (secondary) |

## License

MIT
