> For the complete documentation index, see [llms.txt](https://pharaoh.so/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pharaoh.so/docs/connect/vscode.md).

# VS Code

Add Pharaoh as a remote MCP server in VS Code with .vscode/mcp.json. Sign in with GitHub so Copilot Chat can query your repository's map.

Before you connect, [install the GitHub App](/docs/connect/github-app.md) and wait for a live repository to finish mapping on the [setup page](https://mcp.pharaoh.so/setup).

Add a remote HTTP MCP server in `.vscode/mcp.json`:

```json
{
  "servers": {
    "Pharaoh": {
      "type": "http",
      "url": "https://mcp.pharaoh.so/mcp"
    }
  }
}
```

VS Code's format uses a top-level `servers` object, not the `mcpServers` object other clients use. The file holds only the server URL, so you can commit it to share the setup: each teammate signs in with their own GitHub account. To use Pharaoh in every workspace, add the same entry to your user-level MCP configuration instead.

Complete GitHub sign-in when prompted, then ask your agent to use Pharaoh to show a codebase map for a live repository. VS Code may first ask you to trust the server; review the URL before you accept.

## Verify the connection

1. Run **MCP: List Servers** from the Command Palette and check that Pharaoh is running.
2. In Copilot Chat, open **Configure Tools** and confirm Pharaoh's tools are enabled.
3. Ask: “Use Pharaoh's get\_codebase\_map for owner/repo and show the last refreshed time.”

On the setup page, **Connect your AI client** shows the time of the last question.

## Common errors

* **Pharaoh is stopped or shows an error**: restart it from **MCP: List Servers** and open its output to read the start-up or sign-in error. Check that the JSON is valid and uses `servers`.
* **“is not tracked by Pharaoh”**: the GitHub App can't read that repository. Grant it access in [GitHub's installed-app settings](https://github.com/settings/installations), or for an organization's repository in that organization's settings under GitHub Apps, then refresh setup.
* **“isn't in your access list”**: Pharaoh maps the repository, but your GitHub account can't reach it. Ask an owner for access on GitHub.
* **A repository that isn't live**: on the free plan, the answer names the live repository and offers a switch. See [account and billing](/docs/use-pharaoh/pricing.md).

[Setup status](https://mcp.pharaoh.so/setup) · [Connection checks](/docs/use-pharaoh/troubleshooting.md)
