Skip to main content

AI-friendly engineering foundation with stable versions, unified logging, and pluggable capability packs

Project description

Anchor Stack

Python 3.10+ MCP 1.25+ MIT License PRs Welcome

AI-Friendly Engineering Foundation

Stable versions, unified logging, and pluggable capability packs

English | 中文


Why Anchor Stack?

Have you ever experienced this?

"AI helped me write the code, but debugging took longer than writing it myself..."

The problem isn't the AI - it's that your project wasn't designed for AI collaboration.

Anchor Stack solves this by creating projects that are:

Problem Solution
Inconsistent logging Standardized logger module - AI knows exactly how to add logs
Environment chaos Type-safe config module - no more process.env everywhere
Version conflicts Curated dependency versions - tested and stable
AI confusion Rules files that teach AI your project conventions

Features

  • Stable Stacks - Curated technology stacks with version-locked dependencies
  • Unified Logging - Standardized logging framework that AI understands
  • AI Rules - Auto-generated rules for Claude, Cursor, Windsurf, and more
  • Pluggable Packs - Add database, AI, auth capabilities on demand
  • MCP Native - Works seamlessly with MCP-compatible AI tools

Quick Start

Installation

# Using pip
pip install anchor-stack

# Using uv (recommended)
uv pip install anchor-stack

Configure Your AI Tool

Claude Desktop

Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "anchor-stack": {
      "command": "anchor-stack",
      "args": ["serve"]
    }
  }
}
Cursor

Edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "anchor-stack": {
      "command": "anchor-stack",
      "args": ["serve"]
    }
  }
}
VS Code (Copilot)

Edit .vscode/settings.json:

{
  "mcp": {
    "servers": {
      "anchor-stack": {
        "command": "anchor-stack",
        "args": ["serve"]
      }
    }
  }
}

Create Your First Project

Simply ask your AI assistant:

Create a Next.js project called "my-app" using Anchor Stack

The AI will use scaffold_project to create:

my-app/
├── src/
│   ├── app/              # Next.js App Router
│   ├── components/       # React components
│   ├── lib/
│   │   ├── core/         # Logger & Config (DO NOT MODIFY)
│   │   └── utils/        # Utility functions
│   └── services/         # Business logic
├── CLAUDE.md             # Rules for Claude
├── .cursor/rules/        # Rules for Cursor
├── .windsurfrules        # Rules for Windsurf
└── anchor.config.json    # Project metadata

Available Tools

scaffold_project

Create a new project from a Stack template.

scaffold_project({
  stack_name: "nextjs",        // Stack type
  project_name: "my-app",      // Project name
  target_dir: "/path/to/dir"   // Target directory
})

add_pack

Add a capability pack to an existing project.

add_pack({
  project_dir: "/path/to/project",
  pack_name: "database-postgres"
})

doctor

Check project health and configuration.

doctor({
  project_dir: "/path/to/project"
})

Available Stacks

Stack Version Description
nextjs 2026.1 Next.js 16 + React 19 + TypeScript 5.9 + Tailwind CSS
fastapi 2026.1 FastAPI 0.128 + SQLAlchemy 2.0 + Pydantic v2

Available Packs

Pack Description
database-postgres PostgreSQL with Drizzle ORM (JS) or SQLAlchemy (Python)
ai-langgraph LangChain + LangGraph for AI applications

How It Works

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│   AI Assistant  │────▶│   Anchor Stack   │────▶│  Your Project   │
│  (Claude, etc.) │     │   (MCP Server)   │     │                 │
└─────────────────┘     └──────────────────┘     └─────────────────┘
                               │
                    ┌──────────┴──────────┐
                    ▼                     ▼
              ┌──────────┐         ┌──────────┐
              │  Stacks  │         │  Packs   │
              │ (nextjs) │         │ (db,ai)  │
              └──────────┘         └──────────┘
  1. You ask your AI to create a project
  2. AI calls Anchor Stack's MCP tools
  3. Anchor Stack generates files with proper structure
  4. AI Rules help future AI interactions understand your project

CLI Commands

# Start MCP server
anchor-stack serve

# List available stacks
anchor-stack list-stacks

# List available packs
anchor-stack list-packs

# Show configuration
anchor-stack info

Configuration

Variable Default Description
ANCHOR_STACK_LOG_LEVEL INFO Logging level (DEBUG, INFO, WARNING, ERROR)
ANCHOR_STACK_LOG_JSON false Output logs in JSON format
ANCHOR_STACK_STACKS_DIR stacks Custom stacks directory
ANCHOR_STACK_PACKS_DIR packs Custom packs directory

Development

# Clone the repository
git clone https://github.com/anthropics/anchor-stack.git
cd anchor-stack

# Install dependencies
uv sync

# Run tests
uv run pytest tests/ -v

# Run linting
uv run ruff check src/

# Start dev server
uv run anchor-stack serve

Roadmap

  • Core MCP Server implementation
  • Next.js Stack template
  • FastAPI Stack template
  • Database Pack (PostgreSQL)
  • AI Pack (LangGraph)
  • Auth Pack (NextAuth/OAuth)
  • Web UI for template management

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.


Built with Anchor Stack - Making AI-assisted development reliable

Report Bug · Request Feature

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anchor_stack-0.1.0.tar.gz (50.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anchor_stack-0.1.0-py3-none-any.whl (77.7 kB view details)

Uploaded Python 3

File details

Details for the file anchor_stack-0.1.0.tar.gz.

File metadata

  • Download URL: anchor_stack-0.1.0.tar.gz
  • Upload date:
  • Size: 50.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for anchor_stack-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3617d02fda6f26a2fd453fd106165b36c9c6b98e5566625fc159bc474f8b5151
MD5 4ead198a4349866eab1f79a10cede615
BLAKE2b-256 9ef4e93c87addb4bf28bea86bc685f06b989b1f8d0a3a57110167b2e6653b6ea

See more details on using hashes here.

File details

Details for the file anchor_stack-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: anchor_stack-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 77.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for anchor_stack-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92e0f37ee92ef8682e12e6da359255a8500a5fda8f09950f537365f4e60261e6
MD5 2faec604116ab1c5e53f35e99ed91400
BLAKE2b-256 9782a3f8c8560aed4eb47afed1c9adfd1bf2876592e96d7aed9c84ac3bac0ff8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page