> ## Documentation Index
> Fetch the complete documentation index at: https://glasser.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# VS Code

> 将 Glasser 连接到 VS Code 中的 GitHub Copilot Chat。

打开 VS Code，确认 GitHub Copilot Chat 可用且已登录。

**1. 添加服务器**

在 macOS 上按 **Cmd+Shift+P**，在 Windows 或 Linux 上按 **Ctrl+Shift+P**，打开命令面板。运行 **MCP: Add Server**，选择 HTTP 服务器，然后输入：

```text theme={null}
https://api.glasser.ai/mcp
```

命名为 `glasser`。选择 **Copilot Global** 可跨项目使用，或选择 `.mcp.json` 将配置保存在当前工作区。旧版本可能提供保存到用户配置文件的选项。

**2. 启动 Glasser 并登录**

在命令面板运行 **MCP: List Servers**，选择 `glasser` 并启动。查看服务器信任提示，然后按提示在浏览器中登录。

登录 Glasser，选择工作空间，然后点击 **Allow**。如有需要，先创建账号和工作空间。

**3. 在对话中启用工具**

以 Agent 模式打开 Copilot Chat。在输入框中通过 **Configure Tools** 确认 Glasser 工具已启用。

**4. 检查连接**

在新对话中发送：

```text wrap theme={null}
Suggest one small task I can try with Glasser. Check my available balance and mention any first-run reward returned. Explain what the task will do, then wait for me to choose it before a paid Run.
```

Agent 应调用 Glasser 的 `balance` 工具并返回余额。此检查免费；余额为零也表示连接正常。如需执行付费 Run，请在 [Glasser 控制台](https://app.glasser.ai?locale=zh-CN)充值。

Agent 应推荐一个小任务，并说明余额响应中返回的奖励。奖励金额和截止时间取决于账号；如果响应未返回奖励，Agent 只报告余额。详见[首次任务与奖励](https://glasser.ai/docs/zh/mcp-server.md#first-task-and-rewards)。

## 尝试首次请求

```text wrap theme={null}
Use Glasser to find recent news about Stripe. Show me the data you can retrieve and the price, then wait for my approval before any paid Run.
```

批准后，Agent 即可获取数据，并报告结果和费用。

服务器设置和故障排查见 [VS Code MCP 文档](https://code.visualstudio.com/docs/agent-customization/mcp-servers)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.