Installation and Development
This guide provides detailed installation, configuration, and development instructions for MCPMonkey. For a quick start, see the Quick Install Guide.
Note: Advanced configuration features and settings interface are planned for future releases but are not currently implemented.
Components Overview
MCPMonkey consists of three main components:
- MCP Server: The server that connects your AI tools to the browser extension
- Firefox Extension: The browser extension that enables interaction with Firefox
- Page Styles Userscript: A userscript that extracts styling information from web pages
Installation Methods
Standard Installation (Recommended)
- Configure Cursor to use the MCPMonkey server
- Install the Firefox Extension using the .xpi file
- Install the Page Styles Userscript
See the Quick Install Guide for step-by-step instructions.
Developer Installation
If you prefer to build the extension yourself rather than using the pre-packaged .xpi file:
- Clone the repository:
git clone https://github.com/kstrikis/mcpmonkey.git
cd mcpmonkey
- Install dependencies:
yarn
- Build the extension:
yarn build
This will create a dist
folder with the extension files.
- Load the extension in Firefox:
- Open Firefox and navigate to
about:debugging
- Click "This Firefox" in the left sidebar
- Click "Load Temporary Add-on..."
- Navigate to the
dist
folder in your MCPMonkey build directory - Select any file from the
dist
folder to load the extension
- Open Firefox and navigate to
Debugging the Extension
After loading the extension as a temporary add-on, you can:
- View Console Logs: Click the "Inspect" button next to the MCPMonkey extension in the about:debugging page to open the browser toolbox. This shows you console logs and errors from the extension.
- Reload the Extension: Click the "Reload" button next to the MCPMonkey extension to refresh it without having to remove and re-add it. This is particularly useful if the WebSocket service has timed out or if you've made changes to the extension code.
Note: As this is a temporary installation, you'll need to reload the extension each time you restart Firefox.
MCP Server Configuration
Cursor Integration (v0.45.7+)
To integrate MCPMonkey with Cursor, you have several options:
Option 1: Use the Published NPM Package (Recommended)
- Open Cursor and go to Settings > Features > MCP Servers (or MCP tab in Cursor 0.46+)
- Add a new MCP server with this configuration:
- Name: MCPMonkey
- Type: command
- Command:
npx mcpmonkey-server
- Save your settings
- Ensure MCPMonkey extension and userscript are installed in Firefox
- Cursor's AI agent will now be able to use MCPMonkey's browser tools
Option 2: Build and Run the Server Yourself
If you prefer to build the server from source:
- Clone and build the server:
git clone https://github.com/kstrikis/mcpmonkey.git
cd mcpmonkey-server
yarn
yarn build
- Configure in Cursor:
- Name: MCPMonkey
- Type: command
- Command:
node /absolute/path/to/mcpmonkey-server/build/index.js
Option 3: Project-Specific Configuration (Cursor 0.46+)
In Cursor 0.46+, MCP settings are in their own tab and there is support for .cursor/mcp.json configuration files.
For project-specific integration, create a .cursor/mcp.json
file in your project root:
Using the NPM package:
{
"mcpServers": {
"mcpmonkey-server": {
"command": "npx",
"args": [
"mcpmonkey-server"
]
}
}
}
Or using a local build:
{
"mcpServers": {
"mcpmonkey-server": {
"command": "node",
"args": [
"/path/to/built/files/build/index.js"
]
}
}
}
Other AI Tools
For other AI tools that support the Model Context Protocol:
- Configure the tool to connect to the MCPMonkey server
- Use stdio transport to connect to the server
- Use
npx mcpmonkey-server
as the command
MCP Tools
MCPMonkey provides the following tools to AI models:
browserAction Tool
This tool provides tab management capabilities:
getTabs
: Retrieve information about all open tabscreateTab
: Open a new tab with a specified URLcloseTabs
: Close one or more tabs by IDactivateTab
: Switch to a specific tabduplicateTab
: Clone an existing tab
getPageStyles Tool
This tool extracts styling information from web pages:
- Returns structured JSON data about global styles and computed styles
- Provides color schemes and typography information
- Helps AI understand web page design
Technical Architecture
MCPMonkey's architecture consists of:
1. MCP Server
- Communicates with AI tools using stdio transport
- Provides MCP tools (browserAction, getPageStyles)
- Runs as a Node.js process
2. Browser Extension
- Firefox extension that interacts with your browser
- Communicates with the MCP server via internal WebSocket connection
- Provides the actual browser functionality
3. Page Styles Userscript
- Runs in the context of web pages
- Extracts styling information when requested
- Communicates with the extension via messaging
The internal communication between these components happens over WebSocket on port 3025, but this is not exposed as a connection method for external clients.