Skip to Content

在 Cursor 中连接 CompShare MCP

Cursor 支持通过 Streamable HTTP 连接远程 MCP,并为需要认证的服务完成 OAuth 登录。

让 Cursor 自动配置

把下面这段话粘贴给 Cursor Agent:

Read https://www.compshare.cn/docs/mcp-guide/cursor and add CompShare MCP to my global Cursor MCP configuration. When browser OAuth is required, pause and ask me to complete it. Then verify the connection and explain what CompShare MCP can do.

Cursor Agent 可以写入配置;浏览器中的登录和授权仍需由你本人完成。

手动配置

全局使用时,编辑 ~/.cursor/mcp.json;只在当前项目使用时,编辑项目内的 .cursor/mcp.json:

{ "mcpServers": { "compshare": { "url": "https://mcp.compshare.cn/mcp" } } }

保存后打开 Cursor 的 MCP 管理页,找到 compshare 并完成认证。浏览器打开后,登录 CompShare 并确认授权,再返回 Cursor。

如果使用 Cursor Agent CLI,也可以在配置完成后执行:

cursor-agent mcp login compshare

验证连接

向 Cursor Agent 发送:

检查我的 CompShare MCP 登录状态,然后列出当前 GPU 实例;不要执行任何写操作。

连接成功后,Cursor 可以看到 compshare_auth_status、compshare_read 和 compshare_execute 三个工具。

整个过程不需要在聊天或 mcp.json 中填写 CompShare Token。不要在 mcp.json 中添加 CompShare MCP 服务端使用的 OAuth client_id/client_secret。

Last updated on