A browser extension and MCP server that allows you to interact directly with your current browser session. This tool enables capabilities like extracting page content as markdown, modifying page styles, and searching browser history through a Model Context Protocol interface.
To use the browser MCP server, you need to add it to your MCP configuration file:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@djyde/mcp-browser@latest"
]
}
}
}
pnpm i
cd extension
# For Chrome
npm run build
# For Edge
npm run build:edge
# For Firefox
npm run build:firefox
After building, locate the extension in the extension/.output
directory and install it in your browser.
cd server
# Build the server
npm run build
The MCP server entry point will be available at server/dist/cli.js
.
Once installed, the MCP server provides several tools to interact with your browser.
The get_current_page_markdown
tool allows you to extract the content of the current page in markdown format.
Example prompt:
Summarize the current page.
The append_style
tool lets you inject custom CSS into the current page.
Example prompt:
Change the current page to dark mode.
The history_search
tool enables searching through your browser history.
Example prompt:
Search the browser history for "github".
If you want to run the server in development mode:
cd server
npm run dev
This will start the MCP server locally, allowing you to test your interactions with the browser extension.
If you encounter issues with the extension or server:
For advanced usage and more detailed information about the available tools, refer to the source code in server/src/tools.ts
.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.