Rift Finance MCP Server
Official# Rift Finance MCP Server
MCP (Model Context Protocol) server that gives AI assistants full access to the Rift Finance platform. Users can send crypto, check balances, offramp to M-Pesa, bridge across chains, and more — just by chatting.
**83 tools** covering every Rift API endpoint plus documentation search.
> **Passkey-owned wallets (v3.0.0 of this server).** Every Rift wallet is a Safe smart account owned only by the user's passkeys. Neither Rift nor this MCP server can move funds. Fund-moving tools (`rift_send_crypto`, `rift_offramp`, `rift_offramp_create_order`, `rift_bridge_execute`, `rift_swap`, `rift_wc_approve`, `rift_send_transaction`, `rift_sign_message`) return an **approval link** (`https://app.riftfi.com/approve/<id>`). The agent gives it to the user, who approves with their passkey; `rift_get_approval` reports the outcome. No OTP or password is needed for these any more, and Google / Apple sign-in is login only. `rift_sign_transaction` (raw EOA signing) was removed upstream (`410 EOA_SIGNING_REMOVED`).
## Quick Setup
### 1. Install
```bash
cd rift-mcp-server
npm install
npm run build
```
### 2. Add to Claude Desktop
Edit `~/.claude/claude_desktop_config.json` (Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`):
```json
{
"mcpServers": {
"rift-finance": {
"command": "node",
"args": ["/absolute/path/to/rift-mcp-server/dist/index.js"],
"env": {
"RIFT_API_KEY": "sk_your_project_api_key"
}
}
}
}
```
Restart Claude Desktop. You'll see the Rift tools available.
> **Note:** `RIFT_API_KEY` is optional in the config — users can also set it at runtime by telling Claude "my Rift API key is sk_..." which calls `rift_set_api_key`.
### 3. Add to Claude Code
Edit `~/.claude/settings.json`:
```json
{
"mcpServers": {
"rift-finance": {
"command": "node",
"args": ["/absolute/path/to/rift-mcp-server/dist/index.js"],
"env": {
"RIFT_API_KEY": "sk_your_project_api_key"
}
}
}
}
```
### 4. Add to Cursor
Go to **Settings > MCP Servers > Add Server**:
- **Name:** `rift-finance`
- **Command:** `node /absolute/path/to/rift-mcp-server/dist/index.js`
- **Environment Variables:**
- `RIFT_API_KEY`: `sk_your_project_api_key`
### 5. Add to Any MCP-Compatible Agent
The server uses **stdio transport** (stdin/stdout JSON-RPC). Any MCP client can connect:
```bash
# Run directly
RIFT_API_KEY=sk_your_key node /path/to/rift-mcp-server/dist/index.js
# Or with npx (if published)
RIFT_API_KEY=sk_your_key npx @rift-finance/mcp-server
```
**MCP client config (generic):**
```json
{
"command": "node",
"args": ["/path/to/rift-mcp-server/dist/index.js"],
"transport": "stdio",
"env": {
"RIFT_API_URL": "https://rift-sdk-wrapper-j9qe.onrender.com",
"RIFT_API_KEY": "sk_your_key"
}
}
```
### 6. Using with the OpenAI Agents SDK / LangChain / Vercel AI SDK
Any framework that supports MCP can use this server. Example with the official MCP client:
```typescript
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "node",
args: ["/path/to/rift-mcp-server/dist/index.js"],
env: {
RIFT_API_KEY: "sk_your_key",
RIFT_API_URL: "https://rift-sdk-wrapper-j9qe.onrender.com",
},
});
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);
// List available tools
const tools = await client.listTools();
// Call a tool
const result = await client.callTool({
name: "rift_get_balance",
arguments: { chain: "BASE", token: "USDC" },
});
```
## Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `RIFT_API_URL` | No | `https://rift-sdk-wrapper-j9qe.onrender.com` | Rift API Wrapper URL |
| `RIFT_API_KEY` | No | (empty) | Project API key. Can be set at runtime via `rift_set_api_key` tool |
## User Flow
When a user chats with an AI that has this MCP server connected, here's the typical flow:
```
User: "I want to send some USDC"
AI: I'll need your Rift API key first. Do you have one?
User: "Yeah it's sk_abc123..."
AI: [calls rift_set_api_key] → Got it, key set.
Now let's log you in. What's your email?
User: "user@example.com"
AI: [calls rift_send_otp] → OTP sent to your email. What's the code?
User: "482910"
AI: [calls rift_login] → You're logged in!
[calls rift_get_balance] → You have 150.25 USDC on Base.
How much do you want to send and to what address?
User: "Send 50 USDC to 0xABC... on Base"
AI: You want to send 50 USDC to 0xABC... on Base (gasless). Confirm?
User: "Yes"
AI: [calls rift_send_crypto] → APPROVAL REQUIRED
Please open https://app.riftfi.com/approve/6f1c... and approve
with your passkey (Face ID / Touch ID). It expires in 30 minutes.
User: "Done"
AI: [calls rift_get_approval] → approved. Tx hash: 0xdef...
```
If `rift_get_wallet_status` says `needsPasskeySetup: true`, the user must first create a passkey in the Rift app ("Secure your wallet with a passkey"); existing wallets keep their address. Recommend a second passkey (another device or a security key) for recovery. `rift_guide` covers this: tasks "passkey", "passkey recovery", "approvals".
## All 83 Tools
### Passkey Wallet & Approvals (3)
| Tool | Description |
|------|-------------|
| `rift_get_wallet_status` | Wallet mode, passkey count, per-chain owner mode, `needsPasskeySetup` |
| `rift_get_approval` | Status + result of an approval request (API key alone is enough) |
| `rift_list_approvals` | The user's approval requests (default: pending) |
### Setup & Docs (6)
| Tool | Description |
|------|-------------|
| `rift_set_api_key` | Set API key at runtime |
| `rift_set_api_url` | Override API URL |
| `rift_status` | Check connection status |
| `rift_search_docs` | Search SDK/API docs |
| `rift_get_api_endpoints` | Get REST endpoints for a service |
| `rift_get_supported_chains` | List chains, tokens, fiat currencies |
### Auth & User (12)
| Tool | Description |
|------|-------------|
| `rift_signup` | Create account. Email/phone: call `rift_send_otp` first and pass `otpCode`, then `rift_login` with the SAME code. externalId + password needs no OTP |
| `rift_send_otp` | Send OTP |
| `rift_verify_otp` | Verify OTP |
| `rift_login` | Login (stores session) |
| `rift_logout` | Logout |
| `rift_get_user` | Get profile |
| `rift_update_user` | Update profile / auto-swap config. Changing email/phone needs an OTP for the NEW value (`otpCode`, or `emailOtpCode` + `phoneOtpCode` when changing both) |
| `rift_delete_user` | Delete account |
| `rift_create_recovery` | Setup recovery methods |
| `rift_get_recovery_options` | Get recovery options |
| `rift_request_password_reset` | Request password reset |
| `rift_reset_password` | Reset password with OTP |
### Wallet & Transactions (4)
| Tool | Description |
|------|-------------|
| `rift_get_balance` | Check balance (by chain/token) |
| `rift_send_crypto` | Send crypto (gasless). Returns an approval link |
| `rift_get_transaction_history` | Transaction history |
| `rift_get_transaction_fee` | Calculate fees |
### Offramp — Crypto to Fiat (6)
| Tool | Description |
|------|-------------|
| `rift_preview_exchange_rate` | Preview FX rate |
| `rift_get_payment_methods` | Banks/mobile money by currency |
| `rift_offramp` | Cash out to M-Pesa/bank. Returns an approval link |
| `rift_get_withdrawal_fee` | Get withdrawal fee |
| `rift_poll_offramp_status` | Track offramp order |
| `rift_get_offramp_orders` | List offramp orders |
### Onramp — Fiat to Crypto (3)
| Tool | Description |
|------|-------------|
| `rift_buy_crypto` | Buy crypto with mobile money |
| `rift_get_onramp_status` | Track purchase |
| `rift_get_onramp_orders` | List purchases |
### Bridge (3)
| Tool | Description |
|------|-------------|
| `rift_get_bridge_routes` | Available routes |
| `rift_bridge_quote` | Get quote |
| `rift_bridge_execute` | Execute bridge. Returns an approval link |
### KYC (6)
| Tool | Description |
|------|-------------|
| `rift_kyc_get_token` | Get KYC verification URL |
| `rift_kyc_check_user_exists` | Check if user exists |
| `rift_kyc_status` | KYC status |
| `rift_kyc_verify` | Verify KYC job |
| `rift_kyc_is_verified` | Am I verified? |
| `rift_kyc_job_status` | Poll job status |
### WalletConnect (6)
| Tool | Description |
|------|-------------|
| `rift_wc_pair` | Pair with DApp |
| `rift_wc_get_requests` | Pending requests |
| `rift_wc_approve` | Approve request. Returns an approval link |
| `rift_wc_reject` | Reject request |
| `rift_wc_sessions` | List sessions |
| `rift_wc_disconnect` | Disconnect session |
### Merchant (3)
| Tool | Description |
|------|-------------|
| `rift_create_invoice` | Create invoice |
| `rift_get_invoices` | List invoices |
| `rift_merchant_status` | KYB status |
### Notifications (3)
| Tool | Description |
|------|-------------|
| `rift_notifications_register` | Register device |
| `rift_notifications_send` | Send notification |
| `rift_notifications_subscriptions` | Get/delete subscriptions |
### Signer (4)
| Tool | Description |
|------|-------------|
| `rift_get_wallet_instance` | Get wallet for chain |
| `rift_sign_transaction` | Removed upstream (410 `EOA_SIGNING_REMOVED`); kept for a clear error |
| `rift_send_transaction` | UserOperation through the Safe. Returns an approval link |
| `rift_sign_message` | ERC-1271 message signature by the Safe. Returns an approval link |
### Assets (3)
| Tool | Description |
|------|-------------|
| `rift_get_tokens` | List tokens |
| `rift_get_user_tokens` | User's tokens |
| `rift_get_chains` | List chains |
### User Management (4)
Project-owner only. These tools use the logged-in session: log in (`rift_send_otp` + `rift_login`) as the account that owns the project before calling them. `projectOwnerEmail` / `projectOwnerPhone` are no longer accepted.
| Tool | Description |
|------|-------------|
| `rift_suspend_user` | Suspend user |
| `rift_unsuspend_user` | Unsuspend user |
| `rift_get_suspended_users` | List suspended |
| `rift_get_user_status` | Look up a user / check suspension status |
### Deposits (1)
| Tool | Description |
|------|-------------|
| `rift_get_deposits` | Get USDC deposits |
TDQS
Scored across 83 tools
Multiple tools overlap or are explicitly legacy aliases: rift_update_recovery_method vs rift_update_recovery, rift_add_recovery_method vs rift_create_recovery, rift_offramp vs rift_offramp_create_order, rift_get_chains vs rift_get_supported_chains, and several KYC status checks. Descriptions often warn which to use, but an agent can still misselect among near-duplicates.
All tools use snake_case with a rift_ prefix, and most follow rift_<verb>_<noun>. Deviations are minor: some are noun-only (rift_status, rift_offramp, rift_swap, rift_guide) or service-prefixed (rift_kyc_get_token, rift_wc_pair, rift_notifications_register).
83 tools is far beyond a well-scoped MCP surface of roughly 3-15 tools and is inflated by legacy, removed, diagnostic, admin, and duplicate endpoints. Even for a broad fintech platform, this count makes discovery and correct selection difficult.
Core workflows are well covered: auth, user/recovery, wallet, send/approve, offramp/onramp, bridge, swap, KYC, WalletConnect, invoices, notifications, and admin. Minor gaps remain, such as invoice get/update/cancel and swap quoting, and the surface includes removed/legacy tools.