Cursor 配置 MCP(Model Context Protocol)

官方说明

MCP - Model Context Protocol
https://modelcontextprotocol.io/introduction
https://docs.cursor.com/context/model-context-protocol
在这里插入图片描述

1、MCP Tool 的集合

https://smithery.ai/

2、一个 demo :Sequential Thinking

我们以 Sequential Thinking 这个 MCP Server 作为 demo 配置一下

2.1、搜索一个 MCP Tool 获取 command 命令

在这里插入图片描述
https://smithery.ai/server/@smithery-ai/server-sequential-thinking
在这里插入图片描述
得到:

npx -y @smithery/cli@latest install @smithery-ai/server-sequential-thinking --client cursor --key d17b0085-f937-4a71-b723-cc2671612b9a

2.2、在 Cursor 配置

Name 是自定义的
Type 选择 command
Command 直接填写上面得到的

npx -y @smithery/cli@latest install @smithery-ai/server-sequential-thinking --client cursor --key d17b0085-f937-4a71-b723-cc2671612b9a

在这里插入图片描述

2.3、配置状态检查与修正(解决网络问题)

检查

配置完毕后,如果前面的点是绿色的,表示正常,否则表示配置没有生效。
在这里插入图片描述

解决办法

npx -y @smithery/cli@latest install @smithery-ai/server-sequential-thinking --client cursor --key d17b0085-f937-4a71-b723-cc2671612b9a

中 @xxx 部分 替换为 github 开源项目中提供的原始命令
在这里插入图片描述
比如下面 https://github.com/smithery-ai/reference-servers/tree/main/src/sequentialthinking
你可以获取的命令就是

npx -y @modelcontextprotocol/server-sequential-thinking

在这里插入图片描述

npx -y @smithery/cli@latest install @smithery-ai/server-sequential-thinking --client cursor --key d17b0085-f937-4a71-b723-cc2671612b9a

=>

npx -y @modelcontextprotocol/server-sequential-thinking --client cursor --key d17b0085-f937-4a71-b723-cc2671612b9a

然后就正常了
在这里插入图片描述

2.4、json 配置格式

部分低版本的 cursor 只支持 json格式的配置,道理是一样的 ,在页面勾选即可
在这里插入图片描述

推荐直接使用 github 的内容
在这里插入图片描述

{
  "mcpServers": {
    "sequential-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ]
    }
  }
}

2.5、使用

  • 比如我再配置一个热点新闻
npx -y @wopal/mcp-server-hotnews --client cursor --key d17b0085-f937-4a71-b723-cc2671612b9a

在这里插入图片描述

  • 然后使用
  • 可以发现,我的指令,直接调用了查询新闻的 MCP tool
    在这里插入图片描述

3、其它 MCP

3.1、前端设计稿 → ​​Figma MCP Server​​

获取 Figma Token 的路径​​
​​登录 Figma 账户​​
访问 [Figma 官网](https://www.figma.com/) 并登录你的账户。
​​进入账号设置​​
点击右上角的个人头像或头像图标。
在下拉菜单中选择 ​​"Settings"(设置)​​。
​​找到开发者选项​​
在左侧菜单栏中,找到并点击 ​​"Account"(账户)​​ 或 ​​"Dev Mode"(开发者模式)​​(根据 Figma 版本可能略有不同)。
向下滚动到 ​​"Personal access tokens"(个人访问令牌)​​ 部分。
​​生成新 Token​​
点击 ​​"Generate new token"(生成新令牌)​​。
输入 Token 的名称(例如 "API Token"),并选择权限范围(如 file:read、team:read 等)。
点击 ​​"Create"(创建)​​。
​​复制并保存 Token​​
生成的 Token 会显示一次(请立即复制保存,关闭后无法再次查看)。
​​⚠️ 重要提示​​:Token 类似密码,请妥善保管,不要泄露。

3.2、GitHub MCP Server

GitHub MCP Server

3.3、magic-mcp Server

magic-mcp Server

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值