Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

如何在Cursor IDE中安装和配置Magic MCP?

2025-08-29 1.4 K

在Cursor IDE中安装Magic MCP需要完成以下几个步骤:

  1. environmental preparation:确保已安装Node.js(推荐v22 LTS版本)和npm
  2. Getting the API key:访问21st.dev官网,登录后在API页面生成TWENTY_FIRST_API_KEY
  3. mounting tool:在终端运行安装命令
    npx -y @smithery/cli@latest run @21st-dev/magic-mcp --config "{"TWENTY_FIRST_API_KEY":"你的API密钥"}"
  4. 配置IDE:在Cursor设置中添加MCP配置
    {
    "mcpServers": {
    "magic": {
    "command": "npx",
    "args": ["-y", "@smithery/cli@latest", "install", "@21st-dev/magic-mcp", "--client", "cursor"],
    "env": {"TWENTY_FIRST_API_KEY": "你的API密钥"}
    }
    }
    }
  5. Verify Installation:在聊天窗口输入/ui,看到提示则表示安装成功

安装完成后,需要重启Cursor使配置生效。如果遇到问题,可以检查Node.js版本是否符合要求,或者到Discord社区寻求帮助。

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish