Trae中使用MCP

返回
Author Avatar
钢翼
2025-05-21
编程
77

首先添加相关的MCP,然后在智能体中添加对应的MCP

context7

用于帮助AI获取开源框架/组件库的最新文档 MCP配置

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}

MySQL Server

用于连接mysql的mcp MCP配置

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "mysql-mcp-server"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "password",
        "MYSQL_DATABASE": "test"
      }
    }
  }
}