Skip to main content

MCP Server to auto-generate steering/context docs from codebases - like Kiro IDE's built-in feature, but for all AI IDEs

Project description

Steering Generator MCP Server

MCP Server untuk auto-generate steering/context docs dari codebase — mirip fitur bawaan Kiro IDE, tapi bisa dipakai di semua AI IDE (Cursor, GitHub Copilot, Windsurf, Cline, Aider, dll).

Apa Ini?

MCP ini scan codebase lo, extract info penting (tech stack, types, routes, dll), terus generate "steering docs" yang bisa dibaca AI. Hasilnya: AI jadi lebih akurat karena udah paham context project.

Foundational Steering Files

Generate 3 file utama (seperti Kiro):

File Fungsi
product.md Product overview, target users, key features, business objectives
tech.md Technology stack, frameworks, libraries, dev tools, constraints
structure.md File organization, naming conventions, import patterns, architecture

Inclusion Modes

Steering files bisa dikonfigurasi kapan di-load:

---
inclusion: always          # Default - selalu di-load
---
---
inclusion: fileMatch
fileMatchPattern: "app/api/**/*"   # Conditional - hanya saat kerja di file tertentu
---
---
inclusion: manual          # On-demand via #steering-file-name
---

File References

Reference file lain dalam steering docs:

#[[file:lib/types.ts]]
#[[file:api/openapi.yaml]]

Supported Frameworks

  • Next.js (App Router & Pages)
  • Laravel 12
  • React (Vite/CRA)
  • Vue.js (Vite)
  • Nuxt.js

Supported IDEs / Output Formats

IDE Output File Format
Kiro .kiro/steering/*.md Multiple files dengan front-matter
Cursor .cursor/rules/project.mdc Single file
GitHub Copilot .github/copilot-instructions.md Single file
Windsurf .windsurfrules Single file
Cline .clinerules Single file
Aider CONVENTIONS.md Single file
Generic STEERING.md Single file

Installation

Prerequisites

  • Python 3.10+
  • pip atau uv

Option 1: Install dari Source (Development)

cd mcp/steering-generator
pip install -e .

# Test run
steering-generator

Option 2: Run langsung tanpa install

cd mcp/steering-generator
python -m steering_generator

Optional: Install Ripgrep (Recommended)

Ripgrep bikin scanning 10x lebih cepat untuk codebase besar.

# Windows
winget install BurntSushi.ripgrep

# Mac
brew install ripgrep

# Linux
sudo apt install ripgrep

MCP Configuration

Kiro IDE

Edit .kiro/settings/mcp.json:

{
  "mcpServers": {
    "steering-generator": {
      "command": "python",
      "args": ["-m", "steering_generator"],
      "cwd": "C:/path/to/mcp/steering-generator"
    }
  }
}

Cursor IDE

Edit .cursor/mcp.json:

{
  "mcpServers": {
    "steering-generator": {
      "command": "python",
      "args": ["-m", "steering_generator"],
      "cwd": "/path/to/mcp/steering-generator"
    }
  }
}

Tools Available

generate_steering

Generate foundational steering docs.

Input:  { 
  "project_path": ".",
  "output_format": "kiro"  // kiro, cursor, copilot, windsurf, cline, aider, markdown
}
Output: {
  "framework": "nextjs",
  "files": {
    ".kiro/steering/product.md": "---\ninclusion: always\n---\n# Product Overview\n...",
    ".kiro/steering/tech.md": "...",
    ".kiro/steering/structure.md": "..."
  }
}

deep_analyze_project

Deep analysis untuk context lengkap.

Input:  { "project_path": "." }
Output: {
  "framework": "nextjs",
  "categorizedDependencies": { "Database": [...], "UI & Styling": [...] },
  "architecturePatterns": { "stateManagement": "Zustand", ... },
  "entities": [...],
  "statusEnums": [...]
}

create_custom_steering

Buat custom steering file dengan inclusion mode.

Input:  { 
  "filename": "api-standards.md",
  "content": "# API Standards\n...",
  "inclusion": "fileMatch",
  "file_match_pattern": "app/api/**/*"
}
Output: {
  "path": ".kiro/steering/api-standards.md",
  "content": "---\ninclusion: fileMatch\nfileMatchPattern: \"app/api/**/*\"\n---\n\n# API Standards\n..."
}

get_steering_template

Get template untuk common steering types.

Input:  { "template_type": "api" }  // api, testing, security, code-style, deployment, components
Output: {
  "filename": "api-standards.md",
  "inclusion": "fileMatch",
  "fileMatchPattern": "app/api/**/*",
  "content": "# API Standards\n..."
}

detect_project_framework

Detect framework dari project.

list_supported_frameworks

List semua framework yang di-support.

list_supported_ides

List semua IDE dan format output.


Example Workflow

Generate Foundational Docs

User: "Generate steering docs untuk project ini"

AI: *calls generate_steering(project_path=".", output_format="kiro")*

AI: "Done! Generated 3 foundational steering files:
     - .kiro/steering/product.md
     - .kiro/steering/tech.md
     - .kiro/steering/structure.md"

Create Custom Steering

User: "Buat steering untuk API standards, load hanya saat kerja di API files"

AI: *calls get_steering_template(template_type="api")*
AI: *calls create_custom_steering(
      filename="api-standards.md",
      content="...",
      inclusion="fileMatch",
      file_match_pattern="app/api/**/*"
    )*
AI: *writes file to .kiro/steering/api-standards.md*

AI: "Done! Created api-standards.md with fileMatch inclusion.
     Will auto-load when you work on files in app/api/"

Output Example

.kiro/steering/tech.md

---
inclusion: always
---

# Technology Stack

This document defines the technology choices for this project.
Use these technologies when generating code and suggestions.

## Framework & Runtime

- **Framework**: Next.js 15 (App Router)
- **UI Library**: React 19
- **Language**: TypeScript 5
- **Runtime**: Node.js 20+

## Database & Backend

- **Database**: Supabase (PostgreSQL)
- **Auth**: Supabase Auth
- **Storage**: Supabase Storage

## UI & Styling

- **CSS Framework**: Tailwind CSS (utility-first)
- **Component Library**: shadcn/ui (built on Radix UI)
- **Icons**: Lucide React

## Key Libraries

- **Validation**: Zod (schema validation)
- **Forms**: React Hook Form
- **Notifications**: Sonner (toast)

## Development Commands

\`\`\`bash
npm run dev       # Start development server
npm run build     # Build for production
npm run lint      # Run linter
\`\`\`

## Environment Variables

Required environment variables (`.env.local`):

| Variable | Description |
|----------|-------------|
| `NEXT_PUBLIC_SUPABASE_URL` | Supabase project URL |
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Supabase anonymous key (public) |

## Technical Constraints

When generating code, follow these constraints:

- Use Server Components by default, Client Components only when needed
- Prefer Server Actions for mutations
- Use `next/image` for images, `next/link` for navigation
- Follow TypeScript strict mode

License

MIT

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

steering_generator_mcp-0.1.0.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

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

steering_generator_mcp-0.1.0-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for steering_generator_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ca4f13fbf44cc4e35953333a99f986656a1c79856bb0340e2c3022cbd295689d
MD5 f465cc4ed2691d866d074d31dcc35055
BLAKE2b-256 d05ab9b6e0972dff66c10145e02ba7efd60fb672d7fb7855dd75a43fbf706da7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for steering_generator_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6eaf7a47db64507f82af1e8efc900f15e5f314d2731bf5a6000cf88684b08f2c
MD5 11de99dc2b526157085a9bb89fdc8adc
BLAKE2b-256 193e46dce6864afebb8c17758953b265ffb31d014699d1a99e43afd18a212a73

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