I'm excited to share CodeMode Unified - a high-performance code execution platform for AI agents that I've been building! 🎉
A dual-architecture service that lets AI agents (like Claude Code) execute JavaScript/TypeScript with full access to MCP tools, APIs, and knowledge systems.
Two ways to use it:
- MCP Server Mode - Direct integration with Claude Code
- HTTP Backend - REST API for any AI platform
Choose the right runtime for your use case:
- Bun ⭐ - Full async/await, fastest execution (50-100ms startup)
- QuickJS - Ultra-lightweight, 5-10ms startup
- Deno - Secure by default with explicit permissions
- isolated-vm - V8 isolates for maximum control
- E2B - Cloud sandboxes for untrusted code
Execute code with instant access to your entire MCP ecosystem:
- AutoMem - AI memory with graph relationships
- Context7 - Official library documentation
- Sequential Thinking - Multi-step reasoning
- HelpScout, WordPress, GitHub - All your MCP servers!
- ✅ 6/6 workflows passing (100% success rate)
- ✅ 150-300ms execution time
- ✅ 1000+ requests/second throughput
- ✅ Sandboxed execution with memory/CPU limits
- ✅ OAuth 2.1 + JWT authentication
// AI agent executes this code with full MCP access
const pokemon = await fetch('https://pokeapi.co/api/v2/pokemon/pikachu')
.then(r => r.json());
// Store in AutoMem knowledge graph
const memory = await mcp.automem.store_memory({
content: `Pokemon: ${pokemon.name} has ${pokemon.abilities.length} abilities`,
tags: ['pokemon', 'api-test'],
importance: 0.8,
metadata: {
height: pokemon.height,
weight: pokemon.weight
}
});
// Return structured results
return {
pokemon: pokemon.name,
memory_id: memory.memory_id,
abilities: pokemon.abilities.map(a => a.ability.name)
};Result: Agent can fetch external APIs, store knowledge, and return structured data - all in one execution!
For Claude Code users:
// Add to .mcp.json
{
"mcpServers": {
"codemode-unified": {
"command": "node",
"args": ["/path/to/codemode-unified/dist/mcp-server.js"],
"env": {
"MCP_CONFIG_PATH": "/path/to/your/.mcp.json"
}
}
}
}For HTTP API:
npm install
npm run build
npm start # Runs on http://localhost:3001┌─────────────────────────────────────────┐
│ CodeMode Unified │
├──────────────┬──────────────────────────┤
│ MCP Server │ HTTP Backend │
│ (stdio) │ (port 3001) │
└──────┬───────┴──────────┬───────────────┘
│ │
└────────┬─────────┘
▼
┌────────────────┐
│ Executor │
├────────────────┤
│ Multi-Runtime │
│ • Bun ⭐ │
│ • QuickJS │
│ • Deno │
└────────┬───────┘
│
┌────────┴────────┐
│ │
▼ ▼
MCP Tools Standard APIs
AutoMem fetch()
Context7 console
Sequential Date, JSON
| Metric | Performance |
|---|---|
| Startup (Bun) | 50-100ms |
| Startup (QuickJS) | 5-10ms |
| Throughput | 1000+ req/sec |
| Memory/sandbox | 5-50MB |
| Success Rate | 100% (6/6 workflows) |
Big shoutout to my testing partner for finding these critical bugs:
- ✅ Return statement wrapping - Multi-line returns work correctly
- ✅ MCP response parsing - Handles both JSON and formatted text
- ✅ Config loading - Proper mcpServers→servers mapping
- ✅ Process cleanup - No more zombie processes
✅ API Aggregation Fetch from multiple APIs in parallel, aggregate results
✅ Knowledge Graph Building Store entities and relationships in AutoMem
✅ Research Workflows Use Context7 for docs, Sequential Thinking for analysis
✅ Customer Data Analysis Access HelpScout, analyze patterns, generate insights
✅ Content Operations WordPress integration for content management automation
- GitHub: danieliser/codemode-unified
- Documentation: Full architecture, runtime comparison, MCP setup guide
- Examples: Pokemon showcase, API aggregation, knowledge graphs
- License: MIT (open source!)
- QuickJS - Lightweight JS engine
- Bun - Fast all-in-one runtime
- Model Context Protocol - AI-native tool protocol
- Fastify - High-performance web framework
Would love to hear your thoughts, feedback, or use cases! Feel free to:
- Open issues or discussions on GitHub
- Contribute improvements or runtime implementations
- Share how you're using it in your AI workflows
Built with ❤️ for the AI agent ecosystem 🤖
- Terminal Output - Pokemon workflow execution with colored output
- Architecture Diagram - The ASCII art from README
- Performance Metrics - Execution times and throughput graph
- MCP Config - Sample .mcp.json configuration
- Code Sample - The Pokemon example with syntax highlighting
- Test Results - 6/6 workflows passing output
- Live execution - Run Pokemon workflow via MCP tool
- Performance comparison - Show different runtime speeds
- Knowledge graph - Visualize AutoMem associations being created
- API aggregation - Parallel Promise.all execution
- Error handling - Show graceful failure and recovery
Ready to supercharge your AI agents with code execution? Give it a try! 🚀