---
url: /ai/whwtrsu1/index.md
description: >-
  常用 MCP（Model Context Protocol）服务器配置记录，包括 context7 文档查询、open-websearch
  搜索、Playwright 自动化等工具。
---
# 自用 MCP 配置

记录一下我自己常用的 MCP (Model Context Protocol) 服务器配置。

## 配置的 MCP 服务器

### 1. context7

查文档神器。

不用再去翻官方文档了，直接问它就行。各种库的最新用法、代码示例都能给出来，还能查 API 详情。

**什么时候用**: 忘记某个库怎么用了，或者想看看某个函数的示例代码。

### 2. open-websearch

搜索工具。

支持 DuckDuckGo、Bing、Brave 这些搜索引擎。我默认用 DuckDuckGo，隐私保护好一些。

**什么时候用**: 需要搜最新的技术文章、解决 bug、或者查某个问题的解决方案。

### 3. mcp-deepwiki

GitHub 仓库文档快速查看。

直接拉取 GitHub 仓库的 README，还能递归获取多个仓库的文档。想快速了解某个开源项目的时候很方便。

**什么时候用**: 看到一个 GitHub 项目想快速了解它是干什么的。

### 4. Playwright

浏览器自动化。

可以控制浏览器访问网页、点击按钮、填表单、截图、执行 JS。基本上你在浏览器里能手动做的事，它都能自动做。

**什么时候用**: 需要自动化测试网页功能，或者批量操作某些网站。

### 5. jetbrains

IDE 集成。

直接在我的 IntelliJ IDEA 里操作，读文件、搜索代码、重构、跑代码都行。

**什么时候用**: 不想离开 IDE，直接在编辑器里让 AI 帮我改代码或者执行任务。

### 6. memory

记忆存储。

给 AI 一个长期记忆，能记住项目信息、重要知识点。用的是知识图谱的方式，可以创建实体、关系和观察。

**什么时候用**: 有些项目信息或者常用的配置，希望 AI 能记住，下次直接用。

### 7. APIFOX 文档

API 文档查询。

读取 Apifox 里的 OpenAPI 规范，能查 API 接口的详细信息。

**什么时候用**: 开发时需要查某个接口的定义、参数、返回值这些。

## 配置文件

```json

{
  "mcpServers": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp@latest"
      ],
      "env": {}
    },
    "open-websearch": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "open-websearch@latest"
      ],
      "env": {
        "MODE": "stdio",
        "DEFAULT_SEARCH_ENGINE": "duckduckgo",
        "ALLOWED_SEARCH_ENGINES": "duckduckgo,bing,brave"
      }
    },
    "mcp-deepwiki": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-deepwiki@latest"
      ],
      "env": {}
    },
    "Playwright": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ],
      "env": {}
    },
    "jetbrains": {
      "type": "sse",
      "url": "http://localhost:64342/sse"
    },
    "memory": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ]
    },
    "APIFOX 文档": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "apifox-mcp-server@latest",
        "--project-id=project_id_here"
      ],
      "env": {
        "APIFOX_ACCESS_TOKEN": "access_token_here"
      }
    }
  }
}

```
