常用MCP记录

MCP 广场

MCP 基本用法

josn 复制代码
{
  "mcpServers": {
    "xxxxx": {}
  }
}

MCP 配置也区分全局配置和局部项目配置,以 kiro 为例,将项目特有的MCP 配置在文件 .kiro/setting/mcp.json 中。

使用记录

chrome-devtools 调试网页

json 复制代码
{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "chrome-devtools-mcp@latest"
      ],
      "disabled": false,
      "autoApprove": [
        "take_screenshot",
        "navigate_page",
        "evaluate_script",
        "click",
        "take_snapshot",
        "list_pages",
        "wait_for",
        "list_console_messages",
        "new_page",
        "get_console_message",
        "select_page",
        "press_key",
        "fill"
      ]
    },
  }
}

mastergo 读取UI设计

josn 复制代码
{
  "mcpServers": {
    "mastergo-magic-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mastergo/magic-mcp",
        "--token=<MG_MCP_TOKEN>",
        "--url=https://mastergo.com"
      ],
      "env": {
        "MG_MCP_TOKEN": "mg_2b021b165bf34464aa4eb6ade9c9524f"
      },
      "disabled": false
    },
  }
}
josn 复制代码
{
  "mcpServers": {
    "lark_open_doc_search": {
      "command": "npx",
      "args": [
        "-y",
        "@larksuiteoapi/lark-mcp",
        "recall-developer-documents"
      ]
    },
  }
}

fetch 网页内容抓取

这个需要先安装 python 环境 和 uvx

josn 复制代码
{
  "mcpServers": {
    "fetch": {
      "command": "uvx",
      "args": [
        "mcp-server-fetch"
      ],
      "env": {},
      "disabled": false,
      "autoApprove": []
    },
  }
}

apifox-mcp-server 读取接口json

通过 MCP 使用 OpenAPI/Swagger 文档 - Apifox 帮助文档

josn 复制代码
{
  "mcpServers": {
    "API 文档": {
      "command": "npx",
      "args": [
        "-y",
        "apifox-mcp-server@latest",
        "--oas=https://test-xxxx.xxx.com/xxx/docs/api.json"
      ]
    },
  }
}

因为这个MCP是指定了接口文档地址,因此需要给每个前端项目单独配置。

swagger-mcp 读取接口json

因为这个MCP是指定了接口文档地址,因此需要给每个前端项目单独配置。因为使用了 npm 包,所以可以采用两种方式配置,一种是安装 npm 包,一种是不安装。

  1. 安装 npm 依赖包 先全局安装 npm i -g swagger-mcp
josn 复制代码
{
  "mcpServers": {
    "API 文档": {
      "command": "swagger-mcp",
      "args": [
        "--specUrl=https://test-xxxx.xxx.com/xxx/docs/api.json"
      ],
      "autoApprove": [
        "get_endpoint_details",
        "fetch_swagger_info",
        "list_endpoints",
        "execute_api_request",
        "validate_api_response"
      ]
    },
  }
}
  1. 不想安装依赖可以使用npx
josn 复制代码
{
  "mcpServers": {
    "API 文档": {
      "command": "npx",
      "disabled": false,
      "args": [
        "-y",
        "swagger-mcp@latest",
        "--specUrl=https://test-xxxx.xxx.com/xxx/docs/api.json"
      ],
      "autoApprove": [
        "get_endpoint_details",
        "fetch_swagger_info",
        "list_endpoints",
        "execute_api_request",
        "validate_api_response"
      ]
    },
  }
}
相关推荐
吃糖的小孩1 小时前
从只读页面到可控真实探针:我如何给 Owner Console 加手动诊断
前端
谷无姜1 小时前
为什么你的性能优化无效?可能是"木桶效应"在作祟
前端·性能优化
雾非雾1 小时前
《基于具身交互智能数字人技术:如何打造AI数字人宣讲平台"红厅智播”》
前端
Revolution612 小时前
一段 JavaScript 代码执行时,到底发生了什么
前端·javascript
智能起源2 小时前
关于元素层级过多,导致压祯的问题(使用winform或者WPF应用的webview组件嵌套网页时,动效卡顿问题)
前端
Old Uncle Tom2 小时前
银行用户画像 -- 金融目标与需求意图
前端·人工智能·金融
IT_陈寒2 小时前
Vue的响应式让我加班到凌晨3点,原来问题出在这
前端·人工智能·后端
东方小月2 小时前
从0开发一个 Coding Agent(一):前言
前端·人工智能·typescript
恋猫de小郭2 小时前
Flutter 全新真 3D 实现,用 flutter_scene 能开发一个「我的世界」
android·前端·flutter