Cursor Setup
This guide covers setting up WalletAgent for Cursor, the AI-first code editor built on VSCode.
Prerequisites
Cursor installed and running
Node.js 18+ or Bun runtime
Basic familiarity with JSON configuration files
Installation
Step 1: Locate MCP Configuration
Cursor stores MCP server configurations in a JSON file. The location depends on your operating system:
~/.cursor/mcp.jsonIf the file doesn't exist, create it:
mkdir -p ~/.cursor
touch ~/.cursor/mcp.json~/.config/cursor/mcp.jsonIf the file doesn't exist, create it:
mkdir -p ~/.config/cursor
touch ~/.config/cursor/mcp.json%APPDATA%\Cursor\mcp.jsonIf the file doesn't exist, create it through File Explorer or Command Prompt:
mkdir "%APPDATA%\Cursor"
type nul > "%APPDATA%\Cursor\mcp.json"Step 2: Configure WalletAgent
Add WalletAgent to your MCP configuration:
Step 3: Restart Cursor
Close Cursor completely and reopen it to load the new MCP server.
Configuration Options
Basic Configuration
The minimal configuration to get started:
Local Development
If you're developing or contributing to WalletAgent:
Security Best Practices
Private Key Security: For real wallet operations, use WalletAgent's encrypted keystore or import features.
Verification
Test MCP Connection
In Cursor, open a new chat and try:
You should see WalletAgent listed among the available servers.
Test WalletAgent
Try a basic WalletAgent command:
Expected response:
Test Tool Access
List available WalletAgent tools:
You should see 60+ tools including wallet management, transactions, tokens, and contract operations.
Cursor-Specific Features
Code Integration
Cursor excels at integrating WalletAgent with your code projects:
File Context
Cursor can reference files in your workspace:
Multi-file Operations
Project Integration
Workspace Configuration
Create a .cursor/mcp.json file in your project root for project-specific settings:
Package.json Integration
Add WalletAgent scripts to your package.json:
TypeScript Integration
If your project uses TypeScript, WalletAgent provides full type safety and intellisense support for all operations through the AI agent interface.
Advanced Configuration
Multiple Profiles
Configure different profiles for different environments:
Best Practices
Development Workflow
Start Simple: Begin with basic configuration, add complexity gradually
Test Locally: Verify commands work before complex operations
Use Mock Mode: Start with safe test wallets
Environment Separation: Keep dev/test/prod configurations separate
Security Guidelines
Never Commit Keys: Use WalletAgent's encrypted keystore
Limit Permissions: Use restrictive file permissions (600) for key files
Regular Rotation: Change private keys regularly
Monitor Usage: Keep track of transactions and gas usage
Performance Tips
Local RPC: Use local Anvil for development
Cache Results: WalletAgent caches contract ABIs and chain data
Batch Operations: Combine multiple operations when possible
Next Steps
Now that WalletAgent is configured with Cursor:
Complete the Quick Start - Learn basic operations
Explore User Features - Master wallet operations
Developer Guide - Smart contract development
Advanced Topics - Real wallets and extensions
Getting Help
Resources
FAQ - Common questions and answers
GitHub Issues - Bug reports and feature requests
Community
Cursor Discord - Cursor-specific help and community
GitHub Discussions - General WalletAgent discussions
Stack Overflow - Technical questions tagged with
wallet-agent
Ready to build Web3 apps with Cursor and WalletAgent? Let's start coding.
Last updated
