1- # Codingbuddy Rules MCP Server
1+ # Codingbuddy MCP Server
22
3- A NestJS-based Model Context Protocol (MCP) server that exposes the Multi-AI Rules System (` .ai-rules/ ` ) to AI clients.
3+ A NestJS-based Model Context Protocol (MCP) server that provides AI coding assistants with project-specific context and rules.
4+
5+ ## Quick Start
6+
7+ ``` bash
8+ # Initialize project configuration (AI-powered)
9+ npx codingbuddy init
10+
11+ # This analyzes your project and creates codingbuddy.config.js
12+ ```
413
514## Features
615
7- - ** Resources** : Access rule files directly (` rules://core ` , ` rules://agents/frontend-developer ` , etc.)
8- - ** Tools** : Search rules (` search_rules ` ) and get agent profiles (` get_agent_details ` ).
9- - ** Prompts** : Activate agents with context (` activate_agent ` ).
16+ ### CLI Commands
17+
18+ | Command | Description |
19+ | ---------| -------------|
20+ | ` codingbuddy init ` | Analyze project and generate configuration |
21+ | ` codingbuddy --help ` | Show help |
22+ | ` codingbuddy --version ` | Show version |
23+
24+ ### MCP Resources
25+
26+ | Resource | Description |
27+ | ----------| -------------|
28+ | ` config://project ` | Project configuration (tech stack, architecture, language) |
29+ | ` rules://rules/core.md ` | Core workflow rules |
30+ | ` rules://rules/project.md ` | Project setup rules |
31+ | ` rules://agents/{name}.json ` | Specialist agent definitions |
32+
33+ ### MCP Tools
34+
35+ | Tool | Description |
36+ | ------| -------------|
37+ | ` get_project_config ` | Get project configuration settings |
38+ | ` search_rules ` | Search through rules and guidelines |
39+ | ` get_agent_details ` | Get detailed profile of a specialist agent |
40+ | ` parse_mode ` | Parse PLAN/ACT/EVAL workflow mode (includes language setting) |
41+
42+ ### MCP Prompts
43+
44+ | Prompt | Description |
45+ | --------| -------------|
46+ | ` activate_agent ` | Activate a specialist agent with project context |
1047
1148## Prerequisites
1249
@@ -26,12 +63,14 @@ Add the following configuration to your Claude Desktop config:
2663 "mcpServers" : {
2764 "codingbuddy-rules" : {
2865 "command" : " npx" ,
29- "args" : [" codingbuddy" ]
66+ "args" : [" codingbuddy-mcp " ]
3067 }
3168 }
3269}
3370```
3471
72+ > ** Note** : Use ` codingbuddy-mcp ` for the MCP server. The ` codingbuddy ` command is for CLI operations like ` init ` .
73+
3574### Option 2: Global Installation
3675
3776``` bash
@@ -63,7 +102,7 @@ yarn build
63102 "mcpServers" : {
64103 "codingbuddy-rules" : {
65104 "command" : " node" ,
66- "args" : [" /ABSOLUTE/PATH/TO/codingbuddy/mcp-server/dist/main.js" ]
105+ "args" : [" /ABSOLUTE/PATH/TO/codingbuddy/mcp-server/dist/src/ main.js" ]
67106 }
68107 }
69108}
@@ -100,6 +139,91 @@ The server will start in SSE mode, exposing:
100139| ` MCP_TRANSPORT ` | Transport mode (` stdio ` or ` sse ` ) | ` stdio ` |
101140| ` PORT ` | HTTP port for SSE mode | ` 3000 ` |
102141| ` CODINGBUDDY_RULES_DIR ` | Custom path to ` .ai-rules ` directory | Auto-detected |
142+ | ` CODINGBUDDY_PROJECT_ROOT ` | Project root for config loading | Current directory |
143+ | ` ANTHROPIC_API_KEY ` | API key for ` codingbuddy init ` | Required for init |
144+
145+ ## Project Configuration
146+
147+ ### Initialize Configuration
148+
149+ ``` bash
150+ # Basic usage (requires ANTHROPIC_API_KEY env var)
151+ npx codingbuddy init
152+
153+ # With options
154+ npx codingbuddy init --format json # Output as JSON instead of JS
155+ npx codingbuddy init --force # Overwrite existing config
156+ npx codingbuddy init /path/to/project # Specify project path
157+ npx codingbuddy init --api-key sk-... # Pass API key directly
158+ ```
159+
160+ ### Configuration File
161+
162+ The ` codingbuddy init ` command creates a ` codingbuddy.config.js ` file:
163+
164+ ``` javascript
165+ module .exports = {
166+ // Response language (ko, en, ja, etc.)
167+ language: ' ko' ,
168+
169+ // Project metadata
170+ projectName: ' my-awesome-app' ,
171+ description: ' A modern web application' ,
172+
173+ // Technology stack
174+ techStack: {
175+ languages: [' TypeScript' ],
176+ frontend: [' React' , ' Next.js' , ' Tailwind CSS' ],
177+ backend: [' Node.js' , ' Prisma' ],
178+ database: [' PostgreSQL' ],
179+ tools: [' ESLint' , ' Prettier' , ' Vitest' ],
180+ },
181+
182+ // Architecture pattern
183+ architecture: {
184+ pattern: ' feature-sliced-design' ,
185+ structure: [' app' , ' widgets' , ' features' , ' entities' , ' shared' ],
186+ },
187+
188+ // Coding conventions
189+ conventions: {
190+ style: ' airbnb' ,
191+ naming: {
192+ files: ' kebab-case' ,
193+ components: ' PascalCase' ,
194+ functions: ' camelCase' ,
195+ },
196+ },
197+
198+ // Testing strategy
199+ testStrategy: {
200+ approach: ' tdd' ,
201+ frameworks: [' Vitest' , ' Playwright' ],
202+ coverage: 80 ,
203+ },
204+ };
205+ ```
206+
207+ ### File Structure
208+
209+ ```
210+ my-project/
211+ ├── codingbuddy.config.js # Main configuration
212+ ├── .codingignore # Files to ignore (gitignore syntax)
213+ └── .codingbuddy/ # Additional context (optional)
214+ └── context/
215+ ├── architecture.md # Architecture documentation
216+ └── api-guide.md # API usage guide
217+ ```
218+
219+ ### How AI Uses Configuration
220+
221+ When you use an AI assistant with this MCP server:
222+
223+ 1 . ** Language** : AI responds in your configured language
224+ 2 . ** Tech Stack** : AI provides code examples using your frameworks
225+ 3 . ** Architecture** : AI suggests structures following your patterns
226+ 4 . ** Conventions** : AI follows your naming and style rules
103227
104228## Development
105229
@@ -119,7 +243,7 @@ The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is a web-
119243yarn build
120244
121245# Run with Inspector
122- npx @modelcontextprotocol/inspector node dist/main.js
246+ npx @modelcontextprotocol/inspector node dist/src/ main.js
123247```
124248
125249### 2. Manual Test Script
0 commit comments