MCP Quick Reference
Quick reference for using ERA Agent with Claude Desktop via MCP.
Setup (One-Time)
Section titled “Setup (One-Time)”# 1. Build agentcd era-agent && go build -o agent
# 2. Configure Claude Desktop# Edit: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)# Edit: ~/.config/Claude/claude_desktop_config.json (Linux){ "mcpServers": { "era-agent": { "command": "/absolute/path/to/agent", "args": ["mcp"] } }}# 3. Restart Claude Desktop (Cmd+Q, then reopen)Quick Tool Reference
Section titled “Quick Tool Reference”Language Tools (No Session Required)
Section titled “Language Tools (No Session Required)”| Tool | Use For | Example |
|---|---|---|
era_python | Python scripts | Run FizzBuzz, data analysis |
era_node | JavaScript/Node.js | Array operations, algorithms |
era_typescript | TypeScript code | Type-safe code execution |
era_deno | Deno runtime | Modern JS/TS with Deno APIs |
era_shell | System commands | Package install, file ops |
Session Tools (For Stateful Work)
Section titled “Session Tools (For Stateful Work)”| Tool | Use For | Example |
|---|---|---|
era_create_session | Start persistent environment | Create Python session |
era_run_in_session | Run code in session | Execute with state |
era_list_sessions | View all sessions | Check active VMs |
era_get_session | Get session details | Check session status |
era_delete_session | Clean up session | Remove unused VM |
File Operations (Session Only)
Section titled “File Operations (Session Only)”| Tool | Use For | Example |
|---|---|---|
era_upload_file | Add files to session | Upload CSV, config |
era_read_file | Read session files | View results |
era_list_files | List session files | Check workspace |
Common Patterns
Section titled “Common Patterns”Quick Python Script
Section titled “Quick Python Script”Run this Python code:print("Hello World")print([x**2 for x in range(10)])Install Packages
Section titled “Install Packages”1. Create a Python session2. In that session, run: pip install pandas requests3. Then run your Python code using those packagesMulti-Step Analysis
Section titled “Multi-Step Analysis”1. Create a Python session2. Upload data.csv with [your data]3. Install pandas4. Analyze the data5. Read the results fileMulti-Language Testing
Section titled “Multi-Language Testing”Test this sorting algorithm in both Python and JavaScriptWeb Scraping
Section titled “Web Scraping”Create a Python session with network access, install beautifulsoup4 and requests,then scrape the top stories from Hacker NewsGotchas
Section titled “Gotchas”✅ Works Great
Section titled “✅ Works Great”- F-strings:
print(f'{x}: {y}') - Multi-line code with proper indentation
- Special characters in strings
- Complex nested structures
⚠️ Watch Out
Section titled “⚠️ Watch Out”- No State Between Tools: Use sessions for stateful work
- Packages Not Installed: Use
era_shellto install first - Network Disabled: Request “with network access” when needed
- File Paths: Use relative paths in sessions, upload files first
Default Limits
Section titled “Default Limits”| Resource | Default | Override |
|---|---|---|
| CPU | 1 core | ”with 4 CPUs” |
| Memory | 256 MiB | ”with 2GB memory” |
| Timeout | 30 sec | ”with 60 second timeout” |
| Network | Disabled | ”with network access” |
Troubleshooting
Section titled “Troubleshooting”| Problem | Solution |
|---|---|
| Tools not showing | Restart Claude Desktop (Cmd+Q) |
| “Command not found” | Use absolute path in config |
| Code execution fails | Check Docker is running |
| Package not found | Use era_shell to install |
| Network error | Request session “with network access” |
Best Practices
Section titled “Best Practices”When to Use What
Section titled “When to Use What”Use Language Tools (era_python, etc.):
- Quick one-off scripts
- Simple calculations
- Testing snippets
- No package dependencies
Use Sessions:
- Installing packages
- Multi-step workflows
- Stateful computations
- File processing pipelines
Use era_shell:
- Package installation (pip, npm)
- System commands (ls, mkdir)
- Environment setup
- NOT for running code (use language tools instead)
Performance Tips
Section titled “Performance Tips”- Reuse Sessions: Create once, use multiple times
- Choose Right Tool: Language-specific tools are faster than generic
- Install Once: Install packages at session start, not each run
- Load Once: Load large data once in session, process multiple times
Example Prompts
Section titled “Example Prompts”Data Science
Section titled “Data Science”Create a Python session, install pandas and matplotlib, upload this CSV,analyze the data, create a visualization, and save it as a PNGAlgorithm Development
Section titled “Algorithm Development”Implement quicksort in Python with logging, test it with random data,then implement the same algorithm in JavaScript and compare performanceAPI Integration
Section titled “API Integration”Create a Python session with network access, install requests,fetch data from this API, process it, and save as JSONMulti-File Project
Section titled “Multi-File Project”Create a Node.js session, create package.json, install dependencies,create index.js with an Express server, and test itSecurity Notes
Section titled “Security Notes”- ✅ All code runs in isolated VMs
- ✅ Network disabled by default
- ✅ Filesystem isolation per session
- ✅ Resource limits enforced
- ⚠️ Enable network only when needed
- ⚠️ Sessions are local to your machine