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.json

If the file doesn't exist, create it:

mkdir -p ~/.cursor
touch ~/.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

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

  1. Start Simple: Begin with basic configuration, add complexity gradually

  2. Test Locally: Verify commands work before complex operations

  3. Use Mock Mode: Start with safe test wallets

  4. Environment Separation: Keep dev/test/prod configurations separate

Security Guidelines

  1. Never Commit Keys: Use WalletAgent's encrypted keystore

  2. Limit Permissions: Use restrictive file permissions (600) for key files

  3. Regular Rotation: Change private keys regularly

  4. Monitor Usage: Keep track of transactions and gas usage

Performance Tips

  1. Local RPC: Use local Anvil for development

  2. Cache Results: WalletAgent caches contract ABIs and chain data

  3. Batch Operations: Combine multiple operations when possible

Next Steps

Now that WalletAgent is configured with Cursor:

  1. Complete the Quick Start - Learn basic operations

  2. Explore User Features - Master wallet operations

  3. Developer Guide - Smart contract development

  4. 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