# Cursor | 用户指南 | Shotomatic

> 把 Shotomatic 作为本地 MCP 服务器添加到 Cursor，确认它能正常工作，并解决常见的设置问题。

- 类型: 公开网页
- 规范页面: [https://www.shotomatic.com/zh-cn/guide/ai-agents/clients/cursor](https://www.shotomatic.com/zh-cn/guide/ai-agents/clients/cursor)
- Markdown 页面: [https://www.shotomatic.com/zh-cn/guide/ai-agents/clients/cursor.md](https://www.shotomatic.com/zh-cn/guide/ai-agents/clients/cursor.md)

浏览用户指南

本页内容

1.  [开始之前](#开始之前)
2.  [将 Shotomatic 添加到 Cursor](#将-shotomatic-添加到-cursor)
3.  [批准一次](#批准一次)
4.  [确认能正常工作](#确认能正常工作)
5.  [看不到工具时](#看不到工具时)

Cursor 可以通过 Shotomatic 的本地 MCP 服务器使用 Shotomatic。以下步骤依据 Cursor 自己的文档（[Model Context Protocol in Cursor](https://cursor.com/docs/context/mcp)）；Shotomatic 已用 Claude Code 和 Codex 测试，没有在 Cursor 上测试过。如果菜单或文件与实际不符，请查看 Cursor 的文档。

## 开始之前

-   在 Shotomatic 中打开**设置 > AI 智能体**，开启**允许 AI 智能体使用 Shotomatic**。
-   安装 Node 18.3 或更高版本。客户端会用 `npx` 启动一个名为 `shotomatic` 的小型桥接包，不需要 API 密钥。
-   在 Mac 上授予**屏幕录制**权限，需要按键时还要授予**辅助功能**权限。请参阅 [macOS 权限](https://www.shotomatic.com/zh-cn/guide/get-started/macos-permissions)。

## 将 Shotomatic 添加到 Cursor

要对所有项目生效，把下面的内容添加到 `~/.cursor/mcp.json`；只对某个项目生效，则添加到该项目内的 `.cursor/mcp.json`：

```json
{
  "mcpServers": {
    "shotomatic": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "shotomatic", "mcp"]
    }
  }
}
```

Cursor 默认会在使用 MCP 工具前请求批准。

如果 Windows 上的客户端无法启动 `npx`，请把命令设为 `cmd`，参数设为 `/c`、`npx`、`-y`、`shotomatic`、`mcp`。

## 批准一次

Cursor 首次连接时，Shotomatic 会以客户端报告的名称显示批准卡片。选择**允许**即可。批准之前，智能体只能读取 Shotomatic 的状态。请参阅[批准与确认](https://www.shotomatic.com/zh-cn/guide/ai-agents/approvals-and-confirmations)。

## 确认能正常工作

在 **Customize** 中确认服务器已启用。然后这样请求：

> “检查 Shotomatic 的状态，并告诉我你能用它做什么。”

设置正确时，智能体会回复 Shotomatic 版本、Mac 上是否已授予**屏幕录制**和**辅助功能**权限、你的版本以及今天还能使用的免费截图数、网页浏览器是否已安装，以及正在运行的截图任务。

Cursor 的文档提到支持 MCP 工具结果中的图片，因此智能体能看到它请求的预览和画面。

## 看不到工具时

-   **服务器显示错误。** Cursor 会在 **Output**（`Cmd + Shift + U`，Windows 上为 `Ctrl + Shift + U`）的 **MCP Logs** 下显示启动错误。
-   **“MCP access is turned off.”** 在**设置 > AI 智能体**中开启**允许 AI 智能体使用 Shotomatic**，然后重启客户端。
-   **没有出现批准卡片。** 打开 Shotomatic 查看卡片；在 Mac 上，卡片出现时 Dock 图标会跳动。
-   **客户端找不到 `npx` 或 Node。** 请参阅[所有客户端的问题排查列表](https://www.shotomatic.com/zh-cn/guide/ai-agents/other-agents#%E9%97%AE%E9%A2%98%E6%8E%92%E6%9F%A5)。

接下来可以试试[智能体能做什么](https://www.shotomatic.com/zh-cn/guide/ai-agents/what-agents-can-do)中的请求，或在[工具参考](https://www.shotomatic.com/zh-cn/guide/ai-agents/tools)中查看所有工具。

## 本页内容

1.  [开始之前](#开始之前)
2.  [将 Shotomatic 添加到 Cursor](#将-shotomatic-添加到-cursor)
3.  [批准一次](#批准一次)
4.  [确认能正常工作](#确认能正常工作)
5.  [看不到工具时](#看不到工具时)

## 关于此版本

此 Markdown 页面根据 Shotomatic 服务端渲染的公开页面生成，不包含交互控件和网站导航。引用或分享时，请使用规范页面。
