buglens-mcp
v1.0.0
Published
MCP server for BugLens — connect AI coding agents to WordPress sites on shared hosting
Maintainers
Readme
BugLens MCP Server
Connect AI coding agents (Claude Code, Cursor, Windsurf, Codex, Gemini) to WordPress sites via the BugLens Bridge API.
15 Tools Available
| Tool | Description |
|------|-------------|
| read_file | Read file contents |
| write_file | Write to existing file |
| create_file | Create new file or directory |
| delete_file | Delete file or empty directory |
| rename_file | Rename/move file |
| list_directory | List directory contents |
| search_files | Grep-like search across files |
| file_info | Get file metadata |
| diff_file | Compare content vs file on disk |
| bulk_read | Read multiple files at once (max 20) |
| directory_tree | Tree view of directory structure |
| wp_cli | Execute WP-CLI commands remotely |
| get_bug_reports | List BugLens bug reports |
| get_bug_report | Get full bug report details |
| update_bug_status | Update bug report status |
Requirements
- Node.js 18+
- BugLens plugin v3.0+ installed and activated on WordPress site
- Bridge API enabled in BugLens settings (WP Admin > BugLens > Settings > Bridge)
- API key generated in BugLens settings
Installation
Step 1: Install dependencies
cd buglens-mcp
npm installStep 2: Get your API key
- Go to WordPress Admin > BugLens > Settings > Bridge tab
- Enable the Bridge API
- Copy or generate an API Key
Step 3: Add to your AI agent
Claude Code (Windows CMD)
set BUGLENS_URL=https://your-site.com
set BUGLENS_KEY=your_api_key_here
claude mcp add buglens -- node C:\path\to\buglens-mcp\bin\buglens-mcp.jsClaude Code (Windows PowerShell)
$env:BUGLENS_URL="https://your-site.com"
$env:BUGLENS_KEY="your_api_key_here"
claude mcp add buglens -- node C:\path\to\buglens-mcp\bin\buglens-mcp.jsClaude Code (macOS / Linux)
BUGLENS_URL=https://your-site.com BUGLENS_KEY=your_api_key_here claude mcp add buglens -- node /path/to/buglens-mcp/bin/buglens-mcp.jsClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"buglens": {
"command": "node",
"args": ["C:\\path\\to\\buglens-mcp\\bin\\buglens-mcp.js"],
"env": {
"BUGLENS_URL": "https://your-site.com",
"BUGLENS_KEY": "your_api_key_here"
}
}
}
}Cursor / Windsurf (.cursor/mcp.json or similar)
{
"mcpServers": {
"buglens": {
"command": "node",
"args": ["/path/to/buglens-mcp/bin/buglens-mcp.js"],
"env": {
"BUGLENS_URL": "https://your-site.com",
"BUGLENS_KEY": "your_api_key_here"
}
}
}
}Verify Connection
After adding the MCP server, ask your AI agent:
"List the WordPress root directory using BugLens"
It should return the directory listing of your WordPress installation.
Security
- All requests require a valid API key (
X-BugLens-Keyheader) - Optional: IP whitelist, time-limited tokens, path restrictions, read-only mode
- Configure security in WP Admin > BugLens > Settings > Bridge
License
GPL-2.0-or-later
