# BC Code Intelligence MCP Server

[![Install with NPX in VS Code](https://img.shields.io/badge/Install%20with%20NPX-VS%20Code-blue?style=for-the-badge&logo=visual-studio-code)](https://vscode.dev/redirect/mcp/install?name=bc-code-intel&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22bc-code-intelligence-mcp%22%5D%7D)
[![Installation Guide](https://img.shields.io/badge/Installation%20Guide-All%20Platforms-green?style=for-the-badge&logo=github)](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Installation-Guide)

**Get instant help from AI Business Central experts** right in your favorite AI tool. No more searching docs - just ask and get expert guidance tailored to your specific BC development challenges.

---

## 🚀 Quick Start

1. **Click the blue "Install with NPX" button above** (VS Code users)
2. **Switch to Agent Mode** in VS Code's Copilot Chat
3. **Just ask!** - Start with any prompt below

> **Other platforms?** See the [Installation Guide](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Installation-Guide) for Claude Desktop, Cursor, and more.

---

## 🤝 New to AI-Assisted Development? Start with Parker

If you're not sure how to work with AI tools, or you're skeptical about letting AI touch your code—**that's exactly why Parker exists**.

Parker is a grizzled veteran who helps you work WITH AI safely:
- Creates **reviewable proposals** instead of making direct changes
- **Explains AI reasoning** so you understand what's happening and why
- **Coordinates other specialists** to validate suggestions before you commit
- Builds trust **gradually** through transparency and verification

**Just say:**
- "Parker, I'm new to AI development tools. Help me understand how this works."
- "Parker, I don't trust AI to write my code. What's a safe way to start?"
- "Parker, review what the AI just suggested before I accept it."

Once you're comfortable, you can work directly with any specialist—but Parker's always there when you want that extra layer of verification and explanation.

---

## 💬 Just Ask - Example Prompts

The BC Code Intelligence specialists are ready to help. Just type naturally - here are some examples:

### 🔍 Debugging & Performance (Dean)
- "Dean, help me debug this error: 'The record in table Customer already exists'"
- "I'm seeing slow performance when posting sales orders. Can Dean take a look?"
- "Ask Dean why my FlowField is always showing zero"

### 🏛️ Legacy Code & Upgrades (Logan)
- "Logan, I need to upgrade my extension from BC v24 to v27"
- "I inherited this old extension - can Logan help me understand what it does?"
- "Help me modernize this C/AL-style code to proper AL patterns"

### 🏗️ Architecture & Design (Alex)
- "Alex, review my extension's architecture before I submit to AppSource"
- "I need to design an integration with an external warehouse system"
- "What's the best way to structure a multi-company solution?"

### 💻 Coding & Implementation (Sam)
- "Sam, help me write a function to calculate weighted average cost"
- "I need to create a FactBox that shows related sales history"
- "Show me the best way to implement a posting routine"

### 🧪 Testing & Quality (Quinn)
- "Quinn, help me create test coverage for my posting codeunit"
- "What test scenarios should I include for this validation?"
- "Review my test codeunit for completeness"

### 📝 Code Review (Roger)
- "Roger, review this codeunit for best practices"
- "Check if my code follows BC naming conventions"
- "Are there any code smells in my Customer Card extension?"

### 🔒 Security (Seth)
- "Seth, review my permission sets for security issues"
- "How should I handle user permissions for this sensitive data?"
- "Check if my API is exposing too much information"

### 🌉 Integration & Events (Jordan)
- "Jordan, help me design an event-driven integration"
- "What's the best way to subscribe to posting events?"
- "How do I create a clean API for external systems?"

### ⚠️ Error Handling (Eva)
- "Eva, help me implement proper error handling for this process"
- "What's the best way to validate user input before posting?"
- "Review my Try/Catch implementation"

### 🎨 User Experience (Uma)
- "Uma, help me improve my page layout for better usability"
- "Can we switch from simple Error calls in this app to ErrorInfo with suggested actions?"
- "Review my action menu structure"

### 🏪 AppSource & ISV (Morgan)
- "Morgan, help me prepare my app for AppSource submission"
- "What are the common AppSource validation failures?"
- "Review my app's technical baseline for AppSource"

### 👩‍🏫 Learning & Mentoring (Maya)
- "Maya, explain how dimensions work in BC"
- "I'm new to AL - help me understand events and subscribers"
- "Walk me through how posting routines work"

### 📚 Documentation (Taylor)
- "Taylor, help me document this complex codeunit"
- "Generate XML documentation for my public procedures"
- "Review my app's README for completeness"

### 🤖 AI-Assisted Development (Casey)
- "Casey, help me use AI tools effectively in my BC development"
- "Based on this current project, what are some good instructions to help future agents understand working with this app immediately?"

---

## 👥 Meet Your BC Specialist Team

| Specialist | Expertise | Best For |
|------------|-----------|----------|
| **🤝 Parker** | AI Trust & Transparency | New to AI tools, safe collaboration, verification-first |
| **🏗️ Alex** | Architecture & Design | Solution design, extension structure, integration patterns |
| **💻 Sam** | Expert Coder | Writing AL code, implementation patterns, coding questions |
| **🔍 Dean** | Debugging & Performance | Errors, slow queries, troubleshooting |
| **⚠️ Eva** | Error Handling | Validation, Try/Catch, error messages |
| **🧪 Quinn** | Testing | Test codeunits, test scenarios, code coverage |
| **📝 Roger** | Code Review | Best practices, naming conventions, code quality |
| **🔒 Seth** | Security | Permissions, data protection, API security |
| **🌉 Jordan** | Integration | APIs, events, external connections |
| **🏛️ Logan** | Legacy & Upgrades | Version migrations, old code, modernization |
| **🎨 Uma** | User Experience | Page design, usability, UI patterns |
| **🏪 Morgan** | AppSource & ISV | Publishing, validation, business concerns |
| **👩‍🏫 Maya** | Mentoring | Learning concepts, explanations, training |
| **📚 Taylor** | Documentation | Code docs, READMEs, knowledge sharing |
| **🤖 Casey** | AI Development | Using AI tools, prompt engineering |
| **⚙️ Chris** | MCP Configuiration | Company/Project MCP knowledge layer help|

---

## 📚 Learn More

| Topic | Link |
|-------|------|
| **Full Installation Options** | [Installation Guide](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Installation-Guide) |
| **Common Scenarios** | [Usage Patterns](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Common-Scenarios) |
| **All MCP Tools** | [Tools Reference](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/MCP-Tools-Reference) |
| **Company Standards** | [Enterprise Configuration](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Enterprise-Configuration) |
| **Structured Workflows** | [Methodology Framework](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Methodology-Framework) |
| **Troubleshooting** | [Common Issues](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Troubleshooting) |

---

## 💡 Tips

- **Just use first names** - "Ask Dean" works just as well as "Ask Dean Debug"
- **Be specific** - Include error messages, code snippets, or version numbers when relevant
- **Specialists collaborate** - They'll hand off to each other when needed
- **Context carries over** - Continue conversations naturally

---

## 🤝 Contributing

See the [Contributing Guide](https://github.com/JeremyVyska/bc-code-intelligence-mcp/wiki/Contributing-Guide) for how to contribute to this project.

## 📄 License

MIT License - see [LICENSE](LICENSE) for details.
