A scaffold for a Sponge MCP server built with dedalus-mcp and DAuth-style credential exchange.
This server follows a DAuth-style credential exchange pattern:
- Credentials are provided by clients at runtime.
- The server declares a
ConnectionwithSecretKeys. - Tool calls dispatch through Dedalus secure connection handles.
- DAuth-compatible API key authentication (
SPONGE_API_KEY). - Configurable Sponge base URL via
SPONGE_BASE_URL. - Read-only wallet inspection tools for the core Sponge wallet API.
- Includes a smoke ping tool for quick MCP handshake validation.
- Keeps the implementation intentionally small so Sponge engineers can extend it.
- Create a Sponge API key.
- Copy env template:
cp .env.example .envRequired:
SPONGE_API_KEY(provided by the MCP client via DAuth credentials in production flows)
Optional:
SPONGE_BASE_URL(defaults tohttps://api.wallet.paysponge.com)DEDALUS_AS_URL(defaults tohttps://as.dedaluslabs.ai)HOST(defaults to127.0.0.1)PORT(defaults to8080)
uv run python src/main.pyFor the current published Dedalus Python SDK, hosted MCP credentials are matched
using a slug-derived connection name. For this deploy, use tsion-sponge-mcp
when constructing runtime SecretValues:
import os
from dedalus_labs import AsyncDedalus, DedalusRunner
from dedalus_mcp.auth import Connection, SecretKeys, SecretValues
sponge = Connection(
name="name-of-server", #if name of server is tsion/sponge-mcp use tsion-sponge-mcp
secrets=SecretKeys(api_key="SPONGE_API_KEY"),
base_url="https://api.wallet.paysponge.com",
auth_header_format="Bearer {api_key}",
)
sponge_secrets = SecretValues(sponge, api_key=os.getenv("SPONGE_API_KEY", ""))
client = AsyncDedalus(
api_key=os.getenv("DEDALUS_API_KEY"),
as_base_url="https://as.dedaluslabs.ai",
)
runner = DedalusRunner(client)
result = await runner.run(
input="Use Sponge to get my wallet balances.",
model="openai/gpt-4.1-mini",
mcp_servers=["tsion/sponge-mcp"],
credentials=[sponge_secrets],
)sponge_get_addressessponge_get_balancessponge_get_balancesponge_get_transaction_historysponge_get_transaction_statussmoke_ping
- Sponge wallet endpoints are served from
https://api.wallet.paysponge.com. - This scaffold is intentionally wallet-only for now; future admin tools can be layered on once Sponge exposes a stable public REST surface for them.