# Claude Code

> Claude Code connects to the ZopNight MCP server with one `claude mcp add` command. The `-t http` flag is required: without it Claude Code treats the URL as a command to run rather than a server to call. Reads work immediately; writes stay disabled until an org admin enables them.

Source: https://zop.dev/integrations/mcp-server/clients/claude-code
Updated: 2026-08-20

---

## Common questions

### How do I add the ZopNight MCP server to Claude Code?

One command registers it: claude mcp add zopnight MCP_SERVER_URL -t http -H "Authorization: Bearer MCP_PAT". Take MCP_SERVER_URL from your Organisation Settings page and paste the zn_pat_ token in plainly, with no angle brackets.

### Why is Claude Code trying to run the URL as a command?

The -t http flag is missing. It selects Streamable HTTP, which is the only transport the server speaks, and leaving it out is the most common setup failure here. It also fails confusingly, because Claude Code falls back to executing the URL locally.

### How do I confirm the server registered?

Run claude mcp list, then ask for a cost overview. That is the entry point the whole tool set is built around.

## One claude mcp add command, with -t http

One terminal command registers the server. The `-t http` flag selects Streamable HTTP transport. Without it, Claude Code treats the URL as a command to run rather than a server to call.

## The command line, with your PAT inline

```bash
claude mcp add zopnight MCP_SERVER_URL -t http -H "Authorization: Bearer MCP_PAT"
```

Use the Server URL from your Organisation Settings page as `MCP_SERVER_URL`; the token (`zn_pat_…`) goes in plainly, no angle brackets.

## The flag people miss

`-t http` selects Streamable HTTP. It is the only transport the server speaks: there is no
stdio and no SSE variant. Omitting the flag is the single most common setup failure, and it
fails confusingly, because Claude Code tries to execute the URL as a local command.

Verify with `claude mcp list`, then ask for a cost overview.

## What Claude Code can ask for read-only

At the default org setting, read-only, 85 of the 119 tools work immediately. That covers
cost totals by team or tag, spend trends, budget health, detected anomalies, the full resource
inventory, recommendations with their savings, Kubernetes logs and events, and deploy history.

Ask for a cost overview first; it is the entry point the tool set is designed around.

## Raising the write tier for Claude Code

Mutating tools sit behind an org-level dial with four positions, each cumulative:

| Tier | What it unlocks |
|---|---|
| Read-only | nothing mutating (**the default**) |
| Metadata | budgets, recommendation status, smart-tag decisions |
| Reversible | schedules, overrides, tagging policies, deploys and rollbacks |
| Irreversible | start/stop, provisioning, Kubernetes writes, deletes |

Your own RBAC still applies on top: the tier is a ceiling, not a bypass. Roles, user management,
credentials and cloud-account deletion are never reachable at any tier.

## MCP off for the org, or the wrong transport

Two causes account for almost every case. Either MCP is not enabled for the organisation, or the transport is
wrong. MCP is off by default, and an admin turns it on in Organisation Settings. Every mutating call is audit-logged with its source, so MCP activity stays
distinguishable from UI and API activity afterwards.
