Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement →
Sign In

codingbuddy

Package Overview
Dependencies
Maintainers
1
Versions
700
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codingbuddy

Multi-AI Rules MCP Server - One source of truth for AI coding rules across all AI assistants

latest
Source
npmnpm
Version
5.6.3
Version published
Maintainers
1
Created
Source

Codingbuddy MCP Server

CI

A NestJS-based Model Context Protocol (MCP) server that provides AI coding assistants with project-specific context and rules.

Quick Start

# Initialize project configuration (AI-powered)
npx codingbuddy init

# This analyzes your project and creates codingbuddy.config.json

Features

CLI Commands

CommandDescription
codingbuddy initAnalyze project and generate configuration
codingbuddy init --teamAuto-detect installed AI tools and generate adapter configs
codingbuddy mcpStart MCP server (stdio mode by default)
codingbuddy install <source>Install plugin from git URL or registry
codingbuddy search <query>Search plugins in registry
codingbuddy pluginsList installed plugins
codingbuddy update [name]Update outdated plugins
codingbuddy uninstall <name>Uninstall plugin
codingbuddy --helpShow help
codingbuddy --versionShow version

MCP Resources

ResourceDescription
config://projectProject configuration (tech stack, architecture, language)
rules://rules/core.mdCore workflow rules
rules://rules/project.mdProject setup rules
rules://agents/{name}.jsonSpecialist agent definitions

MCP Tools

ToolDescription
activateOne-shot entry point returning rules, primary agent, specialists, and discussion format for a prompt. Preferred over parse_mode in Claude Code
suggest_rulesAnalyze execution history for repeated failure patterns and generate draft rule suggestions. Proposed for human review — never auto-applied
get_project_configGet project configuration settings
search_rulesSearch through rules and guidelines
get_agent_detailsGet detailed profile of a specialist agent
parse_modeParse PLAN/ACT/EVAL workflow mode (includes language setting)
recommend_skillsRecommend 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_checklistGenerate contextual checklists including conventions domain
analyze_taskComprehensive task analysis with risk assessment
pr_quality_reportRun specialist agents on changed files for PR quality
create_briefingCapture session state for cross-session recovery
resume_sessionLoad previous session briefing
get_rule_impact_reportRule effectiveness analytics

MCP Prompts

PromptDescription
activate_agentActivate a specialist agent with project context

Prerequisites

  • Node.js v18+

Installation

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:

# Run from codingbuddy 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

ModeUse CaseCommand
StdioCLI integrationyarn start
SSESelf-hosted HTTPMCP_TRANSPORT=sse yarn start
VercelServerless HTTPSnpx vercel deploy

Environment Variables

VariableDescriptionDefault
MCP_TRANSPORTTransport mode (stdio or sse)stdio
PORTHTTP port for SSE mode3000
CODINGBUDDY_RULES_DIRCustom path to .ai-rules directoryAuto-detected
CODINGBUDDY_PROJECT_ROOTProject root for config loadingCurrent directory
ANTHROPIC_API_KEYAPI key for codingbuddy initRequired for init

Cache Behavior

The MCP server caches configuration to improve performance. Cache TTL varies by environment:

EnvironmentCache TTLUse Case
Development5 minutesFrequent config changes during development
Production1 hourStable 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

FileConventions Extracted
tsconfig.jsonTypeScript strict mode, compiler options, path aliases
eslint.config.js / .eslintrc.jsonESLint flat/legacy config, rules, parser options
.prettierrcQuote style, semicolons, trailing commas, indentation
.editorconfigIndent style/size, line endings, charset
.markdownlint.jsonMarkdown linting rules (MD001, MD003, etc.)

Example Usage in ACT Mode

// AI calls this tool before implementing
const conventions = await get_code_conventions();

// TypeScript conventions
if (conventions.typescript.strict) {
  // āœ… Use strict mode - no implicit any
}

// Prettier conventions
const quote = conventions.prettier.singleQuote ? "'" : '"';
const semi = conventions.prettier.semi ? ';' : '';

// EditorConfig conventions
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

// AI automatically includes conventions in code review
const checklist = await generate_checklist({
  files: ['src/auth/login.ts'],
  domains: ['security', 'conventions'] // conventions added automatically
});

// Checklist items include:
// - "TypeScript strict mode is enabled"
// - "Code uses consistent quote style per .prettierrc"
// - "Indentation style matches .editorconfig"
// ... and 23 more convention checks

Project Configuration

Initialize Configuration

# Basic usage (requires ANTHROPIC_API_KEY env var)
npx codingbuddy init

# With options
npx codingbuddy init --format json        # Output as JSON instead of JS
npx codingbuddy init --force              # Overwrite existing config
npx codingbuddy init /path/to/project     # Specify project path
npx codingbuddy init --api-key sk-...     # Pass API key directly

Configuration File

The codingbuddy init command creates a codingbuddy.config.json file:

module.exports = {
  // Response language (ko, en, ja, etc.)
  language: 'ko',

  // Project metadata
  projectName: 'my-awesome-app',
  description: 'A modern web application',

  // Technology stack
  techStack: {
    languages: ['TypeScript'],
    frontend: ['React', 'Next.js', 'Tailwind CSS'],
    backend: ['Node.js', 'Prisma'],
    database: ['PostgreSQL'],
    tools: ['ESLint', 'Prettier', 'Vitest'],
  },

  // Architecture pattern
  architecture: {
    pattern: 'feature-sliced-design',
    structure: ['app', 'widgets', 'features', 'entities', 'shared'],
  },

  // Coding conventions
  conventions: {
    style: 'airbnb',
    naming: {
      files: 'kebab-case',
      components: 'PascalCase',
      functions: 'camelCase',
    },
  },

  // Testing strategy
  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

PatternUsageLocation
StrategyMode-specific agent resolutionkeyword/strategies/
BuilderActivation message constructionkeyword/activation-message.builder.ts
RepositorySession document persistencesession/session.service.ts
FactoryHandler creationmcp/handlers/

Module Dependencies

mcp/ → keyword/ → config/
      ↓          ↓
   session/ → shared/
      ↓
   context/

Code Quality

Test Coverage Goals

MetricTarget
Statement coverage90%+
Branch coverage85%+
Function coverage90%+

Running Quality Checks

# Full test suite with coverage
yarn workspace codingbuddy test --coverage

# Lint check
yarn workspace codingbuddy lint

# Type check
yarn workspace codingbuddy typecheck

# Build
yarn workspace codingbuddy build

Development

# Watch mode
yarn start:dev

Testing

The MCP Inspector is a web-based tool to interactively test your MCP server.

# Build the server first
yarn build

# Run with Inspector
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.

# Build the server
yarn build

# Run the test script
node test/manual-client.js

Publishing

Automated via GitHub Actions on master push.

  • Update Version:

    npm version patch # or minor, major
    
  • 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.

Keywords

ai

FAQs

Package last updated on 12 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts