Code Guider MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Code Guider MCP Serveranalyze code complexity in my project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Code Guider MCP Server
An AI-powered local Model Context Protocol (MCP) server that provides intelligent code guidance, workflow automation, and quality assurance for your development projects. Features hybrid storage with Drizzle ORM for fast CRUD operations and vector storage for semantic search, AI-driven insights, and Anubis-inspired role-based workflow execution. Optimized for Bun runtime with native SQLite for maximum performance.
Features
π§ AI-Powered Analysis: Intelligent code analysis with semantic understanding
π Hybrid Storage: Drizzle ORM for fast CRUD operations + vector storage for semantic search
π Multi-Project Support: Global and project-specific databases with automatic project detection
π Global + Local Mode: Global templates/workflows + project-specific customization
π Workflow Automation: Define and execute AI-enhanced code generation workflows
π Template System: Reusable code templates with AI-powered suggestions
β Quality Rules: Automated code quality checking with pattern recognition
π― Context-Aware: Provides guidance based on file type and project context
π§ MCP Integration: Works with any MCP-compatible client
π TypeScript: Full TypeScript support with type safety
π Similar Code Detection: Find similar code patterns across your codebase
π Complexity Analysis: AI-powered code complexity scoring
π₯ Role-Based Execution: Anubis-inspired role system with Product Manager, Architect, Senior Developer, and Code Review roles
π Execution Tracking: Comprehensive workflow execution tracking with state management
π― Context Preservation: Seamless role transitions with full context preservation
π€ Multi-Agent Support: Optimized templates for Cursor, Copilot, RooCode, and KiloCode
βΈοΈ Pause/Resume: Pause and resume workflow executions at any time
π Execution Metrics: Detailed metrics and performance tracking
β‘ Performance: 3-10x faster operations with Drizzle ORM + Bun SQLite optimization
π LibSQL Powered: Built with LibSQL for cross-platform compatibility and optimal performance
π¦ Zero Native Dependencies: Pure JavaScript/TypeScript with no native compilation required
π€ AI Migration: Natural language migration commands that intelligently transform and migrate data
π Smart Transformation: AI-powered data transformation with validation and rollback capabilities
π‘οΈ Safe Migration: Built-in backup, dry-run, and validation features for safe data migration
Related MCP server: My First MCP Server
Quick Start
Installation
Option 1: npm (Recommended - Easiest)
# Install globally
npm install -g code-guider-mcp
# Start the server (migration runs automatically)
code-guider-mcpOption 2: Local Development
# Clone the repository
git clone <your-repo-url>
cd code-guider
# Install dependencies
npm install
# Build the project
npm run build
# Run database migration (first time only)
npm run migrate
# Start the MCP server
npm startRunning the MCP Server
With npm (Global Installation)
# Start with defaults
code-guider-mcp
# Start on specific port
code-guider-mcp --port 8080
# Run migration only
code-guider-mcp --migrate
# Open database studio
code-guider-mcp --studio
# Show help
code-guider-mcp --helpWith Local Development
# Start the MCP server
npm startMulti-Project Support
Code Guider supports both global and project-specific modes:
Project Modes
Global Mode (
--global): Uses global database for all projectsProject Mode (default): Uses project-specific database
Auto-detect: Automatically detects project type and initializes
Project Management Commands
# Initialize a project (auto-detects type)
code-guider-mcp --init
# Initialize specific project
code-guider-mcp --init /path/to/project
# List all projects
code-guider-mcp --list-projects
# Use global storage
code-guider-mcp --global
# Use specific project
code-guider-mcp /path/to/projectProject Structure
~/.code-guider/ # Global storage
βββ global.db # Global database
βββ config.json # Global configuration
βββ projects/
βββ projects.json # Project registry
/path/to/project/ # Project-specific storage
βββ .guidance/
βββ guidance.db # Project databaseUsing with MCP Clients
With npm (Global Installation)
{
"mcpServers": {
"code-guidance": {
"command": "code-guider-mcp"
}
}
}With Local Development
{
"mcpServers": {
"code-guidance": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/path/to/code-guider"
}
}
}Architecture
Core Components
MCP Server (
src/mcp-server.ts): Main server implementation with tool handlersHybrid Storage (
src/hybrid-storage.ts): Combines Drizzle ORM for fast CRUD + VectorStorage for AI featuresDrizzle Storage (
src/db/drizzle-storage.ts): Optimized database operations with SQLiteVector Storage (
src/vector-storage.ts): AI-powered semantic search and embeddingsGuidance Engine (
src/guidance-engine.ts): Workflow execution and code analysisType Definitions (
src/types.ts): TypeScript interfaces for all data structures
Data Structure
.guidance/
βββ guidance.db # SQLite database with hybrid storage
β βββ workflows # Drizzle ORM table (fast CRUD)
β βββ templates # Drizzle ORM table (fast CRUD)
β βββ quality_rules # Drizzle ORM table (fast CRUD)
β βββ project_config # Drizzle ORM table (fast CRUD)
β βββ workflows_vector # Vector embeddings for semantic search
β βββ templates_vector # Vector embeddings for semantic search
β βββ quality_rules_vector # Vector embeddings for semantic search
βββ config/ # Legacy file-based config (auto-migrated)
β βββ project.json
βββ workflows/ # Legacy JSON files (auto-migrated to DB)
βββ templates/ # Legacy YAML files (auto-migrated to DB)
βββ rules/ # Legacy JSON files (auto-migrated to DB)Hybrid Storage Benefits
Drizzle ORM: 3-10x faster CRUD operations with type-safe queries
Vector Storage: AI-powered semantic search and similarity matching
Automatic Migration: Seamless migration from file-based to hybrid storage
Performance: Optimized database operations with indexing and caching
Type Safety: Full TypeScript support with compiled queries
Hybrid Storage Implementation
The code-guider now uses a hybrid storage approach that combines the best of both worlds:
Drizzle ORM (Fast CRUD Operations)
3-10x faster CRUD operations compared to file-based storage
Type-safe queries with full TypeScript support
Database indexing for optimized lookups
ACID transactions for data integrity
Connection pooling and query optimization
Vector Storage (AI Features)
Semantic search using vector embeddings
Similarity matching for finding related code
AI-powered suggestions based on content similarity
Pattern recognition across your codebase
Migration System
The system automatically migrates from the legacy file-based storage to the new hybrid approach:
# Run migration (first time only)
npm run migrateThis will:
Create the SQLite database with proper schema
Migrate existing workflows, templates, and rules
Generate vector embeddings for semantic search
Preserve all existing data and functionality
Performance Comparison
Operation | File-based | Hybrid Storage | LibSQL | Improvement |
Write (100 items) | 50-100ms | 10-20ms | 3-8ms | 6-15x faster |
Read (100 items) | 20-50ms | 5-15ms | 2-5ms | 4-20x faster |
Search (100 items) | 30-80ms | 2-10ms | 1-3ms | 10-25x faster |
Build Time | 2-5s (tsc) | 1-2s (tsc) | 200-500ms (bun) | 4-10x faster |
Memory Usage | High (all data) | Low (streaming) | Minimal (pure JS) | 5-50x less |
Concurrent Reads | Poor (file locks) | Excellent (WAL) | Excellent (WAL) | 3-10x better |
MCP Functions
The Code Guider MCP Server provides 13 consolidated functions that replace the previous 47 individual functions, offering a cleaner and more organized API:
1. manage_workflows - Workflow Management
Actions:
list,get,create,executePurpose: Unified workflow management operations
Example:
{ action: 'list', search: 'authentication' }
2. manage_templates - Template Management
Actions:
list,createPurpose: Unified template management operations
Example:
{ action: 'create', template: {...} }
3. analyze_code - Code Analysis
Types:
guidance,validation,ai_analysis,similar_codePurpose: Unified code analysis operations
Example:
{ analysisType: 'ai_analysis', filePath: '...', projectPath: '...' }
4. manage_quality_rules - Quality Rules Management
Actions:
list,createPurpose: Unified quality rules management
Example:
{ action: 'create', rule: {...} }
5. semantic_search - Semantic Search
Types:
workflows,templates,codePurpose: Unified semantic search across different content types
Example:
{ type: 'workflows', query: 'user authentication' }
6. manage_execution - Execution Management
Actions:
execute,execute_ai,execute_roles,status,pause,resumePurpose: Unified execution management operations
Example:
{ action: 'execute_roles', workflowId: '...', projectPath: '...' }
7. manage_roles - Role Management
Actions:
list,guidancePurpose: Unified role management operations
Example:
{ action: 'guidance', roleId: 'architect' }
8. ai_migrate - AI Migration
Types:
data,workflows,templates,quality_rulesPurpose: Unified AI-powered migration operations
Example:
{ type: 'data', instruction: 'migrate all workflows to new format' }
9. manage_projects - Project Management
Actions:
list,init,auto_init,info,syncPurpose: Unified project management operations with Anubis-style auto-detection
Example:
{ action: 'auto_init', projectPath: '/path/to/project' }
10. manage_memories - Memory Management
Actions:
save,search,list,get,statsPurpose: Unified memory management operations
Example:
{ action: 'save', content: '...', type: 'best_practice', category: 'technical' }
11. manage_memory_rules - Memory Rules Management
Actions:
enhance_request,init_project,list,createPurpose: Unified memory rules management
Example:
{ action: 'enhance_request', request: '...', context: {...} }
12. get_execution_metrics - Execution Metrics
Purpose: Get detailed metrics for a workflow execution
Example:
{ executionId: 'exec_123' }
13. transition_role - Role Transition
Purpose: Transition to a different role in workflow execution
Example:
{ executionId: 'exec_123', toRoleId: 'architect' }
Benefits of Consolidation
Reduced Function Count: 72% reduction (47 β 13 functions)
More MCP Slots: 27 additional slots for other MCP servers
Cleaner API: Logical grouping of related operations
Easier Maintenance: Fewer functions to maintain
Better Organization: Related operations grouped together
Consistent Interface: All functions follow similar patterns
Usage Examples
Consolidated API Examples
Project Management (Anubis-Style Auto-Detection)
// π Auto-initialize project with full tech stack detection
const project = await mcpClient.callTool('manage_projects', {
action: 'auto_init',
projectPath: '/path/to/your/project',
});
// This will automatically:
// β
Scan your project files
// β
Detect React + TypeScript + Vite + Tailwind + Prisma + Jest
// β
Create project-specific memory rules
// β
Set up tech stack-specific workflows
// β
Initialize project database
// Get detailed project info
const info = await mcpClient.callTool('manage_projects', {
action: 'info',
projectPath: '/path/to/your/project',
});
// Results show full tech stack:
// π§ Tech Stack:
// Frameworks: react, next
// Languages: typescript, javascript
// Tools: vite, tailwindcss, jest, testing-library
// Databases: prisma
// Deployment: vercelWorkflow Management
// List workflows
const workflows = await mcpClient.callTool('manage_workflows', {
action: 'list',
search: 'authentication'
});
// Create a new workflow
const newWorkflow = await mcpClient.callTool('manage_workflows', {
action: 'create',
workflow: {
name: 'React Component Generator',
description: 'Generate React components with TypeScript',
steps: [...],
qualityChecks: [...]
}
});
// Execute a workflow
const result = await mcpClient.callTool('manage_workflows', {
action: 'execute',
workflowId: 'react-component',
projectPath: '/path/to/project',
variables: { ComponentName: 'UserProfile' }
});Code Analysis
// AI-powered code analysis
const analysis = await mcpClient.callTool('analyze_code', {
analysisType: 'ai_analysis',
filePath: '/path/to/component.tsx',
projectPath: '/path/to/project',
projectType: 'react',
});
// Get code guidance
const guidance = await mcpClient.callTool('analyze_code', {
analysisType: 'guidance',
filePath: '/path/to/component.tsx',
projectPath: '/path/to/project',
});
// Find similar code
const similarCode = await mcpClient.callTool('analyze_code', {
analysisType: 'similar_code',
filePath: '/path/to/component.tsx',
projectPath: '/path/to/project',
limit: 5,
});Semantic Search
// Search workflows
const workflows = await mcpClient.callTool('semantic_search', {
type: 'workflows',
query: 'create a user authentication component',
limit: 5,
});
// Search templates
const templates = await mcpClient.callTool('semantic_search', {
type: 'templates',
query: 'API endpoint with error handling',
limit: 3,
});
// Search code patterns
const codePatterns = await mcpClient.callTool('semantic_search', {
type: 'code',
query: 'React hooks pattern',
filePath: '/path/to/component.tsx',
projectPath: '/path/to/project',
});Execution Management
// Execute with roles
const result = await mcpClient.callTool('manage_execution', {
action: 'execute_roles',
workflowId: 'react-component',
projectPath: '/path/to/project',
agentType: 'cursor',
variables: { ComponentName: 'UserProfile' },
});
// Get execution status
const status = await mcpClient.callTool('manage_execution', {
action: 'status',
executionId: 'exec-123',
});
// Pause execution
await mcpClient.callTool('manage_execution', {
action: 'pause',
executionId: 'exec-123',
reason: 'User requested pause',
});Memory Management
// Save a memory
await mcpClient.callTool('manage_memories', {
action: 'save',
content: 'Use React.memo for expensive components',
type: 'best_practice',
category: 'technical',
tags: ['react', 'performance'],
});
// Search memories
const memories = await mcpClient.callTool('manage_memories', {
action: 'search',
query: 'React performance optimization',
scope: 'global',
limit: 10,
});
// Get memory statistics
const stats = await mcpClient.callTool('manage_memories', {
action: 'stats',
});AI Migration
// Migrate data with AI
const migration = await mcpClient.callTool('ai_migrate', {
type: 'data',
instruction:
'migrate all workflows to new format with enhanced quality checks',
source: 'file-based',
target: 'hybrid-storage',
options: { dryRun: true, backup: true },
});
// Migrate workflows
const workflowMigration = await mcpClient.callTool('ai_migrate', {
type: 'workflows',
transformation: 'add new quality checks and update step format',
filters: { tags: ['react', 'component'] },
});Migration Notes
All existing functionality is preserved
Performance impact is negligible
The consolidation uses action/type parameters to differentiate operations
Error handling and validation remain the same
All return formats remain unchanged
Development
Project Structure
src/
βββ index.ts # Entry point
βββ mcp-server.ts # MCP server implementation
βββ hybrid-storage.ts # Hybrid storage implementation
βββ storage-interface.ts # Unified storage interface
βββ storage.ts # Legacy file-based storage
βββ vector-storage.ts # AI-powered vector storage
βββ guidance-engine.ts # Workflow execution engine
βββ db/
β βββ connection.ts # Database connection management
β βββ drizzle-storage.ts # Drizzle ORM operations
β βββ schema.ts # Database schema definitions
βββ enhanced-workflow-engine.ts # Enhanced workflow execution
βββ execution-tracker.ts # Workflow execution tracking
βββ ai-guidance-engine.ts # AI-powered guidance engine
βββ role-manager.ts # Role-based workflow management
βββ migrate.ts # Database migration script
βββ types.ts # TypeScript type definitionsScripts
npm run build- Build the project using TypeScript compilernpm run build:all- Build all entry points (index.js and migrate.js)npm run dev- Build and run the servernpm start- Run the built servernpm run migrate- Run database migration (first time setup)npm run db:generate- Generate Drizzle migrationsnpm run db:migrate- Apply Drizzle migrationsnpm run db:studio- Open Drizzle Studio (database GUI)npm test- Run tests with Jestnpm run lint- Run Biome linting on src/npm run lint:fix- Fix linting issues automaticallynpm run format- Format code with Biomenpm run check- Run both linting and formatting checksnpm run check:fix- Fix both linting and formatting issuesnpm run check:all- Check entire projectnpm run format:all- Format entire projectnpm run lint:all- Lint entire project
Note: All scripts use npm and standard Node.js tools. The migration script automatically handles the transition from file-based storage to hybrid storage with LibSQL.
AI-Powered Migration System
The Code Guider now includes intelligent migration tools that understand natural language instructions:
Natural Language Commands: Tell the AI what to migrate in plain English
Smart Transformation: AI automatically transforms data based on your instructions
Safe Migration: Built-in backup, dry-run preview, and validation features
Flexible Filtering: Migrate specific data based on tags, dates, types, and patterns
Rollback Support: Automatic backup creation before any migration
Validation: Post-migration validation ensures data integrity
Example Commands:
"migrate all workflows to new format with enhanced quality checks"
"convert templates to new schema and add missing fields"
"update quality rules severity levels and merge duplicates"
"transform React component templates to use new variable syntax"
LibSQL Migration
The project has been fully migrated to use LibSQL instead of better-sqlite3:
Cross-platform compatibility - works with both Bun and Node.js
Zero native dependencies - no compilation issues
SQLite-compatible - drop-in replacement for SQLite
Better performance than better-sqlite3
Simplified deployment with no native module requirements
Build Performance
The project uses TypeScript compiler for reliable and consistent builds:
Standard TypeScript compilation for maximum compatibility
Type checking during build process
Incremental compilation for faster subsequent builds
Source maps for better debugging experience
Cross-platform compatibility with all Node.js environments
Adding New Tools
Define the tool in
mcp-server.tsin theListToolsRequestSchemahandlerAdd the tool handler in the
CallToolRequestSchemahandlerImplement the tool logic
Update documentation
Code Quality & Formatting
Biome Configuration
This project uses Biome for linting and formatting, providing a fast and comprehensive code quality solution optimized for Node.js:
Features
β‘ Ultra-fast: 10-100x faster than ESLint + Prettier
π§ All-in-one: Linting, formatting, and import organization
π― Zero config: Works out of the box with sensible defaults
π Node.js optimized: Native integration with Node.js runtime
π Comprehensive rules: 200+ linting rules for code quality
π¨ Consistent formatting: Automatic code formatting and style enforcement
Configuration
The project includes a comprehensive biome.json configuration that enforces:
Code Quality Rules:
β No unused imports, variables, or functions
β No unused classes, interfaces, types, or enums
β No unused constants or parameters
β DRY (Don't Repeat Yourself) code enforcement
β No commented code (except TODO comments)
β Consistent code style and formatting
File Coverage:
TypeScript and JavaScript files
Scripts directory
Configuration files
Excludes test files, build artifacts, and dependencies
Formatting Standards:
2-space indentation
Single quotes for strings
Semicolons always
100 character line width
LF line endings
Trailing commas (ES5 style)
Available Scripts
# Linting
npm run lint # Lint src/ directory
npm run lint:fix # Fix linting issues automatically
npm run lint:all # Lint entire project
npm run lint:all:fix # Fix all linting issues
# Formatting
npm run format # Format src/ directory
npm run format:all # Format entire project
# Combined checks
npm run check # Check src/ (lint + format)
npm run check:fix # Fix src/ (lint + format)
npm run check:all # Check entire project
npm run check:all:fix # Fix entire project
# Pre-commit hooks
npm run pre-commit:install # Install pre-commit hooks
npm run pre-commit:run # Run pre-commit checks
npm run pre-commit # Install and run pre-commit checksPre-commit Hooks
The project includes pre-commit hooks that automatically run:
Biome Check: Linting and formatting validation
TypeScript Check: Type checking with
tsc --noEmitTest Check: Run test suite
Format Check: Ensure code is properly formatted
To set up pre-commit hooks:
# Install pre-commit hooks
npm run pre-commit:install
# Run all checks manually
npm run pre-commit:runIDE Integration
For the best development experience, install the Biome extension in your IDE:
VS Code: Biome extension
Cursor: Built-in support
WebStorm/IntelliJ: Biome plugin
Configuration Details
The biome.json configuration includes:
Extended config: Uses
@canonical/biome-configfor consistencyComprehensive rules: 200+ linting rules across correctness, style, suspicious, complexity, performance, and security
File patterns: Includes TypeScript, JavaScript, and JSON files
Test overrides: Relaxed rules for test files
Import organization: Automatic import sorting and organization
Format consistency: Unified formatting across all file types
Performance Benefits
10-100x faster than ESLint + Prettier
Single tool instead of multiple tools
Native Node.js integration for optimal performance
Parallel processing for large codebases
Incremental checking for faster subsequent runs
Configuration
Project Configuration
The project configuration is stored in .guidance/config/project.json:
{
"name": "my-project",
"type": "react",
"frameworks": ["react", "typescript"],
"languages": ["typescript", "javascript"],
"qualityRules": ["no-unused-imports", "no-any-types"],
"workflows": ["react-component", "api-endpoint"],
"templates": ["react-component", "api-endpoint"]
}Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT License - see LICENSE file for details
Support
For questions and support, please open an issue on GitHub.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nsatee/code-guider-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server