
VS Code Simple Browser MCP Server
A Model Context Protocol server that enables LLMs to interact with VS Code's Simple Browser, allowing for browser control, JavaScript execution, console monitoring, and navigation through natural language.
README
VS Code Simple Browser MCP Server
A Model Context Protocol (MCP) server that enables LLMs to interact with VS Code's Simple Browser, providing website interaction capabilities and console log monitoring.
Features
Browser Controls
- Open URLs: Launch websites in VS Code's Simple Browser
- Navigation: Navigate between different URLs
- Page Refresh: Reload the current page
- Browser State: Get current URL and browser status
- Close Browser: Close the Simple Browser window
Console Log Monitoring
- Real-time Logging: Capture console messages from web pages
- Log Filtering: Filter logs by level (log, warn, error, info, debug)
- Historical Logs: Retrieve logs with timestamps and source information
- Log Management: Clear console log history
JavaScript Execution
- Code Execution: Execute JavaScript code in the browser context
- Result Handling: Get return values from executed code
- DOM Manipulation: Interact with page elements through JavaScript
Available Tools
Tool | Description | Parameters |
---|---|---|
open_url |
Open a URL in Simple Browser | url (required), title (optional) |
navigate |
Navigate to a different URL | url (required) |
get_current_url |
Get the currently displayed URL | None |
refresh_page |
Refresh the current page | None |
execute_javascript |
Execute JavaScript in browser context | code (required), waitForResult (optional) |
get_console_logs |
Retrieve console logs | level (optional), limit (optional), since (optional) |
clear_console_logs |
Clear stored console logs | None |
get_browser_state |
Get current browser state | None |
close_browser |
Close the Simple Browser | None |
Installation
-
Clone the repository:
git clone https://github.com/YOUR_USERNAME/vscode-simple-browser-mcp.git cd vscode-simple-browser-mcp
-
Install dependencies:
npm install
-
Build the project:
npm run build
Usage
With Claude Desktop
Add the server to your Claude Desktop configuration file:
macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\\Claude\\claude_desktop_config.json
{
"mcpServers": {
"vscode-simple-browser": {
"command": "node",
"args": [
"/path/to/your/vscode-simple-browser-mcp/build/index.js"
]
}
}
}
Standalone
Run the server directly:
npm start
Development
Project Structure
vscode-simple-browser-mcp/
├── src/
│ └── index.ts # Main MCP server implementation
├── build/ # Compiled JavaScript output
├── .vscode/
│ ├── mcp.json # MCP server configuration
│ └── tasks.json # VS Code tasks
├── .github/
│ └── copilot-instructions.md
├── package.json
├── tsconfig.json
└── README.md
Development Commands
npm run build
- Build the TypeScript projectnpm run dev
- Watch mode for developmentnpm start
- Run the compiled server
Adding New Tools
-
Define the tool using the MCP SDK:
server.tool( "tool_name", "Tool description", { parameter: z.string().describe("Parameter description"), }, async ({ parameter }) => { // Tool implementation return { content: [ { type: "text", text: "Tool result", }, ], }; } );
-
Update this README with the new tool information
Example Usage
Opening a Website
Please open https://example.com in the Simple Browser
Executing JavaScript
Execute JavaScript to get the page title: document.title
Monitoring Console Logs
Get the latest console logs from the browser
Getting Browser State
What's the current state of the browser?
Architecture Notes
Current Implementation
This is a foundational implementation that provides:
- Basic browser control through simulated VS Code commands
- In-memory console log storage
- JavaScript execution simulation
Future Enhancements
For a production implementation, consider:
- Direct VS Code Extension API integration
- Real-time webview message passing
- Advanced console log capture mechanisms
- Screenshot capabilities
- Network request monitoring
- Element inspection tools
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes
- Add tests if applicable
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature/your-feature-name
- Submit a pull request
Issues and Bug Reports
If you encounter any issues or bugs, please create an issue on GitHub with:
- A clear description of the problem
- Steps to reproduce the issue
- Your environment details (OS, VS Code version, Node.js version)
- Any relevant error messages or logs
License
ISC License
Support
For issues and questions:
- Check the MCP documentation
- Review VS Code Extension API documentation
- Create an issue in this repository
- Join the MCP community discussions
Roadmap
Future enhancements planned:
- [ ] Real-time console log streaming
- [ ] Network request monitoring
- [ ] Screenshot capture capabilities
- [ ] Advanced DOM inspection tools
- [ ] Performance monitoring integration
- [ ] Multi-tab browser support
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。