vscode-mcp-comprehensive
v1.0.3
Published
Comprehensive MCP server exposing all VSCode features to AI agents with 101 tools including advanced debugging and console access
Maintainers
Readme
VSCode MCP Server
A comprehensive Model Context Protocol (MCP) server that exposes all VSCode features and settings to AI agents. This extension provides 80+ tools covering every aspect of VSCode functionality, including advanced debugging tools with console access and developer tools integration.
🚀 Features
Complete VSCode API Coverage
- Workspace Management: File operations, configuration, folder management
- Editor Operations: Text manipulation, selections, formatting, folding
- Language Features: IntelliSense, diagnostics, code actions, symbol navigation
- UI Controls: Messages, dialogs, status bar, progress indicators
- Terminal Integration: Terminal creation, command execution, output capture
- Advanced Debugging: Breakpoints, call stacks, variables, console access
- Developer Tools: Browser console, network monitoring, performance profiling
- Task Management: Task execution, monitoring, termination
- Extension Management: Extension information, configuration, status
🐛 Advanced Debugging Features
- Debug Session Control: Start, stop, pause, continue, step debugging
- Breakpoint Management: Regular, conditional, and logpoint breakpoints
- Variable Inspection: Local, global, and watch expressions
- Call Stack Analysis: Frame navigation and inspection
- Console Access: Debug console, output panels, browser console
- Developer Tools Integration: Network requests, performance metrics, memory snapshots
- Exception Handling: Exception breakpoints and error information
📊 80+ Available Tools
Workspace Tools (12 tools)
workspace_get_folders- Get all workspace foldersworkspace_read_file- Read file contentsworkspace_write_file- Write content to fileworkspace_delete_file- Delete filesworkspace_get_configuration- Get settingsworkspace_update_configuration- Update settings- And more...
Editor Tools (14 tools)
editor_get_active- Get active editoreditor_get_text- Get editor contenteditor_set_text- Replace editor contenteditor_insert_text- Insert text at positioneditor_format_document- Format code- And more...
Language Tools (9 tools)
language_get_completions- Get IntelliSense completionslanguage_get_hover- Get hover informationlanguage_get_definition- Go to definitionlanguage_get_diagnostics- Get errors/warningslanguage_get_code_actions- Get available fixes- And more...
Debug Tools (25+ tools)
debug_start_session- Start debuggingdebug_add_breakpoint- Add breakpointsdebug_console_read- Read debug consoledebug_get_call_stack- Get call stackdebug_evaluate_expression- Evaluate expressionsdevtools_console_read- Read browser consoledevtools_network_get_requests- Monitor network- And more...
UI Tools (12 tools)
ui_show_information_message- Show notificationsui_show_input_box- Show input dialogsui_create_status_bar_item- Create status itemsui_show_progress- Show progress indicators- And more...
Terminal Tools (8 tools)
terminal_create- Create terminalsterminal_send_text- Send commandsterminal_execute_command- Execute and wait- And more...
📦 Installation
From VSCode Marketplace (Coming Soon)
- Open VSCode
- Go to Extensions (Ctrl+Shift+X)
- Search for "VSCode MCP Server"
- Click Install
From Source
- Clone this repository
- Run
npm install - Run
npm run compile - Press F5 to run in development mode
🛠️ Configuration
Configure the extension in your VSCode settings:
{
"vscode-mcp-server.port": 3000,
"vscode-mcp-server.autoStart": true,
"vscode-mcp-server.enableDebugTools": true,
"vscode-mcp-server.enableDeveloperTools": true
}Configuration Options
port: Port for the MCP server (default: 3000)autoStart: Automatically start server on VSCode startup (default: true)enableDebugTools: Enable advanced debugging tools (default: true)enableDeveloperTools: Enable developer tools integration (default: true)
🚀 Usage
Starting the Server
The server starts automatically by default. You can also control it manually:
- Command Palette:
VSCode MCP Server: Start - Command Palette:
VSCode MCP Server: Stop - Command Palette:
VSCode MCP Server: Restart - Command Palette:
VSCode MCP Server: Status
Using with AI Agents
Once running, AI agents can connect to the MCP server and use any of the 80+ available tools:
// Example: Reading a file
const result = await mcpClient.callTool('workspace_read_file', {
uri: 'file:///path/to/file.ts'
});
// Example: Getting completions
const completions = await mcpClient.callTool('language_get_completions', {
uri: 'file:///path/to/file.ts',
position: { line: 10, character: 5 }
});
// Example: Starting debug session
const debugSession = await mcpClient.callTool('debug_start_session', {
configuration: {
type: 'node',
request: 'launch',
program: '${workspaceFolder}/app.js'
}
});
// Example: Reading debug console
const consoleOutput = await mcpClient.callTool('debug_console_read', {
lines: 50
});🧪 Testing
Run the comprehensive test suite:
npm testThe test suite includes:
- Unit tests for all tool categories
- Integration tests with VSCode APIs
- Error handling validation
- Configuration testing
📚 API Documentation
Tool Categories
- Workspace Tools: File system operations, configuration management
- Editor Tools: Text editing, selection management, formatting
- Language Tools: IntelliSense, diagnostics, code navigation
- UI Tools: User interface interactions, notifications, dialogs
- Terminal Tools: Terminal management and command execution
- Debug Tools: Comprehensive debugging with console access
- Command Tools: VSCode command execution and registration
- Task Tools: Task management and execution
- Extension Tools: Extension information and management
Error Handling
All tools return standardized responses:
// Success response
{
content: [{ type: 'text', text: 'Result data or message' }]
}
// Error response
{
content: [{ type: 'text', text: 'Error: Description of the error' }],
isError: true
}🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🔗 Links
🎯 Roadmap
- [ ] WebView integration tools
- [ ] Git/SCM operation tools
- [ ] Notebook API integration
- [ ] Custom language server tools
- [ ] Performance optimization
- [ ] Real-time collaboration features
Made with ❤️ for the AI development community
