AI Tools Integration
Supercharge your development with AI-powered coding assistants
Encore gives AI coding assistants superpowers. With Encore-specific rules and MCP integration, AI understands your architecture and generates type-safe code that follows your patterns. When you run encore run, Encore provisions local infrastructure automatically.
To deploy, you can self-host or use Encore Cloud which provisions infrastructure in your AWS/GCP account with automatic guardrails.
What AI Enables
Encore's structured APIs and infrastructure primitives give AI agents a reliable framework. AI can provision databases, pub/sub topics, and other infrastructure with automatic guardrails, generate type-safe code that follows your existing patterns, and understand your architecture through MCP integration.
Enabling AI for Your Project
There are two ways to set up AI support:
- Method 1: Using the CLI (recommended)
- Method 2: Using Encore Skills
Method 1: Using the CLI
New projects: When you run encore app create, you'll be prompted to select an AI tool. Encore generates the appropriate configuration files for your chosen tool.

Existing projects: Run encore llm-rules init to add AI support:
encore llm-rules init
This prompts you to select a tool and generates the appropriate configuration file (.cursorrules, CLAUDE.md, etc.).
Both commands also set up MCP server configuration for tools that support it (Cursor, Claude Code). If you want to set up MCP manually, see MCP Server below.
Supported tools: Cursor, Claude Code, VS Code, AGENTS.md, and Zed.
Method 2: Using Encore Skills
Use the Encore skills package which works with Cursor, Claude Code, GitHub Copilot, and 10+ other AI agents:
npx add-skill encoredev/skills
You can also install specific skills or target specific agents:
# List available skills
npx add-skill encoredev/skills --list
# Install to specific agents
npx add-skill encoredev/skills -a cursor -a claude-code
MCP Server
Encore's Model Context Protocol (MCP) server gives AI agents deep introspection into your application: querying databases, calling APIs, inspecting services, and analyzing traces.
Start the Server
From your Encore app directory:
encore mcp start
This displays connection information. Keep it running while using your AI tools.
Connect Cursor
Quick setup: Use this button (update your-app-id to your actual app ID):
Manual setup: Create .cursor/mcp.json:
{
"mcpServers": {
"encore-mcp": {
"command": "encore",
"args": ["mcp", "run", "--app=your-app-id"]
}
}
}
Find your app ID with encore app info or in the Encore dashboard.
Connect Claude Code
From your Encore app directory:
claude mcp add --transport stdio encore-mcp -- encore mcp run --app=your-app-id
Verify with claude mcp list. You should see encore-mcp in the list.
What AI Can Do
With Encore skills and MCP connected, AI can:
- Define infrastructure in code - AI declares databases, pub/sub, cron jobs, buckets, and other primitives
- Generate type-safe APIs - code that follows your patterns and passes validation
- Understand architecture - inspect services and how they connect via MCP
- Query databases - introspect schema and data to generate accurate queries
- Debug with tracing - view request traces, timing, and span details to pinpoint issues
- Test instantly - run
encore runto test with real infrastructure, not mocks
In Practice
Smarter Debugging with Tracing
AI can access Encore's distributed tracing via MCP to debug issues intelligently. Instead of guessing, AI can view actual request traces, analyze timing across services, and inspect span details to pinpoint exactly where things went wrong. This creates a powerful feedback loop: generate code, test it, analyze the traces, and iterate.
Database Introspection
AI can query your actual database schema and data via MCP. This means AI understands your real data model and can generate accurate queries, suggest schema changes, and debug data issues by inspecting actual records.
Instant Validation with Real Infrastructure
When you run encore run, Encore provisions real local infrastructure (databases, pub/sub, etc.). AI can generate code and immediately test it against real services, catching issues early and ensuring the code works before you deploy.
Example prompts:
- "Add an endpoint that publishes to a pub/sub topic, call it and verify in traces"
- "Query the users database and show accounts created in the last week"
- "Create a new service with CRUD endpoints connected to PostgreSQL"
Learn More
- MCP Server Documentation - Complete MCP reference
- Encore Skills Repository - Available skills and installation
- Quick Start Guide - Build your first Encore app