Codingbuddy MCP Server

A NestJS-based Model Context Protocol (MCP) server that provides AI coding assistants with project-specific context and rules.
Quick Start
npx codingbuddy init
Features
CLI Commands
codingbuddy init | Analyze project and generate configuration |
codingbuddy init --team | Auto-detect installed AI tools and generate adapter configs |
codingbuddy mcp | Start MCP server (stdio mode by default) |
codingbuddy install <source> | Install plugin from git URL or registry |
codingbuddy search <query> | Search plugins in registry |
codingbuddy plugins | List installed plugins |
codingbuddy update [name] | Update outdated plugins |
codingbuddy uninstall <name> | Uninstall plugin |
codingbuddy --help | Show help |
codingbuddy --version | Show version |
MCP Resources
config://project | Project configuration (tech stack, architecture, language) |
rules://rules/core.md | Core workflow rules |
rules://rules/project.md | Project setup rules |
rules://agents/{name}.json | Specialist agent definitions |
MCP Tools
activate | One-shot entry point returning rules, primary agent, specialists, and discussion format for a prompt. Preferred over parse_mode in Claude Code |
suggest_rules | Analyze execution history for repeated failure patterns and generate draft rule suggestions. Proposed for human review ā never auto-applied |
get_project_config | Get project configuration settings |
search_rules | Search through rules and guidelines |
get_agent_details | Get detailed profile of a specialist agent |
parse_mode | Parse PLAN/ACT/EVAL workflow mode (includes language setting) |
recommend_skills | Recommend skills based on user prompt with multi-language support |
get_code_conventions | š Get project code conventions from config files (tsconfig, eslint, prettier, editorconfig, markdownlint) |
generate_checklist | Generate contextual checklists including conventions domain |
analyze_task | Comprehensive task analysis with risk assessment |
pr_quality_report | Run specialist agents on changed files for PR quality |
create_briefing | Capture session state for cross-session recovery |
resume_session | Load previous session briefing |
get_rule_impact_report | Rule effectiveness analytics |
MCP Prompts
activate_agent | Activate a specialist agent with project context |
Prerequisites
Installation
Option 1: npx (Recommended - No Installation Required)
Add the following configuration to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"codingbuddy": {
"command": "npx",
"args": ["-y", "codingbuddy", "mcp"]
}
}
}
Option 2: Global Installation
npm install -g codingbuddy
Then configure Claude Desktop:
{
"mcpServers": {
"codingbuddy": {
"command": "codingbuddy",
"args": ["mcp"]
}
}
}
Option 3: Local Development (Stdio Mode)
cd apps/mcp-server
yarn install
yarn build
{
"mcpServers": {
"codingbuddy": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/codingbuddy/apps/mcp-server/dist/src/cli/cli.js", "mcp"]
}
}
}
Replace /ABSOLUTE/PATH/TO with your actual path.
Option 4: AWS Fargate / Docker - SSE Mode
Build the Docker image from the repository root:
docker build -f apps/mcp-server/Dockerfile -t codingbuddy-mcp .
Run the container:
docker run -p 3000:3000 \
-e MCP_TRANSPORT=sse \
-e PORT=3000 \
codingbuddy-mcp
The server will start in SSE mode, exposing:
GET /sse: SSE Endpoint
POST /messages: Message Endpoint
Option 5: Vercel Deployment
The MCP server can be deployed to Vercel as a serverless function:
Deploy
cd apps/mcp-server
npx vercel deploy
Endpoint
- URL:
https://your-project.vercel.app/api/mcp
- Method: POST
- Content-Type: application/json
Example Request
curl -X POST https://your-project.vercel.app/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/list",
"id": 1
}'
Transport Modes
| Stdio | CLI integration | yarn start |
| SSE | Self-hosted HTTP | MCP_TRANSPORT=sse yarn start |
| Vercel | Serverless HTTPS | npx vercel deploy |
Environment Variables
MCP_TRANSPORT | Transport mode (stdio or sse) | stdio |
PORT | HTTP port for SSE mode | 3000 |
CODINGBUDDY_RULES_DIR | Custom path to .ai-rules directory | Auto-detected |
CODINGBUDDY_PROJECT_ROOT | Project root for config loading | Current directory |
ANTHROPIC_API_KEY | API key for codingbuddy init | Required for init |
Cache Behavior
The MCP server caches configuration to improve performance. Cache TTL varies by environment:
| Development | 5 minutes | Frequent config changes during development |
| Production | 1 hour | Stable configs, reduced file system access |
Note: To force a config reload in development, restart the MCP server or wait for cache expiration.
š Code Conventions Usage
The get_code_conventions MCP tool automatically parses your project's config files and enforces conventions.
Supported Config Files
tsconfig.json | TypeScript strict mode, compiler options, path aliases |
eslint.config.js / .eslintrc.json | ESLint flat/legacy config, rules, parser options |
.prettierrc | Quote style, semicolons, trailing commas, indentation |
.editorconfig | Indent style/size, line endings, charset |
.markdownlint.json | Markdown linting rules (MD001, MD003, etc.) |
Example Usage in ACT Mode
const conventions = await get_code_conventions();
if (conventions.typescript.strict) {
}
const quote = conventions.prettier.singleQuote ? "'" : '"';
const semi = conventions.prettier.semi ? ';' : '';
const indent = ' '.repeat(conventions.editorconfig.indent_size || 2);
Checklist Domain: conventions
The conventions checklist includes 26 validation items across 5 categories:
- TypeScript (4 items): strict mode, noImplicitAny, strictNullChecks, path aliases
- ESLint (3 items): flat config usage, rules compliance, no errors
- Prettier (5 items): quotes, semicolons, trailing commas, indentation, arrow parens
- EditorConfig (6 items): indent style/size, line endings, charset, whitespace, final newline
- Markdown (3 items): heading style, list style, markdownlint rules
EVAL Mode Integration
const checklist = await generate_checklist({
files: ['src/auth/login.ts'],
domains: ['security', 'conventions']
});
Project Configuration
Initialize Configuration
npx codingbuddy init
npx codingbuddy init --format json
npx codingbuddy init --force
npx codingbuddy init /path/to/project
npx codingbuddy init --api-key sk-...
Configuration File
The codingbuddy init command creates a codingbuddy.config.json file:
module.exports = {
language: 'ko',
projectName: 'my-awesome-app',
description: 'A modern web application',
techStack: {
languages: ['TypeScript'],
frontend: ['React', 'Next.js', 'Tailwind CSS'],
backend: ['Node.js', 'Prisma'],
database: ['PostgreSQL'],
tools: ['ESLint', 'Prettier', 'Vitest'],
},
architecture: {
pattern: 'feature-sliced-design',
structure: ['app', 'widgets', 'features', 'entities', 'shared'],
},
conventions: {
style: 'airbnb',
naming: {
files: 'kebab-case',
components: 'PascalCase',
functions: 'camelCase',
},
},
testStrategy: {
approach: 'tdd',
frameworks: ['Vitest', 'Playwright'],
coverage: 80,
},
};
File Structure
my-project/
āāā codingbuddy.config.json # Main configuration
āāā .codingignore # Files to ignore (gitignore syntax)
āāā .codingbuddy/ # Additional context (optional)
āāā context/
āāā architecture.md # Architecture documentation
āāā api-guide.md # API usage guide
How AI Uses Configuration
When you use an AI assistant with this MCP server:
- Language: AI responds in your configured language
- Tech Stack: AI provides code examples using your frameworks
- Architecture: AI suggests structures following your patterns
- Conventions: AI follows your naming and style rules
Architecture Overview
The MCP server follows a modular architecture with clear separation of concerns:
src/
āāā mcp/ # MCP protocol handlers (resources, tools, prompts)
āāā keyword/ # Workflow mode processing (PLAN/ACT/EVAL/AUTO)
ā āāā strategies/ # Mode-specific agent resolution (Strategy pattern)
ā āāā patterns/ # Intent detection patterns
āāā session/ # Session document management
ā āāā session.parser.ts # Document parsing
ā āāā session.serializer.ts # Document serialization
ā āāā session.cache.ts # In-memory caching
āāā context/ # Context document management
āāā config/ # Configuration loading and validation
āāā rules/ # AI rules file management
āāā agent/ # Agent profiles and system prompts
āāā checklist/ # Quality checklists by domain
āāā analyzer/ # Project analysis utilities
āāā skill/ # Skill recommendation engine
āāā cli/ # CLI command handlers
āāā shared/ # Shared utilities (async, security, validation)
Key Design Patterns
| Strategy | Mode-specific agent resolution | keyword/strategies/ |
| Builder | Activation message construction | keyword/activation-message.builder.ts |
| Repository | Session document persistence | session/session.service.ts |
| Factory | Handler creation | mcp/handlers/ |
Module Dependencies
mcp/ ā keyword/ ā config/
ā ā
session/ ā shared/
ā
context/
Code Quality
Test Coverage Goals
| Statement coverage | 90%+ |
| Branch coverage | 85%+ |
| Function coverage | 90%+ |
Running Quality Checks
yarn workspace codingbuddy test --coverage
yarn workspace codingbuddy lint
yarn workspace codingbuddy typecheck
yarn workspace codingbuddy build
Development
yarn start:dev
Testing
1. Using MCP Inspector (Recommended)
The MCP Inspector is a web-based tool to interactively test your MCP server.
yarn build
npx @modelcontextprotocol/inspector node dist/src/main.js
2. Manual Test Script
A simple script is provided to verify basic connectivity and JSON-RPC responses.
yarn build
node test/manual-client.js
Publishing
Automated via GitHub Actions on master push.
-
Update Version:
npm version patch
-
Push to Master:
git push
The workflow will:
- Detect version change.
- Create a GitHub Release (e.g.,
v1.0.1).
- Publish to NPM as
codingbuddy.