dune-mcp-skill
Use Dune MCP through UXC for blockchain table discovery, SQL query creation/execution, execution result retrieval, and visualization with help-first schema inspection, explicit auth binding, and guarded credit-consuming operations.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- dune-mcp-skill
- description
- Use Dune MCP through UXC for blockchain table discovery, SQL query creation/execution, execution result retrieval, and visualization with help-first schema inspection, explicit auth binding, and guarded credit-consuming operations.
02 资源文件 7
- 参考文档_meta.json133 B
- 参考文档agents/openai.yaml349 B
- 参考文档references/usage-patterns.md3.9 KB
- 脚本scripts/validate.sh2.8 KB
- 参考文档skill-card.md2.2 KB
- 参考文档SOURCE.md252 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Dune MCP Skill
Use this skill to run Dune MCP operations through uxc.
Reuse the uxc skill for shared protocol discovery, output parsing, and generic auth/binding flows.
Prerequisites
uxcis installed and available inPATH.- Network access to
https://api.dune.com/mcp/v1. - Dune API key is available for authenticated calls.
Core Workflow
- Confirm endpoint and protocol with help-first probing:
uxc https://api.dune.com/mcp/v1 -h
- Configure credential/binding for repeatable auth:
uxc auth credential set dune-mcp --auth-type api_key --header "x-dune-api-key={{secret}}" --secret-env DUNE_API_KEYuxc auth credential set dune-mcp --auth-type api_key --header "x-dune-api-key={{secret}}" --secret-op op://Engineering/dune/api-keyuxc auth binding add --id dune-mcp --host api.dune.com --path-prefix /mcp/v1 --scheme https --credential dune-mcp --priority 100
- Use fixed link command by default:
command -v dune-mcp-cli- If missing, create it:
uxc link dune-mcp-cli https://api.dune.com/mcp/v1 dune-mcp-cli -h
- Inspect operation schema before execution:
dune-mcp-cli searchTables -hdune-mcp-cli searchTablesByContractAddress -hdune-mcp-cli createDuneQuery -hdune-mcp-cli executeQueryById -hdune-mcp-cli getExecutionResults -h
- Prefer read/discovery operations first, then query creation or credit-consuming execution.
Capability Map
- Discovery:
searchDocssearchTableslistBlockchainssearchTablesByContractAddress
- Query lifecycle:
createDuneQuerygetDuneQueryupdateDuneQueryexecuteQueryByIdgetExecutionResults
- Analysis helpers:
generateVisualizationgetTableSizegetUsage
Recommended Usage Pattern
- Find the right table first:
dune-mcp-cli searchTables query='uniswap swaps'dune-mcp-cli searchTablesByContractAddress contractAddress=0x...
- Prefer higher-level
spelltables when they already expose the metrics you need. - Keep SQL partition-aware:
- use
block_date,evt_block_date, or another partition/date column inWHERE
- use
- Create a temporary query only after confirming table choice and date range.
- Execute and fetch results by execution ID.
Guardrails
- Keep automation on JSON output envelope; do not rely on
--text. - Parse stable fields first:
ok,kind,protocol,data,error. - Use
dune-mcp-clias default command path. dune-mcp-cli <operation> ...is equivalent touxc https://api.dune.com/mcp/v1 <operation> ....- Discovery operations are read-only:
searchDocssearchTableslistBlockchainssearchTablesByContractAddressgetDuneQuerygetExecutionResultsgetTableSizegetUsage
- Require explicit user confirmation before credit-consuming or state-changing operations:
createDuneQueryupdateDuneQueryexecuteQueryByIdgenerateVisualization
- Be careful with privacy:
- confirm before switching a query from private to public
- temporary queries can still be visible; inspect
is_privateandis_temp
key=valueinput now supports automatic type conversion for numeric MCP arguments.- Numeric IDs can be passed directly with
key=value, for example:query_id=6794106queryId=6794106
- Positional JSON is still useful for nested objects or when mixing string and numeric fields precisely:
{"executionId":"01...","timeout":90,"limit":20}
- For SQL passed via
key=value, wrap the whole SQL string in double quotes so inner SQL single quotes survive shell parsing. - If
listBlockchainsreturns a Dune-side schema/facet error, fall back tosearchTableswithblockchainsfilters.
Tested Real Scenario
The following flow was exercised successfully through uxc:
- discover table:
uniswap.uniswapx_trades - create temporary query for Base daily volume
- execute query
- fetch results
The successful SQL shape was:
SELECT block_date,
ROUND(SUM(amount_usd), 2) AS daily_volume_usd,
COUNT(*) AS trades
FROM uniswap.uniswapx_trades
WHERE blockchain = 'base'
AND block_date >= date_add('day', -7, CURRENT_DATE)
GROUP BY 1
ORDER BY 1 DESC
LIMIT 7
References
- Invocation patterns:
references/usage-patterns.md
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.