Codemie VS Code Extension
A powerful VS Code extension that integrates with Codemie AI assistants, plugins, and MCP (Model Context Protocol) servers to enhance your development workflow.
Features
- 🤖 AI Assistant Integration: Chat with specialized AI assistants through VS Code Chat
- 🔌 Plugin System: Execute codemie-plugins commands directly from VS Code
- 🔗 MCP Server Management: Automatically configure MCP servers from your config
- 🔐 Secure Authentication: Password and client credentials authentication
- 💬 Native Chat Integration: Full integration with VS Code's native chat interface
Initial Setup Process
To work with assistants, you need to complete the authentication setup:
- Request password from support - Contact support to get your password
- Configure authentication:
- Add your email to VS Code settings (
codemie-ext.auth.username
)
- Press
Ctrl+Shift+P
→ "Codemie: Setup Password Credentials"
- Enter your password in the input field that appears at the top of the screen
- Restart VS Code window
The extension supports two authentication methods:
- Password Authentication (recommended for individual users)
{
"codemie-ext.auth.authType": "password",
"codemie-ext.auth.username": "your-email@epam.com"
}
- Client Credentials (for service accounts)
{
"codemie-ext.auth.authType": "client_credentials",
"codemie-ext.auth.clientId": "your-client-id"
}
Automatic Token Management
The extension automatically handles all token operations:
- Automatic refresh: Tokens are refreshed before expiration
- Seamless experience: No manual token management required
- Secure storage: All credentials stored in VS Code's secure storage
- Error handling: Automatic retry with fresh tokens on authentication errors
Getting Started
🤖 Start Using AI Assistants
After authentication setup, open VS Code Chat and start chatting:
@codemie /assistant @dev-helper How can I optimize this React component?
Commands Available
VS Code Commands (Command Palette)
Codemie: Setup Password Credentials
- Purpose: Configure username/password authentication
- Usage: Ctrl+Shift+P → "Codemie: Setup Password Credentials"
- Description: Securely stores your password for automatic authentication
Codemie: Setup Client Credentials
- Purpose: Configure client credentials authentication
- Usage: Ctrl+Shift+P → "Codemie: Setup Client Credentials"
- Description: Securely stores your client secret for automatic authentication
Chat Commands (VS Code Chat)
@codemie /assistant
@codemie /run_plugin
@codemie /plugins_help
@codemie /add_mcp_servers
- Purpose: Add MCP servers from config to VS Code
- Syntax:
@codemie /add_mcp_servers
- Description: Reads your codemie config and adds all MCP servers to VS Code Chat
Configuration
Basic Settings
{
"codemie-ext.serverUrl": "https://codemie.lab.epam.com/code-assistant-api/",
"codemie-ext.auth.authType": "password",
"codemie-ext.auth.keycloakUrl": "https://keycloak.eks-core.aws.main.edp.projects.epam.com/auth",
"codemie-ext.auth.realmName": "codemie-prod",
"codemie-ext.auth.username": "your-email@epam.com",
"codemie-ext.auth.clientId": "codemie-sdk"
}
Plugin Configuration
{
"codemie-ext.plugin_activation_cmd": "development",
"codemie-ext.plugins_config_path": "~/.codemie/config.json"
}
MCP Servers Configuration (~/.codemie/config.json
)
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]
},
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your-api-key"
}
}
}
}
Usage Examples
Working with AI Assistants
# Code review
@codemie /assistant @code-reviewer Please review this function for potential issues
# Architecture advice
@codemie /assistant @architect How should I structure a microservices project?
# Development help
@codemie /assistant @dev-helper Explain this error message and how to fix it
Running Plugins
# Run default plugin command
@codemie /run_plugin
# Run specific plugin
@codemie /run_plugin help
# Run plugin with subcommand
@codemie /run_plugin code run
Managing MCP Servers
# Get help on available plugins
@codemie /plugins_help
# Add all MCP servers from config
@codemie /add_mcp_servers
Troubleshooting
Authentication Issues
Error message:
❌ Username is not configured in settings. Please configure codemie-ext.auth.username in your VS Code settings first.
Solution:
- Add your email address to VS Code settings
- Go to Settings → Extensions → Codemie Extension
- Set
codemie-ext.auth.username
to your email address
🔑 Invalid Credentials
Error messages:
❌ Authentication failed even after credentials setup. Please check your credentials.
❌ Error: Token request failed: Invalid user credentials
Solution:
- Incorrect password entered
- Check your password or re-enter it using:
- Press
Ctrl+Shift+P
→ "Codemie: Setup Password Credentials"
- Enter the correct password provided by support
🌐 Server Configuration Error
Error message:
Error: Server returned status 400: Unknown error
Solution:
- Incorrect realm configuration
- The realm doesn't match the server host
- Contact support to verify your account realm settings
Plugin Issues
- Plugin not found: Check your
plugins_config_path
setting
- Command failed: Verify the plugin command exists in your config
- Permission issues: Ensure codemie-plugins is properly installed
MCP Server Issues
- Servers not added: Check your config file path and format
- Command failed: Verify VS Code CLI is available in PATH
- Server not working: Check server command and arguments in config
Step-by-Step Troubleshooting
Verify username is set:
- Check VS Code settings for
codemie-ext.auth.username
- Ensure it matches your registered email address
Re-configure credentials:
- Use
Ctrl+Shift+P
→ "Codemie: Setup Password Credentials"
- Enter password carefully (no spaces, correct case)
Restart VS Code:
- Close and reopen VS Code completely
- Don't just reload the window
Test authentication:
- Try using any assistant command
- Check if authentication works properly