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

# Connect Claude Code or Cursor to Forge over MCP

> Give Claude Code or Cursor Forge's lint, generate, skills and shapes as MCP tools, check the server answers, and add the hosted connector for telemetry.

By the end of this guide, Claude Code or Cursor will list Forge's tools next to its own: lint, generate, the skill catalog, and `shapes`, which says where every RPC, table and handler is with its file and line. Use this when your agent works in an editor rather than a Reliant chat.

`forge agent mcp` runs the same commands in process and answers over stdio, so a tool call and the CLI give the same result. In a Reliant chat you need none of this: the agent's shell already has `reliant forge`, signed in. [Why this helps an agent](https://docs.reliantlabs.io/hosting/observability/agents.md) covers the wider design.

## Before you begin

* Claude Code or Cursor.
* Node 18 or later for `npx -y @reliantlabs/forge agent mcp`, which downloads the matching Forge binary the first time it runs. If you have Reliant installed, `reliant forge agent mcp` is the same server and needs no download.
* For telemetry tools, a Reliant account with a deployed project (see the last step).

**1. Add the server to Claude Code**

From your repo:

```bash terminal theme={null}
claude mcp add forge -- npx -y @reliantlabs/forge agent mcp
```

With Reliant installed, `claude mcp add forge -- reliant forge agent mcp` does the same with the Forge Reliant ships. The server acts on the directory it starts in, and every tool except `explain_error` also takes a `dir` argument, so the agent can point it at another repo.

**2. Or add it to Cursor**

Put this in `.cursor/mcp.json` for one project, or `~/.cursor/mcp.json` for all of them:

```json .cursor/mcp.json theme={null}
{
  "mcpServers": {
    "forge": {"command": "npx", "args": ["-y", "@reliantlabs/forge", "mcp"]}
  }
}
```

**3. Check the server answers**

In Claude Code, `/mcp` lists the server and its tools. To see exactly what an editor receives, send the MCP handshake yourself. This is the result of an `initialize` then `tools/list` over stdio to `npx -y @reliantlabs/forge agent mcp`:

```text Output (trimmed) theme={null}
server: {'name': 'forge', 'title': 'Reliant Forge', 'version': 'v1.8.0'} protocol: 2025-06-18
annotations        ro=True   The entity-authoring vocabulary: the // forge:* markers in proto, SQL and Go ...
audit              ro=True   What THIS project currently is, as JSON: forge version pin, services, rpcs ...
benefits           ro=True   What forge does for the repo at dir, as JSON ...
capabilities       ro=True   Everything forge can do, in one call: every command, every lint analyzer ...
deploy_claimable   ro=False  Put this app live on Reliant with no account: returns a public URL and a claim link ...
deploy_status      ro=True   The claimable deploy this machine made of an env: its URL, claim link, state ...
explain_error      ro=True   Turn a forge failure into what it means and the exact command to run next ...
generate           ro=False  Run forge generate: re-project the generated code ...
libraries          ro=True   forge's runtime libraries (forge/pkg for Go, @reliantlabs/forge-web-runtime ...
lint               ro=False  Run forge lint --quiet: only what failed, then the verdict as the last line ...
report_bug         ro=False  Report a defect in forge itself to the Reliant engineering team ...
schema             ro=True   A JSON Schema forge publishes ...
shapes             ro=True   Where every symbol is: each rpc, message, enum, table, store, handler and hook ...
skill_list         ro=True   The skill catalog (forge-shipped, project and user skills) ...
skill_load         ro=True   Print one skill, authoritative for the forge version running ...
skill_search       ro=True   Find skills by keyword ...
```

`ro=False` marks the tools that change something, so your editor asks before calling them. The server's instructions tell the model what Forge is and to load the `forge` skill first (`adopt` in a repo that is not a Forge project yet). `reliant forge agent mcp` on Reliant v1.21.3 returned the same 16 tools.

**4. Ask it something**

Ask the agent where the task API lives. It calls `shapes` with `grep: "Task"`, which returned this on a Go API project:

```text Output (trimmed) theme={null}
rpc      TaskService.CreateTask    proto/services/task/v1/task.proto:22               in=CreateTaskRequest out=CreateTaskResponse
handler  TaskService.CreateTask    internal/handlers/task/handlers_crud.go:59
message  Task                      proto/services/task/v1/task.proto:53
table    tasks                     db/migrations/20261120060443_create_tasks.up.sql:5
store    TaskStore                 internal/db/task_store_gen.go:17                   go doc ./internal/db TaskStore
```

Every line ends in a file and line, so the agent's next step is one targeted read instead of a search. Outside a Forge project, `benefits` is the first call: it says what Forge does for that repo as it stands.

**5. Add the hosted connector for telemetry**

The local server has no telemetry tools. Errors, logs, traces and release checks for your deployed environments come from the hosted Reliant Forge connector (`obs_status`, `obs_issues`, `obs_issue`, `obs_logs`, `obs_traces`, `obs_check` and more), and it needs you signed in:

```bash terminal theme={null}
claude mcp add --transport http reliant-forge https://api.reliantapi.com/forge/mcp
```

In Claude Code, run `/mcp`, pick `reliant-forge` and choose *Authenticate*. In Cursor, add `"reliant-forge": {"url": "https://api.reliantapi.com/forge/mcp"}` under `mcpServers` and click *Needs login*. Before sign-in the endpoint answers `401` and points the client at its OAuth metadata. [Debug production with an AI agent](https://docs.reliantlabs.io/guides/observability/debug-production-with-ai-agent.md) uses both servers together.

## What this does not do

* **No monitoring without signing in.** The hosted connector works only for a signed-in person, and only on the organization and projects you grant it. There is no anonymous path to your telemetry.
* **No telemetry from the local server.** It works on the repo: skills, introspection, lint, generate. Use both servers if you want both.
* **`deploy_claimable` is for no account.** It puts a Vite or Next.js app live with a claim link, and is refused while you are signed in. Signed-in deploys are `reliant forge env deploy` ([Deploy a static site with a CDN](https://docs.reliantlabs.io/guides/forge/deploy-static-site-cdn.md)).

## Troubleshooting

> [accordion] ⚠️ this forge is v1.8.0, but forge.yaml pins forge\_version ... — a different forge than the project's.
>
> The server does not hand off to the Forge your project pins. It reports the skew at the top of the result and still answers. To match the pin, point the server at the command the warning prints, such as `go run github.com/reliant-labs/forge/cmd/forge@<pinned version> mcp`.

> [accordion] A 403 that names a consent URL (hosted connector)
>
> You signed in but have not chosen what the connector may read. Open the URL, pick the organization and projects, and retry.

## Next steps

> [card] [Debug production with an AI agent](https://docs.reliantlabs.io/guides/observability/debug-production-with-ai-agent.md)
>
> Follow one failing request from the error to the line, with the hosted tools.

> [card] [Adopt an existing Vite or Next.js app](https://docs.reliantlabs.io/guides/forge/adopt-existing-vite-nextjs.md)
>
> Make your app a Forge project in place, with browser logs on disk.

> [card] [Why this helps an agent](https://docs.reliantlabs.io/hosting/observability/agents.md)
>
> Exit codes, skills from the binary, and `shapes`.

> [card] [MCP servers in Reliant](https://docs.reliantlabs.io/settings/mcp-servers.md)
>
> Add any MCP server to Reliant's own agents.


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