返回市场
本地api-mcp-python服务器

本地api-mcp-python服务器

作者:AdsPower5 星标更新:2025-03-31

项目介绍

AdsPower LocalAPI MCP 服务器 Python

这是一个用于 AdsPower 浏览器 LocalAPI 的模型上下文协议服务器。该服务器使大语言模型能够与浏览器进行交互,创建浏览器,更新浏览器指纹配置...

与 Claude Desktop 的使用

通过与大语言模型对话来创建浏览器:使用 Chrome 134 创建一个 Android UA 浏览器

Claude 桌面

与 Cursor 的使用

Cursor

系统需求

  • AdsPower
  • 安装了 Python 3.10 或更高版本。

设置环境,安装 uv

首先,让我们安装 uv 并设置我们的 Python 项目和环境:

MacOS / Linux

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

开发

# 克隆仓库
git clone https://github.com/AdsPower/local-api-mcp-python.git

# 进入目录
cd local-api-mcp-python

# 创建虚拟环境
uv venv
source .venv/bin/activate

# 安装依赖
uv pip install .

要与 Claude Desktop 一起使用,请添加服务器配置:

在 macOS 上:~/Library/Application Support/Claude/claude_desktop_config.json 在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json

# 将服务器添加到你的 claude_desktop_config.json
{
    "mcpServers": {
        "adspower-local-api": {
        "command": "uv",
        "args": [
            "--directory",
            "<替换你的项目路径>/local-api-mcp-python",
            "run",
            "main.py"
        ]
        }
    }
}