Skip to content
@acp-protocol

AI Context Protocol

Embed machine-readable context in code. Give your AI the understanding it needs.

ACP Header

AI Context Protocol

Give your AI the context it needs.

Specification License Discord Twitter


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
}

Why ACP?

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

Ecosystem

The ACP ecosystem consists of several focused repositories:

📜 Core

Repository Description
acp-spec Protocol specification, JSON schemas, and documentation

🔧 Implementations

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

🧩 Integrations

Repository Description
acp-vscode VS Code extension with IntelliSense and language server support
acp-proxy Universal API proxy for transparent context injection

Quick Start

# 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

Key Features

🏷️ 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

How It Works

┌──────────────────────────────────────────────────────────────────────┐
│                         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)  │
   └───────────────┘     └───────────────┘     └───────────────┘

Design Philosophy

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

Supported Languages

Language Status
TypeScript / JavaScript ✅ Full support
Python ✅ Full support
Rust ✅ Full support
Go ✅ Full support
Java ✅ Full support
C / C++ 🚧 Coming soon

Community

Contributing

We welcome contributions from the community! Whether it's improving documentation, adding language support, or building new integrations — there's a place for you.

License

All ACP repositories are released under the MIT License.


Give your AI the context it needs.

SpecificationCLIMCP ServerDiscord

ACP Logo

Pinned Loading

  1. acp-spec acp-spec Public

    TypeScript 1

Repositories

Showing 8 of 8 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…