Give your AI the context it needs.
The AI Context Protocol (ACP) is an open specification for embedding machine-readable context directly into codebases. It enables AI coding assistants to understand code structure, respect developer constraints, and navigate codebases efficiently — all without requiring dynamic tool connections.
/**
* @acp:module "Payment Processing"
* @acp:domain billing
* @acp:lock restricted — Approval required before modification
* @acp:owner "payments-team"
*/
function processPayment(amount, currency) {
// AI tools now understand this is security-critical code
}| Challenge | ACP Solution |
|---|---|
| Context Limits | Pre-computed cache enables efficient codebase indexing |
| Intent Ambiguity | Structured annotations communicate why, not just what |
| Constraint Invisibility | Machine-readable constraints AI systems respect |
| Inconsistent Tooling | One protocol works across all AI tools |
The ACP ecosystem consists of several focused repositories:
| Repository | Description |
|---|---|
| acp-spec | Protocol specification, JSON schemas, and documentation |
| Repository | Description |
|---|---|
| acp-cli | Reference CLI implementation in Rust with tree-sitter AST parsing |
| acp-mcp | MCP server for AI assistant integration (Claude, GPT, etc.) |
| acp-daemon | Background service for real-time file watching and multi-tool coordination |
| Repository | Description |
|---|---|
| acp-vscode | VS Code extension with IntelliSense and language server support |
| acp-proxy | Universal API proxy for transparent context injection |
# Install the CLI
cargo install acp-cli
# Initialize ACP in your project
acp init
# Index your codebase
acp index
# Check constraints before modifying files
acp constraints src/auth/session.ts🏷️ Structured Annotations — Embed rich metadata directly in code comments using @acp: syntax
🔒 Advisory Constraints — Define lock levels (frozen, restricted, normal) that AI tools respect
📦 Token-Efficient Variables — Reference code elements without verbose inline descriptions
⚡ Pre-Computed Cache — Query codebase structure instantly with indexed JSON
🔌 Universal Integration — Works with Claude, ChatGPT, Copilot, Cursor, and any MCP-compatible tool
┌──────────────────────────────────────────────────────────────────────┐
│ Your Codebase │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ @acp:module │ │ @acp:lock │ │ @acp:domain │ │
│ │ @acp:owner │ │ @acp:style │ │ @acp:depends │ │
│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │
└──────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────┐
│ ACP CLI │
│ acp index │
└─────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────────┐
│ .acp.cache.json │
│ Pre-computed index: symbols, domains, constraints, call graphs │
└──────────────────────────────────────────────────────────────────────┘
│
┌──────────────────────┼──────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Claude / GPT │ │ Cursor │ │ VS Code │
│ (via MCP) │ │ (.cursorrules)│ │ (Extension) │
└───────────────┘ └───────────────┘ └───────────────┘
ACP is built on these core principles:
- Advisory, Not Enforced — Constraints guide AI behavior through trust-based collaboration
- Token Efficiency — Minimize context sent to AI systems with pre-computed indexes
- Language Agnostic — Works across any programming language via comment-based annotations
- Incremental Adoption — Add value gradually, no all-or-nothing migration required
- Complementary to MCP — ACP provides static codebase context; MCP handles dynamic external connections
| Language | Status |
|---|---|
| TypeScript / JavaScript | ✅ Full support |
| Python | ✅ Full support |
| Rust | ✅ Full support |
| Go | ✅ Full support |
| Java | ✅ Full support |
| C / C++ | 🚧 Coming soon |
- Discord: Join our server
- Twitter/X: @acp_protocol
- GitHub Discussions: Discussions
We welcome contributions from the community! Whether it's improving documentation, adding language support, or building new integrations — there's a place for you.
All ACP repositories are released under the MIT License.
Give your AI the context it needs.
Specification •
CLI •
MCP Server •
Discord