# Connect Mochi to GitHub Copilot

Use your Mochi data from Copilot Chat in VS Code. New to Mochi MCP? Start with the [overview](https://themochi.app/docs/integrations-and-tracking/mcp).

**Server URL:** `https://mcp.themochi.app/mcp`

## What you need

- **VS Code 1.99 or later** with GitHub Copilot.
- On **Copilot Business or Enterprise**, your organization must have the **MCP servers in Copilot** policy switched on. If it's off, ask your GitHub admin.

## Add Mochi from VS Code (easiest)

1. Open the Command Palette and run **MCP: Add Server**.
2. Choose **HTTP (HTTP or Server-Sent Events)**.
3. Enter `https://mcp.themochi.app/mcp`.
4. Name it `mochi`.
5. Choose to install it globally, so it works in every project, and accept the trust prompt.

## Or add it to a config file

To add it to one project only, create `.vscode/mcp.json` in the project:

```json
{
  "servers": {
    "mochi": {
      "type": "http",
      "url": "https://mcp.themochi.app/mcp"
    }
  }
}
```

To add it for every project, run **MCP: Open User Configuration** and add the same entry there.

Newer VS Code versions also read `~/.copilot/mcp-config.json`, or `.mcp.json` at the root of a project. Those files use a top-level `"mcpServers"` key instead of `"servers"`.

## Sign in and use it

1. In the MCP server list, or in the editor above the entry, click **Start** next to **mochi**.
2. A browser window opens the first time. Sign in to Mochi, **pick your workspace** and approve.
3. Open Copilot Chat and choose **Agent**. Click the tools icon to check that Mochi's tools are listed.
4. Ask something like "Which of my leads went quiet this week?".

## Troubleshooting

| Problem | Fix |
| --- | --- |
| Mochi's tools don't show up in chat | Make sure you're in **Agent** mode and the server is started. |
| "MCP is disabled by your organization" | Your Copilot Business or Enterprise admin needs to switch on the MCP servers policy. |
| You need to sign in again or switch workspace | Run **Authentication: Remove Dynamic Authentication Providers**, then start the server again. |

Checked against Microsoft's and GitHub's documentation on 26 November 2026: [VS Code MCP servers](https://code.visualstudio.com/docs/copilot/customization/mcp-servers), [MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration) and [extending Copilot Chat with MCP](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/extend-copilot-chat-with-mcp). The two vendors describe Agent mode and the recommended config file slightly differently. Both setups above work.
