SuperAPIAI Directory

dagon-mcp

github.com · AI developer platforms

dagon-mcp is a stdio-mode Model Context Protocol (MCP) server for Dagon Inference, allowing MCP clients (such as Claude Desktop, Claude Code, and Cursor) to directly use the uncensored (abliterated) open-weight LLMs provided by Dagon Inference. Through an OpenAI-compatible API, it provides tools for listing models, checking balances, creating keys, purchasing credits with USDC on Solana, and chatting. Running it requires Node 22.18 or later, with no installation steps. When purchasing credits, the server performs byte-level validation of the transaction and enforces per-purchase, per-session, and per-day USD limits and a daily SOL fee limit; the wallet private key never leaves the server process.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

Purpose: dagon-mcp is a stdio-mode Model Context Protocol server for accessing Dagon Inference. Dagon Inference provides uncensored (abliterated) open-weight LLMs through an OpenAI-compatible API and is paid for with USDC on Solana. The server lets MCP clients (Claude Desktop, Claude Code, Cursor, etc.) directly use these capabilities.

Main capabilities: The server provides tools for listing models, checking balances, creating account keys, purchasing credits with Solana USDC, and chatting. Balance and chat use DAGON_API_KEY by default and also accept an api_key parameter. Purchases and confirmations always use the server-configured DAGON_API_KEY; callers cannot redirect payments from the configured wallet to other accounts.

Usage: Requires Node 22.18 or later, with no installation steps. You can obtain an account key through the dagon_create_key tool or https://inference.dagon.so to obtain an account key. Configuration examples include claude_desktop_config.json, ~/.cursor/mcp.json or the project's .cursor/mcp.json, the project's .mcp.json, etc.; on Windows, if npx cannot be found, you can use "command": "cmd", "args": ["/c", "npx", "-y", "dagon-mcp"]. Claude Code and omp expand environment variables ${VAR}, making it easier to keep keys out of files.

Purchasing and security limits: dagon_buy_credits first calls POST /v1/credits/purchase, then calls POST /v1/credits/purchase/confirm. Before any gateway call, the amount must be no less than DAGON_MIN_PURCHASE_USD (default $1), no more than DAGON_MAX_PURCHASE_USD (per purchase, default $50), and, combined with purchases already prepared by this server process, no more than DAGON_MAX_PURCHASE_USD_PER_SESSION (default $200), and, combined with purchases already prepared on the current day (UTC) by any server process in the shared spending ledger, no more than DAGON_MAX_PURCHASE_USD_PER_DAY (default $200). Exceeding the limits returns a tool error and creates nothing. Session totals reset after the MCP server restarts; daily totals are stored in DAGON_SPEND_LEDGER and do not reset. DAGON_TREASURY_WALLET is required for every purchase. When the gateway does not pay network fees on behalf of the payer, the payer's worst-case SOL cost is counted against DAGON_MAX_SOL_FEES in the same ledger (per UTC day, default 0.05 SOL), and purchases that exceed the limit are rejected and not signed.

Wallet mode: Setting DAGON_WALLET_SECRET_KEY also requires DAGON_API_KEY and DAGON_TREASURY_WALLET. The server first verifies that the returned transaction is exactly the payment constructed by the payment service: one USDC TransferChecked for the specified amount, one SPL Memo whose data is purchase_id, and at most oneIdempotent creation of the treasury USDC account from which the fee payer pays rent; mismatched metadata, amounts, mint, token program, destination, memo, blockhash, fee payer or signer roles, lookup tables, duplicate keys, unrelated instructions, etc. are all rejected. After verification, sign with the wallet. Transactions that sponsor the fee do not carry a fee payer signature; the server does not submit them, but instead sends them to the gateway as a signed_transaction for confirmation; otherwise they are submitted via DAGON_SOLANA_RPC_URL and confirmed using the signature. Confirmation waits up to 45 seconds; on timeout it is reported as pending. Once payment may have landed on-chain, all results and errors include the purchase_id and transaction signature (or signed transaction); do not repeat the purchase, pass them to dagon_confirm_purchase instead. The wallet needs USDC, and also SOL when the fee is not sponsored. A client tool timeout of at least 90 seconds is recommended.

Walletless mode: pass payer_wallet, and the server performs the same byte-level verification with that wallet as payer and transfer authority, then returns an unsigned base64 transaction, noting the treasury being paid and any SOL costs that may be incurred; transactions that fail verification are not returned. Sign with that wallet before expiry; do not rebuild. When fee_sponsored is true, do not submit; call dagon_confirm_purchase with purchase_id and signed_transaction; otherwise submit first, then pass purchase_id and the signature.

Other notes: private keys never leave the server process and are never echoed in any output (including errors); at startup the server prints the derived payment address to stderr. Trusted treasury addresses are configured independently and are not accepted from gateway responses; the public Dagon treasury is 9rMdbu4KdLWH2nPXbzhm9HTKaibGZ2ckakQbW1wPh6KK, which should be obtained from this README or https://inference.dagon.so rather than from tool results. Every gateway and Solana RPC request is aborted after 30 seconds or when the client cancels the tool call, and gateway responses larger than 4 MiB are rejected. If there is no MCP client, agents can also pay per request via x402: send the request without a key, sign the USDC transfer required by the 402, retry and keep the key returned in x-dagon-key; the server itself does not use x402 payments. The project is MIT licensed, copyright Inkwell Finance, Inc. d/b/a Dagon.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools