配置MCP

先安装MCP-Router

导入以下配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
  "mcpServers": {
    "ddg-search": {
      "command": "uvx",
      "args": [
        "duckduckgo-mcp-server"
      ],
      "env": {}
    },
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ],
      "env": {
        "CONTEXT7_API_KEY": "555"
      }
    },
    "mcp-deepwiki": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-deepwiki@latest"
      ],
      "env": {}
    },
    "sequential-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ],
      "env": {}
    },
    "serena": {
      "displayName": "Serena Coding Agent",
      "command": "serena",
      "args": [
        "start-mcp-server",
        "--context",
        "ide-assistant",
        "--project",
        "."
      ]
    }
  }
}

针对Serena

1.全局安装 Serena

你需要用 包名 serena-agent 来安装,但安装完后命令行工具叫 serena

1
uv tool install --from git+https://github.com/oraios/serena serena-agent

安装成功后,全局会有一个可执行命令:

1
serena --help

升级:uv tool upgrade serena-agent,卸载:uv tool uninstall serena-agent

所以对于上述配置文件中,serena的commod是serena。

对应的为项目建立索引的命令为:serena project index