<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Warden</title>
    <description>The latest articles on DEV Community by Warden (@wardenprotocol).</description>
    <link>https://dev.to/wardenprotocol</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4235473%2F5eb3a02f-8a1e-41ec-8666-769dffe5da44.png</url>
      <title>DEV Community: Warden</title>
      <link>https://dev.to/wardenprotocol</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wardenprotocol"/>
    <language>en</language>
    <item>
      <title>Trade onchain from an AI agent with Warden MCP</title>
      <dc:creator>Warden</dc:creator>
      <pubDate>Mon, 09 Nov 2026 16:07:40 +0000</pubDate>
      <link>https://dev.to/wardenprotocol/trade-onchain-from-an-ai-agent-with-warden-mcp-58l2</link>
      <guid>https://dev.to/wardenprotocol/trade-onchain-from-an-ai-agent-with-warden-mcp-58l2</guid>
      <description>&lt;p&gt;Warden MCP lets AI agents find tokens, quote swaps and trade onchain on Base, BNB Chain, Robinhood Chain, Arc and Solana, within limits you set. This guide takes you from zero to a swap quote, then shows how the limits work.&lt;/p&gt;

&lt;p&gt;Server address (Streamable HTTP): &lt;code&gt;https://tokens.wardenprotocol.org/mcp&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Connect your agent
&lt;/h2&gt;

&lt;p&gt;Market tools need no key, so you can start with a quote right away. Wallet tools need either a sign-in or a key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude app:&lt;/strong&gt; open Customize, then Connectors, then Add custom connector. Name it Warden, paste the server address, click Add, then Connect, sign in and press Allow. In a chat, open the + menu, then Connectors, and switch Warden on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code:&lt;/strong&gt; keep the key in an environment variable, never in a config file. You mint the key in the Warden app under Portfolio, then Agent access, then Connect your agent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;WARDEN_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wk_your-key

claude mcp add-json &lt;span class="nt"&gt;--scope&lt;/span&gt; user warden &lt;span class="s1"&gt;'{"type":"http","url":"https://tokens.wardenprotocol.org/mcp","headers":{"Authorization":"Bearer ${WARDEN_TOKEN}"}}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start a new session. If the tools do not show up, type &lt;code&gt;/mcp&lt;/code&gt; and pick Warden.&lt;/p&gt;

&lt;p&gt;Setup steps for ChatGPT, Grok, Codex and other clients are on the same page: &lt;a href="https://tokens.wardenprotocol.org/mcp" rel="noopener noreferrer"&gt;https://tokens.wardenprotocol.org/mcp&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Find a token
&lt;/h2&gt;

&lt;p&gt;Ask in plain words:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is trending on Base right now? Show the top three with price history.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent calls &lt;code&gt;trending_tokens&lt;/code&gt;, &lt;code&gt;search_tokens&lt;/code&gt; and &lt;code&gt;price_history&lt;/code&gt;. The &lt;code&gt;list_chains&lt;/code&gt; tool lists the chains Warden supports with each chain's native coin.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Get a swap quote
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Price a $50 USDC buy of that token on Base.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent calls &lt;code&gt;quote_swap&lt;/code&gt;. A quote prices the trade without committing to it and needs no key. Every swap tool takes the same shape: &lt;code&gt;chainId&lt;/code&gt;, the token you pay with, the token you receive, and the amount in the smallest unit of the token you pay with. The reply includes &lt;code&gt;approxValueUsd&lt;/code&gt;, which is a quick sanity check before anything is signed.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Prepare or execute
&lt;/h2&gt;

&lt;p&gt;Two tools take the trade further, and each needs permission from you:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Needs&lt;/th&gt;
&lt;th&gt;Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;prepare_swap&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;key + "Prepare swaps"&lt;/td&gt;
&lt;td&gt;Builds a swap for you to sign. Never broadcasts.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;execute_swap&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;key + open session&lt;/td&gt;
&lt;td&gt;Signs and sends from your wallet with nobody present.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Before trading, ask the agent to call &lt;code&gt;agent_permissions&lt;/code&gt;. It shows what the key may do, whether a session is open and how much budget is left.&lt;/p&gt;

&lt;p&gt;For hands-free trading the agent calls &lt;code&gt;request_session&lt;/code&gt;, which gives a link you approve with one tap. &lt;code&gt;session_request_status&lt;/code&gt; tells it when you have.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The limits
&lt;/h2&gt;

&lt;p&gt;The limits are enforced on the server, not requested from the model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Daily budgets, a per-trade cap for unattended trades and the session expiry live server-side. The agent reads &lt;code&gt;agent_permissions&lt;/code&gt; instead of assuming.&lt;/li&gt;
&lt;li&gt;No tool takes raw calldata or a target address. Swaps go through Warden's router, checked on the server and again by Privy inside its enclave before anything is signed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;execute_swap&lt;/code&gt; is idempotent on &lt;code&gt;idempotencyKey&lt;/code&gt;, so a retry with the same key never repeats a trade.&lt;/li&gt;
&lt;li&gt;If a tool answers &lt;code&gt;needs_human&lt;/code&gt; or &lt;code&gt;session&lt;/code&gt;, the prepared transaction goes back to you.&lt;/li&gt;
&lt;li&gt;Token names, descriptions and chat are treated as data, never as instructions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You set the limits in the Warden app under Portfolio, then Agent access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Warden MCP: &lt;a href="https://tokens.wardenprotocol.org/mcp" rel="noopener noreferrer"&gt;https://tokens.wardenprotocol.org/mcp&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Warden Token Terminal: &lt;a href="https://tokens.wardenprotocol.org" rel="noopener noreferrer"&gt;https://tokens.wardenprotocol.org&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Website: &lt;a href="https://wardenprotocol.org" rel="noopener noreferrer"&gt;https://wardenprotocol.org&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;X: &lt;a href="https://x.com/wardenprotocol" rel="noopener noreferrer"&gt;https://x.com/wardenprotocol&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Contact: &lt;a href="mailto:tech@wardenprotocol.org"&gt;tech@wardenprotocol.org&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>web3</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
