Sandbox
@AgiFlow/aicode-toolkit

MCP servers and templates for coding agents

AI Code Toolkit splits agent help into MCP servers and reusable template configs. `scaffold-mcp` generates boilerplates and features, `architect-mcp` shows file patterns and reviews edits, `style-system` exposes design-system details, and `one-mcp` reduces tool discovery overhead.

162 stars22 forksTypeScriptUpdated 1mo ago
Who it's for

Builders who want Claude Code, Cursor, Gemini CLI, or other MCP-compatible agents to scaffold, edit, and review code from shared repo rules.

What it delivers

You can keep agent work aligned to your repo’s patterns without re-explaining the same conventions in every session.

What it does

Project and feature scaffolding

`scaffold-mcp` lists boilerplates and scaffold methods, then generates projects or feature files from templates.

File-level design guidance

`architect-mcp` returns design patterns for specific files before edits, so the agent follows the right conventions.

Rule-based code review

`architect-mcp` checks changes against `RULES.yaml` and reports violations after edits.

Design-system discovery

`style-system` lists themes, CSS classes, shared components, and component visuals for frontend work.

Progressive tool discovery

`one-mcp` acts as an MCP proxy that reduces prompt overhead by revealing tools as needed.

Template authoring support

The toolkit includes admin tools and template files for generating boilerplates, feature scaffolds, design patterns, and rules.

How to get it

  1. 1Run
    # Existing project
    npx @agiflowai/aicode-toolkit init
    
    # New project
    npx @agiflowai/aicode-toolkit init --name my-app --project-type monolith

README

AI Code Toolkit

npm version License: AGPL-3.0 Discord

AI Code Toolkit Banner

This repo provides:

  • project and feature scaffolding via templates
  • file-level design guidance before edits
  • rule-based review after edits
  • design-system discovery for frontend work

Why This Exists

As projects scale, conventions in docs like CLAUDE.md, AGENTS.md, and style guides become hard to keep concise and consistently applied by AI agents. This toolkit moves those conventions into reusable template configs (scaffold.yaml, architect.yaml, RULES.yaml) so agents can discover only the relevant guidance when needed.

Quick Start

Requirements:

  • Node.js >= 18
  • an MCP-compatible agent such as Claude Code, Cursor, or Gemini CLI

1. Initialize a Workspace

# Existing project
npx @agiflowai/aicode-toolkit init

# New project
npx @agiflowai/aicode-toolkit init --name my-app --project-type monolith

This creates templates/ and .toolkit/settings.yaml. Projects reference templates through sourceTemplate in project.json or .toolkit/settings.yaml.

2. Configure MCP

init can configure MCP automatically. For manual setup, add the servers you need to your agent config.

Example for Claude Code:

{
  "mcpServers": {
    "scaffold-mcp": {
      "command": "npx",
      "args": ["-y", "@agiflowai/scaffold-mcp", "mcp-serve", "--admin-enable"]
    },
    "architect-mcp": {
      "command": "npx",
      "args": [
        "-y", "@agiflowai/architect-mcp", "mcp-serve",
        "--admin-enable",
        "--design-pattern-tool", "codex",
        "--review-tool", "gemini-cli"
      ]
    },
    "style-system": {
      "command": "npx",
      "args": ["-y", "@agiflowai/style-system", "mcp-serve"]
    }
  }
}

Useful flags:

  • --admin-enable: enable admin/template-authoring tools
  • --design-pattern-tool <tool>: use an LLM to filter design patterns
  • --review-tool <tool>: use an LLM for review output

3. Verify

Ask the agent:

What boilerplates are available?

It should call list-boilerplates. If not, restart the agent.

Repo Layout

AI agent
  ├─ scaffold-mcp
  ├─ architect-mcp
  ├─ style-system
  └─ one-mcp
        ↓
     templates/
       ├─ scaffold.yaml
       ├─ architect.yaml
       └─ RULES.yaml

scaffold-mcp

Generates projects and feature boilerplate from templates.

Core tools:

  • list-boilerplates
  • use-boilerplate
  • list-scaffolding-methods
  • use-scaffold-method

Admin tools:

  • generate-boilerplate
  • generate-feature-scaffold
  • generate-boilerplate-file

architect-mcp

Provides file-specific patterns before edits and reviews changes against RULES.yaml.

Core tools:

  • get-file-design-pattern
  • review-code-change

Admin tools:

  • add-design-pattern
  • add-rule

style-system

Provides theme, CSS class, and component discovery tools.

Core tools:

  • list_themes
  • get_css_classes
  • get_component_visual
  • list_shared_components
  • list_app_components

one-mcp

Provides progressive tool discovery to reduce MCP prompt overhead.

Typical Workflow

Create a Project

User: "Create a Next.js app called dashboard"

Agent:
1. list-boilerplates
2. use-boilerplate
3. Project is generated

Add a Feature

User: "Add a products API route"

Agent:
1. list-scaffolding-methods
2. use-scaffold-method
3. Feature files are generated

Edit a File Safely

User: "Add a products page"

Agent:
1. get-file-design-pattern
2. edit the file using the returned patterns and rules
3. review-code-change
4. fix any violations

Style a Component

User: "Style the button with our theme colors"

Agent:
1. get_css_classes
2. list_shared_components
3. update the component
4. get_component_visual

Template Structure

templates/
└── nextjs-15/
    ├── scaffold.yaml
    ├── architect.yaml
    ├── RULES.yaml
    └── boilerplate/

scaffold.yaml

Defines boilerplates and feature scaffolds.

boilerplates:
  - name: nextjs-15-app
    description: "Next.js 15 with App Router"
    targetFolder: apps
    includes:
      - boilerplate/**/*

features:
  - name: add-route
    description: "Add route with page and layout"
    variables_schema:
      name: { type: string, required: true }
    includes:
      - features/route/**/*

architect.yaml

Defines file-level patterns that should be shown before edits.

patterns:
  - name: server-component
    description: "Default for page components"
    file_patterns:
      - "**/app/**/page.tsx"
    description: |
      - Use async/await for data fetching
      - Keep components focused on rendering
      - Move business logic to server actions

RULES.yaml

Defines review rules. Rules can be inherited from a global templates/RULES.yaml.

version: '1.0'
template: typescript-lib
rules:
  - pattern: src/services/**/*.ts
    description: Service Layer Implementation Standards
    must_do:
      - rule: Create class-based services with single responsibility
        codeExample: |-
          export class DataProcessorService {
            async processData(input: string): Promise<ProcessedData> {
              // Implementation
            }
          }
      - rule: Use dependency injection for composability
    must_not_do:
      - rule: Create static-only utility classes - use functions
        codeExample: |-
          // ❌ BAD
          export class Utils {
            static format(s: string) {}
          }

          // ✅ GOOD
          export function format(s: string): string {}

Project Types

Monorepo

Each project references its template in project.json.

my-workspace/
├── apps/
│   └── web-app/
│       └── project.json
├── packages/
│   └── shared-lib/
│       └── project.json
└── templates/

Monolith

Monoliths use .toolkit/settings.yaml.

version: "1.0"
projectType: monolith
sourceTemplate: nextjs-15

Built-in Templates

Included templates:

TemplateStackIncludes
nextjs-drizzleNext.js 15, App RouterTypeScript, Tailwind 4, Drizzle, Storybook
typescript-libTypeScript LibraryESM/CJS, Vitest, TSDoc
typescript-mcp-packageMCP ServerCommander, MCP SDK

Custom Templates

For template authoring, start from an existing repo or template and use the admin prompts:

/generate-boilerplate
/generate-feature-scaffold

For design/rule authoring, use:

  • add-design-pattern
  • add-rule

Supported Agents

AgentConfig LocationStatus
Claude Code.mcp.jsonSupported
Cursor.cursor/mcp.jsonSupported
Gemini CLI.gemini/settings.jsonSupported
Codex CLI.codex/config.jsonSupported
GitHub CopilotVS Code settingsSupported
Windsurf-Planned

Packages

PackageDescription
@agiflowai/aicode-toolkitCLI for init and config sync
@agiflowai/scaffold-mcpScaffolding server
@agiflowai/architect-mcpPattern and review server
@agiflowai/style-systemDesign-system server
@agiflowai/one-mcpMCP proxy for progressive discovery

Contributing

See CONTRIBUTING.md.

License

AGPL-3.0


Issues · Discord · Website

Files in the repo

Repository payload27 top-level entries
  • .claude
  • .claude-plugin
  • .gemini
  • .github
  • .husky
  • .toolkit
  • .vscode
  • apps
  • docs
  • packages
  • templates
  • .editorconfig
  • .gitignore
  • .mcp.json
  • .npmrc
  • biome.json
  • CHANGELOG.md
  • CLAUDE.md
  • commitlint.config.js
  • LICENSE
  • mcp-config.yaml
  • nx.json
  • package.json
  • pnpm-lock.yaml
  • pnpm-workspace.yaml
  • README.md
  • tsconfig.base.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k