Chrome MCP Server

by jverre

4 stars
270 downloads
Not rated
GitHub

About

Chrome MCP Server is an implementation of the Model Context Protocol (MCP) designed to interact with Chrome. It was built as a learning exercise to understand the MCP protocol and to provide a server that can be used in Cursor to take screenshots of a page and validate…

Details

Author
jverre
GitHub stars
4
Downloads
270
Categories
Other

- Provides an MCP implementation independent of Anthropic’s library.
- Supports taking screenshots of a webpage.
- Allows validation of implementation in Cursor.
- Includes a demo implementation with initialization over SSE and POST endpoints.
- Offers a more robust implementation using the MCP Python SDK.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Chrome MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

For the demo implementation, run uv run uvicorn demo_implementation.main:app --reload and connect via the MCP inspector at http://0.0.0.0:8000. For the robust implementation (which uses the MCP Python SDK), start the server with mcp run app/main.py --transport sse and then use the MCP inspector.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "chrome mcp server": {
            "chrome-mcp-server": {
                "command": "uv",
                "args": [
                    "run",
                    "uvicorn",
                    "demo_implementation.main:app",
                    "--reload"
                ]
            }
        }
    }
}

McpServers

{
    "chrome-mcp-server": {
        "command": "uv",
        "args": [
            "run",
            "uvicorn",
            "demo_implementation.main:app",
            "--reload"
        ]
    }
}

Chrome MCP Server

We are building a server that will be used to interact with Chrome. There are two main goals to this project:

1. Providing an MCP implementation that does not rely on the MCP library provided by Anthropic.
2. Creating a Chrome MCP server that we can use in Cursor to take screenshots of a page and validate the implementation.

> [!NOTE]
> This is not a reference implementation of the MCP protocol, this was a learning exercise to better understand the protocol and how it works.

A more robust implementation is located in the app folder.

Demo implementation

This is a simple implementation of the MCP protocol, as such we
have not implemented all the features of the MCP protocol. We focused on building a first set of features that we can use to
get a functioning implementation.

It can be run by executing the following command:

uv run uvicorn demo_implementation.main:app --reload

and then tested by running the MCP inspector:

npx @modelcontextprotocol/inspector node build/index.js

Once in the inspector, you can connect to our server using the URL: http://0.0.0.0:8000

How it works

There are two main components to the demo implementation:

1. An event stream that is used to send messages from the server to the client.
2. A POST endpoint that is used to send messages from the client to the server.

The implementation focuses on implementing the initialization process and tools. We did not look at implementatinf other features.
The initialization process is done in three parts with:

1. Initial call to the /sse endpoint to get the session URI.
2. Client sends a initialize message to the server that responds with the functionality supported by the server.
3. Client sends a notifications/initialized message to the server to notify that the initialization is complete.

Once this is implemented, the client can start sending messages to the server to use the tools.

Limitations of the demo implementation

The demo implementation has a number of limitations including lack of error handling, no adequate cleanup of the sessions and more.
We added more robust implementation in app/main.py that relies on the MCP Python SDK.

Robust implementation

The more robust implementation relies on the MCP Python SDK to handle the connection and the messages.

This implementation is located in app/main.py.

How it works

This is much simpler as all we need to do is define the three functions to be used as tools. Once these are defined, we can test
the implementation by running the app/main.py file:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.