Cover image
Try Now
2025-02-24

MCP服务器与Chrome交互

3 years

Works with Finder

1

Github Watches

1

Github Forks

1

Github Stars

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:

# Start the server
mcp run app/main.py --transport sse

and then in another terminal we can start the MCP inspector:

npx @modelcontextprotocol/inspector node build/index.js

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    5 (1)
    Avatar
    user_AoJXYmfc
    2025-04-16

    chrome-mcp-server is a fantastic tool developed by jverre that offers seamless integration for managing Chrome instances through MCP. It has been a game changer in terms of simplicity and efficiency for our team's workflow. The GitHub repository is well-documented and easy to follow, making implementation a breeze. Highly recommended for anyone looking to streamline their browser automation!