🔌 MCP Integration: GitHub Copilot & Claude Desktop
What is MCP Integration?
MCP (Model Context Protocol) is an open protocol that allows AI assistants like GitHub Copilot or Claude Desktop to connect to external knowledge sources.
With MCP integration, you can:
- ✅ Use Alex directly in VS Code (via GitHub Copilot)
- ✅ Use Alex directly in Claude Desktop
- ✅ Access Business Central AL knowledge without leaving your editor
- ✅ Compare Business Central versions (BC 26 vs 27, etc.)
Instead of switching between VS Code and the Alex web interface, you ask your questions directly in your code editor or in Claude Desktop. Alex responds instantly with accurate information about Business Central AL.
Compatible Assistants
GitHub Copilot (VS Code)
GitHub Copilot is the AI assistant integrated into Visual Studio Code. With MCP integration:
- Open Copilot Chat in VS Code
- Use Alex tools:
#mcp_alex_alex_al_queryor#mcp_alex_alex_al_comparison - Ask your questions about Business Central AL
- Alex responds directly in the chat
Example:
Use #mcp_alex_alex_al_query to ask: How do I create a table extension in AL?
Claude Desktop
Claude Desktop is Claude AI's desktop application. With MCP integration:
- Open Claude Desktop
- Authorize Alex tools (see "Usage" section below)
- Ask your questions normally in the conversation
- Claude automatically uses Alex to answer Business Central questions
Example:
Explain the differences in table Customer between BC versions 26 and 27
Installation
Prerequisites
- Node.js 18 or higher installed on your computer
- An active Alex account with available credits
- GitHub Copilot (VS Code) or Claude Desktop installed
Automatic Installation (Recommended)
Windows (PowerShell)
-
Clone the repository (https://github.com/pmoisontech/Alex-MCP-Proxy) or download the code:
git clone https://github.com/pmoisontech/Alex-MCP-Proxy.git
cd Alex-MCP-Proxy/mcp-server-proxy -
Run the installer:
.\install-mcp.ps1 -
Follow the instructions:
- Enter the Alex backend URL (default:
https://alex.app.pmats.ai/api) - Enter your Alex username
- Enter your Alex password
- Choose VS Code and/or Claude Desktop
- Enter the Alex backend URL (default:
-
Restart your assistant:
- VS Code: Close and relaunch VS Code completely
- Claude Desktop: Close all windows and relaunch Claude
Linux / macOS / WSL
-
Clone the repository (https://github.com/pmoisontech/Alex-MCP-Proxy) or download the code:
git clone https://github.com/pmoisontech/Alex-MCP-Proxy.git
cd Alex-MCP-Proxy/mcp-server-proxy -
Run the installer:
./install-mcp.sh -
Follow the instructions:
- Enter the Alex backend URL (default:
https://alex.app.pmats.ai/api) - Enter your Alex username
- Enter your Alex password
- Choose VS Code and/or Claude Desktop
- Enter the Alex backend URL (default:
-
Restart your assistant:
- VS Code: Close and relaunch VS Code completely
- Claude Desktop: Close all windows and relaunch Claude
The installer will automatically create an API key for your Alex account. This key is valid for 3 months by default and allows the MCP proxy to authenticate with Alex.
Manual Installation
If you prefer to configure manually, consult the MCP Proxy README for detailed instructions.
Usage
With GitHub Copilot (VS Code)
- Open VS Code and start an AL project
- Open Copilot Chat (chat icon in the sidebar)
- Use Alex tools:
For general AL questions:
Use #mcp_alex_alex_al_query to ask: How does the Customer table work in Business Central?
To compare versions:
Use #mcp_alex_alex_al_comparison to ask: What changed in table Sales Header between BC 26 and BC 27?
Type #mcp to see all available MCP tools. Select #mcp_alex_alex_al_query or #mcp_alex_alex_al_comparison from the list.
With Claude Desktop
- Open Claude Desktop
- Open Settings → All connectors
- Find "alex" with 2 tools (alex_al_query, alex_al_comparison)
- Authorize the tools:
- Click on the "Blocked" dropdown
- Select "Always allow"
- Both tools should display ✅ (authorized)
- Ask your questions normally in the conversation
Claude will automatically detect when to use Alex to answer Business Central questions.
Example questions:
- "How do I create a table extension in AL?"
- "Show me an example of a codeunit that posts a sales order"
- "What's new in the Sales Order page in BC 27?"
- "Compare the Item table between versions 26 and 27"
Available Tools
alex_al_query
✅ Default tool for all Business Central AL questions (except version comparisons).
Uses:
- Information about AL syntax, objects, patterns
- AL code troubleshooting
- Business Central best practices
- Code examples for specific features
- Structure of tables, pages, codeunits
Examples:
- "How do I create a table extension in AL?"
- "What's the syntax for posting a sales order in AL?"
- "Show me examples of using RecordRef in Business Central"
- "How to implement OnValidate trigger in AL?"
alex_al_comparison
⚠️ Use ONLY to compare Business Central versions (BC 26 vs 27, etc.).
Uses:
- Compare AL code between two BC versions
- Identify breaking changes
- Discover new features in a version
- Track deprecated or obsolete AL objects
- Analyze API changes between versions
Examples:
- "What changed in the Sales Header table between BC 26 and BC 27?"
- "Compare the Item table between version 25 and 26"
- "Show me breaking changes in Codeunit 80 from BC 24 to BC 25"
- "What's new in the Sales Invoice page between version 26 and 27?"
Supported versions: BC 14 to 28 and later. Format:
- Major version: "BC 26" (uses latest available minor version)
- Full version: "BC 26.5" or "BC 26.5.0.0"
Updating the Proxy
If the MCP proxy has been updated (new features, bug fixes):
-
Update the code:
cd Alex-MCP-Proxy/mcp-server-proxy
git pull origin main
npm install -
Restart your assistant:
- VS Code: Close and relaunch completely
- Claude Desktop: Close all windows and relaunch
For major updates with configuration changes, run the installer again (./install-mcp.sh or .\install-mcp.ps1). Your existing settings (API key, etc.) will be preserved.
Troubleshooting
Alex doesn't appear in GitHub Copilot
Solutions:
- Check that the
mcp.jsonfile is in the correct location:- Windows:
%APPDATA%\Code\User\mcp.json - Linux/macOS:
~/.config/Code/User/mcp.json
- Windows:
- Verify the path to
mcp-proxy-client.jsis absolute (not relative) - Completely restart VS Code
- Check that your API key is correct in the file
Alex doesn't appear in Claude Desktop
Solutions:
- Check the configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux/macOS:
~/.config/Claude/claude_desktop_config.json
- Windows:
- Close all windows of Claude Desktop and relaunch
- Check the connectors icon at the bottom right of Claude
- Consult the logs:
%APPDATA%\Claude\logs\(Windows)
Tools blocked in Claude Desktop
Alex tools appear but are marked "Blocked" (🚫):
Solution:
- Open Settings → All connectors
- Find "alex" in the list
- Click on the "Blocked" dropdown
- Select "Always allow"
- Tools should now display ✅
"401 Unauthorized" error
Your API key is invalid or expired.
Solution:
- Log in to the Alex web interface
- Go to Settings → API Keys
- Create a new API key
- Replace the key in your configuration file (
ALEX_API_KEYvariable)
Alex doesn't respond
Solutions:
- Check your internet connection
- Verify the backend URL is
https://alex.app.pmats.ai/api - Verify you have available credits on your Alex account
- Wait a few seconds (the first response may take a moment)
Security and Privacy
- Your API key is personal and confidential - never share it
- The connection to Alex backend uses HTTPS (encrypted)
- Your questions and code are not stored permanently
- Each user has an isolated account
NEVER share your API key. If you think it has been compromised, revoke it immediately in your settings and create a new one.
Support
If you encounter a problem not covered in this documentation:
- Verify Node.js is installed (
node --versionshould display ≥18) - Verify your configuration files are valid JSON
- Try the automatic installer if you configured manually
- Consult GitHub issues
- Contact support with a precise description of the error
Learn More
- MCP Proxy README - Complete technical documentation
- Model Context Protocol - Official MCP protocol documentation
- GitHub Copilot - Learn more about GitHub Copilot
- MCP Servers in VS Code - MCP servers documentation for GitHub Copilot
- Claude Desktop - Download Claude Desktop