You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NEAR Intents MCP Server enables AI agents to perform cross-chain token swaps through NEAR's intent-based architecture using the [Defuse Protocol one-click SDK](https://github.com/defuse-protocol/one-click-sdk-typescript). This server provides comprehensive access to token discovery, swap quotes, execution, and status tracking.
8
+
The NEAR Intents MCP Server enables AI agents to perform cross-chain token swaps through NEAR's intent-based architecture using the [Defuse Protocol one-click SDK](https://github.com/defuse-protocol/one-click-sdk-typescript). This server provides a comprehensive 5-step flow for discovering tokens, getting quotes, executing swaps, and tracking their status.
9
9
10
-
By implementing the Model Context Protocol (MCP), this server allows Large Language Models (LLMs) to discover available tokens, get swap quotes, execute cross-chain swaps, and monitor transaction status directly through their context window, bridging the gap between AI and decentralized cross-chain trading.
10
+
By implementing the Model Context Protocol (MCP), this server allows Large Language Models (LLMs) to facilitate cross-chain swaps seamlessly, bridging the gap between AI assistants and decentralized cross-chain infrastructure.
11
11
12
-
## Features
12
+
## ✨ Features
13
13
14
-
-**Token Discovery**: Discover available tokens for swaps with metadata including blockchain, contract address, and current USD price.
15
-
-**Simple Quotes**: Get basic swap quotes without requiring addresses - perfect for checking rates before committing.
16
-
-**Full Quotes**: Get complete quotes with deposit addresses for actual swap execution.
17
-
-**Swap Execution**: Execute swaps by submitting deposit transaction hashes.
18
-
-**Status Tracking**: Monitor swap progress and execution status in real-time.
14
+
***Token Discovery**: Discover available tokens across multiple blockchains supported by the Defuse Protocol.
15
+
***Simple Quotes**: Get basic swap quotes without requiring addresses - perfect for rate checking.
16
+
***Full Quotes**: Get complete quotes with deposit addresses for executing swaps.
17
+
***Swap Execution**: Submit deposit transaction hashes to execute cross-chain swaps.
18
+
***Status Tracking**: Monitor swap progress and completion status in real-time.
19
19
20
-
## Installation
20
+
## 📦 Installation
21
21
22
-
### Using npx (Recommended)
22
+
### 🚀 Using npx (Recommended)
23
23
24
24
To use this server without installing it globally:
|`NEAR_SWAP_API_URL`| No | Custom API endpoint for Defuse Protocol |`https://1click.chaindefuser.com`|
80
+
|`NEAR_SWAP_JWT_TOKEN`| Yes | JWT token for Defuse Protocol API authentication | - |
81
+
|`NEAR_SWAP_API_URL`| No | Custom API endpoint |`https://1click.chaindefuser.com`|
82
82
83
-
## Usage Examples
83
+
## 💡 Usage Examples
84
84
85
-
### Token Discovery
86
-
-"What tokens are available for swaps on NEAR Intents?"
87
-
-"Show me all supported tokens I can swap."
88
-
- "Find the token ID for USDC on Arbitrum."
85
+
### 🔍 Token Discovery
86
+
*"What tokens are available for cross-chain swaps on NEAR?"
87
+
*"Show me all supported tokens in the Defuse Protocol."
88
+
* "List available tokens I can swap from Arbitrum to Solana."
89
89
90
-
### Getting Quotes
91
-
-"What's the current rate to swap 100 USDC from Arbitrum to SOL?"
92
-
-"Get me a quote for swapping ETH to NEAR."
93
-
- "Check the slippage for a 1000 USDC swap."
90
+
### 📊 Getting Quotes
91
+
*"What's the rate to swap 100 USDC from Arbitrum to SOL?"
92
+
*"Get me a quote for swapping ETH to USDC on NEAR."
93
+
* "How much SOL would I get for 1000 USDC?"
94
94
95
-
### Executing Swaps
96
-
-"I want to swap 50 USDC from Arbitrum to Solana."
97
-
- "Get a full quote with deposit address for my swap."
98
-
- "Submit my deposit transaction hash to execute the swap."
95
+
### 💱 Executing Swaps
96
+
*"I want to swap 500 USDC from Arbitrum to Solana."
97
+
* "Help me execute a cross-chain swap with this deposit address."
98
+
* "I've sent the funds to the deposit address, here's my transaction hash."
99
99
100
-
### Monitoring Swaps
101
-
-"Check the status of my pending swap."
102
-
- "Is my cross-chain swap complete?"
103
-
-"What's the current state of my transaction?"
100
+
### 📈 Tracking Status
101
+
*"Check the status of my swap with deposit address 0xabc..."
102
+
* "Is my cross-chain swap complete?"
103
+
*"What's the current state of my pending swap?"
104
104
105
-
## MCP Tools
105
+
## 🛠️ MCP Tools
106
106
107
107
<!-- AUTO-GENERATED TOOLS START -->
108
108
@@ -137,7 +137,7 @@ Add the following configuration to your MCP client settings (e.g., `claude_deskt
137
137
|`slippageTolerance`| number || 100 | (Optional, defaults to 100) Slippage tolerance for the swap. This value is in basis points (1/100th of a percent), e.g. 100 for 1% slippage. |
138
138
|`dry`| boolean || false | (Optional, defaults to false) Flag indicating whether this is a dry run request. If true, the response will NOT contain the following fields: depositAddress, timeWhenInactive, deadline. |
139
139
|`depositType`| string || "ORIGIN_CHAIN" | (Optional, defaults to ORIGIN_CHAIN) Type of the deposit address: ORIGIN_CHAIN - deposit address on the origin chain, INTENTS - account ID inside near intents to which you should transfer assets inside intents |
140
-
|`deadline`| string ||"2026-01-27T22:42:08.273Z"| (Optional, defaults to 1 hour from now) Timestamp in ISO format, that identifies when user refund will begin if the swap isn't completed by then. It needs to exceed the time required for the deposit tx to be minted, e.g. for Bitcoin it might require ~1h depending on the gas fees paid. |
140
+
|`deadline`| string ||| (Optional, defaults to 1 hour from now) Timestamp in ISO format, that identifies when user refund will begin if the swap isn't completed by then. It needs to exceed the time required for the deposit tx to be minted, e.g. for Bitcoin it might require ~1h depending on the gas fees paid. |
141
141
|`referral`| string ||| (Optional) Referral identifier (lower case only). It will be reflected in the on-chain data and displayed on public analytics platforms. |
142
142
|`quoteWaitingTimeMs`| number || 3000 | (Optional, defaults to 3000) Time in milliseconds user is willing to wait for quote from relay |
1.**[DISCOVERY]** Use `GET_NEAR_SWAP_TOKENS` to discover available tokens
192
-
2.**[STEP 1]** Use `GET_NEAR_SWAP_SIMPLE_QUOTE` to check swap rates without addresses
193
-
3.**[STEP 2]** Use `GET_NEAR_SWAP_FULL_QUOTE` to get deposit address when ready to swap
194
-
4.**[STEP 3]** User sends funds to the deposit address (external action)
195
-
5.**[STEP 4]** Use `EXECUTE_NEAR_SWAP` to submit deposit transaction hash
196
-
6.**[STEP 5]** Use `CHECK_NEAR_SWAP_STATUS` to monitor swap progress until completion
193
+
## ⚠️ Disclaimer
197
194
198
-
## Resources
195
+
This project interacts with cross-chain swap infrastructure. Users should exercise caution and verify all transaction details before executing swaps. Cross-chain transactions involve multiple blockchains and carry inherent risks.
This project interacts with blockchain networks and cross-chain swap protocols. Users should exercise caution and verify all data independently. Cross-chain swaps involve risk and users are responsible for their own transactions.
0 commit comments