Skip to main content Skip to content

MCP server

Connect Cursor, Claude, VS Code, or any MCP client to ZopNight. Ask about cost, resources, schedules and recommendations in plain language.

15 min read

The ZopNight MCP server lets an AI assistant read your organisation’s data directly. Ask Claude “which EC2 instances sat idle last week and what would stopping them save?” and it queries your live resources, costs, and recommendations instead of guessing.

It speaks the Model Context Protocol over Streamable HTTP. The clients below each have their own setup steps; any other MCP-capable client connects the same way, using the Other tab.

Settings Organization tab with the MCP Server section switched on and badged Active, showing the server URL with a copy button, a Write access dropdown set to Reversible changes, and a Setup guide link, above the organisation's member list

Settings → Organization: the MCP toggle, the server URL to paste into your client, and the write-access level that bounds what an assistant may change.

Before you start

You need:

  • A ZopNight user account in the organisation. The assistant acts with your role, so it sees only what you can see in the app.
  • Permission to update the organisation, or a colleague who has it, to switch the MCP server on and to raise Write access above Read-only.
  • An MCP client that speaks Streamable HTTP, such as Cursor, Claude Code, Claude, VS Code, or Codex (each has a tab below). For the OAuth option, the client must be able to open a browser. For CI and headless servers, use a Personal Access Token instead.

Then:

  1. Enable MCP for the organisation

    Open Settings → Organization, find the MCP Server section, and switch the toggle on. The badge changes from Inactive to Active and the server URL appears. Only a user with permission to update the organisation sees the toggle.

  2. Copy your server URL

    Your server URL is https://api.zop.dev/mcp-server. It’s the same for every organisation. Auth negotiates the org, so you don’t need to look it up in the app.

The same MCP server serves both products; in ZopDay the equivalent settings are at Settings → Organisation (MCP Server section) and Developer Settings (user menu) → API Tokens / Connected Apps.

Choose how to sign in

You have two ways to authenticate. Pick one: every client below supports both, except the Claude desktop app, which connects with OAuth only.

There is nothing to configure up front. Point your client at https://api.zop.dev/mcp-server and let it prompt on the first tool call. A browser tab opens to ZopNight, you approve the connection once, and the client stores refreshable tokens itself.

Option 2: Personal Access Token

Settings → API & MCP, API Tokens tab: the Personal Access Tokens table listing each token's name, zn_pat_ prefix, organisation, expiry date (one marked Expired), creation date, and last use, with per-row actions and a Create Token button

Settings → API & MCP → API Tokens: every personal access token with its prefix, organisation, expiry, and last use, and Create Token to mint a new one.

  1. Open API & MCP settings

    Open Settings → API & MCP and stay on the API Tokens tab.

  2. Create the token

    Click Create Token, name it after the client that will use it (“Cursor” or “Claude Code”), choose an expiry, and confirm.

  3. Copy it

    Copy the token when it is created, straight into your secret manager, never into a committed file. Afterwards the list shows only its prefix. The blocks below call it MCP_PAT.

A token acts as you, limited to the organisations and write capabilities you choose when you create it. Every call also resolves your live role at the moment it is made, so it can never do more than you can in the app. Give each token only the organisations and write capabilities its client needs.

Set up your client

Find your client below and follow the steps for it. Each card covers OAuth (the recommended one-click sign-in) and, where the client supports it, a Personal Access Token (for CI, servers, and clients that can’t open a browser; the Claude desktop app is OAuth only). Pick the tab that matches how you want to authenticate.

Client

Configure your MCP client to connect to your workspace.

Install in one click:

Add to Cursor

Or set it up manually:

  1. Open the MCP servers panel

    In Cursor, open Customize → MCPs → New MCP server. Cursor opens ~/.cursor/mcp.json for editing.

  2. Paste the config

    Pick OAuth (recommended) or a Personal Access Token; the tabs below toggle the config.

    OAuth (recommended)
    {
    "mcpServers": {
    "zopdev": {
    "url": "https://api.zop.dev/mcp-server",
    "transport": "streamable-http"
    }
    }
    }
    Personal Access Token
    {
    "mcpServers": {
    "zopdev": {
    "url": "https://api.zop.dev/mcp-server",
    "transport": "streamable-http",
    "headers": { "Authorization": "Bearer MCP_PAT" }
    }
    }
    }

    For PAT, swap MCP_PAT for the token you copied at Settings → API & MCP → API Tokens.

  3. Save and enable

    Save the file. Back on the MCPs panel, click the newly added zopdev entry and turn the User (~/.cursor/mcp.json) toggle on.

  4. Reload and authenticate

    Click Reload on the zopdev entry. OAuth opens a browser window to sign in; approve to finish. PAT users skip this: the token authenticates every call. The tools appear inside Cursor on the next call.

  1. Add the server

    Inside a Claude Code session, pick OAuth (recommended) or a Personal Access Token; the tabs below toggle the command. The -t http flag is required, otherwise Claude records the URL as a program to execute.

    OAuth (recommended)
    claude mcp add zopdev https://api.zop.dev/mcp-server -t http
    Personal Access Token
    claude mcp add zopdev https://api.zop.dev/mcp-server -t http -H "Authorization: Bearer MCP_PAT"

    For PAT, swap MCP_PAT for the token you copied at Settings → API & MCP → API Tokens.

  2. Restart Claude

    Quit Claude Code and start a fresh session with claude. The new MCP server is picked up on startup.

  3. Authenticate

    In the session, run /mcp, find the zopdev entry, and select Authenticate. OAuth opens a browser window to sign in; approve to finish. PAT users skip this: the header authenticates every call.

  1. Open the custom connector form

    In Claude Desktop, click your profile → Settings → Connectors → Add → Add custom connector.

  2. Fill in the details

    • Name: zopdev
    • Remote MCP Server URL: https://api.zop.dev/mcp-server

    Then click Continue.

  3. Add and connect

    Claude Desktop shows a few security-verification prompts; accept each one, then click Add to save the connector. Finally, click Connect: OAuth opens a browser window to sign in; approve to finish.

Install in one click:

Add to VS Code

Or set it up manually:

  1. Open the MCP config file

    In VS Code (1.99+), open the Command Palette (Cmd + Shift + P on macOS, Ctrl + Shift + P on Windows/Linux), type MCP, and pick the command that opens your user MCP config file (labelled something like MCP: Open User Configuration). To scope the server to one project instead, create .vscode/mcp.json in the workspace root.

  2. Paste the config

    Pick OAuth (recommended) or a Personal Access Token; the tabs below toggle the config.

    OAuth (recommended)
    {
    "servers": {
    "zopdev": {
    "url": "https://api.zop.dev/mcp-server",
    "type": "http"
    }
    }
    }
    Personal Access Token
    {
    "servers": {
    "zopdev": {
    "url": "https://api.zop.dev/mcp-server",
    "type": "http",
    "headers": { "Authorization": "Bearer MCP_PAT" }
    }
    }
    }

    For PAT, swap MCP_PAT for the token you copied at Settings → API & MCP → API Tokens.

  3. Save and authenticate

    Save the file. VS Code starts the server automatically and shows a ✓ Running · Stop · Restart · More… inlay hint above the zopdev entry. On the first tool call, OAuth opens a browser window to sign in; approve to finish. PAT users skip this: the header authenticates every call.

    You can also manage the server from Extensions → MCP Servers - Installed → zopdev.

  1. Add the server

    Inside a Codex CLI session, pick OAuth (recommended) or a Personal Access Token; the tabs below toggle the command.

    OAuth (recommended)
    codex mcp add zopdev --url https://api.zop.dev/mcp-server
    Personal Access Token
    export ZOPDEV_MCP_PAT=<your token>
    codex mcp add zopdev --url https://api.zop.dev/mcp-server --bearer-token-env-var ZOPDEV_MCP_PAT

    Grab <your token> from Settings → API & MCP → API Tokens and export it in the shell before Codex launches; Codex reads the env var by name at connect time.

  2. Authenticate

    Run codex mcp login zopdev and follow the prompts. OAuth opens a browser window to sign in; approve to finish. PAT users skip this: the bearer env var authenticates every call.

  1. Open your client's MCP config

    Any client that speaks the standard MCP JSON config works. Find its config file or MCP settings UI in its docs.

  2. Check the field names

    Some clients use serverUrl instead of url, or type instead of transport. The URL and header values below stay the same; only the surrounding key names change.

  3. Paste one of these configs

    Pick OAuth (recommended) or a Personal Access Token; the tabs below toggle the config.

    OAuth (recommended)
    {
    "mcpServers": {
    "zopdev": {
    "url": "https://api.zop.dev/mcp-server",
    "transport": "streamable-http"
    }
    }
    }
    Personal Access Token
    {
    "mcpServers": {
    "zopdev": {
    "url": "https://api.zop.dev/mcp-server",
    "transport": "streamable-http",
    "headers": { "Authorization": "Bearer MCP_PAT" }
    }
    }
    }

    For PAT, swap MCP_PAT for the token you copied at Settings → API & MCP → API Tokens.

  4. Save and connect

    Save the config and restart the client. On the first tool call, OAuth opens a browser to sign in; approve to finish. PAT users skip this: the header authenticates every call.

Confirm it works

Start a fresh session and ask:

Terminal window
List my organisations

A working connection calls list_organisations and reads back your organisations by name. Run this before asking anyone for help: it isolates the connection from everything else, because list_organisations needs no arguments, and most other tools take the org_id it returns.

If it fails, see Troubleshooting below.

What the tools cover

The MCP catalogue has 337 tools: 186 read and 151 write, including the ZopDay deploy and provisioning tools. They are grouped by area below, with a few examples of each:

AreaCoversFor example
Organisations & permissionsThe organisations you can reach, their settings, and what your own token may dolist_organisations, get_my_permissions, check_eligibility
Resources & discoveryResources across AWS, GCP, and Azure, one-call resource overviews, valid filter values, blast radius, cloud accountsget_resource_overview, list_resources, get_resource_filters, get_blast_radius
Cost & billingSpend by provider, resource, team, and tag, trends over time, anomalies, billing sync health, AI Gateway spendget_cost_overview, get_cost_trends, get_anomalies, get_cost_by_team
BudgetsBudgets with spend and status, health summaries, and creating or changing an alerting thresholdlist_budgets, get_budget_spend, create_budget
RecommendationsOptimisation findings with savings and severity, and the remediation inboxget_recommendations, get_recommendation_summary, list_workflows
Schedules, groups & overridesStart/stop schedules and their windows, resource groups, and temporary overrideslist_schedules, get_override_candidates, create_schedule, create_override
Actions & historyScheduler events, state transitions, action outcomes, and starting or stopping a resourceget_state_history, list_events, start_resource, stop_resource
Teams, users & rolesTeams and their members and resources, users, and role definitionslist_teams, list_team_resources, list_roles
Tagging & smart tagsTagging policies, the tags ZopNight derives, and accepting them into cost attributionlist_tagging_policies, list_smart_tags, accept_smart_tag
IaC governanceTerraform and OpenTofu policies, the scans they produced, and the CI wiring behind themlist_iac_policies, list_iac_validations, get_iac_policy_catalog, ensure_iac_ci
Audit & notificationsAudit entries, and the Slack, Teams, Chat, and webhook channels configuredlist_audit_logs, list_notification_channels

For the authoritative list, call tools/list or ask your assistant what tools it has. The list is filtered to what your token and role allow, so it shows what you can use, not the whole catalogue.

Start with two tools. get_cost_overview answers “where is the money going” in one call, and get_resource_overview answers everything about one resource, including its metrics, cost history, and recommendations. Each one replaces several narrower calls.

Reads and writes

Most tools read. A smaller set writes: it changes a schedule, sets a budget, accepts a tag, or starts or stops a resource.

How much an agent may change is one setting per organisation, Write access, in Settings → Organization. Every organisation starts at Read-only, so no agent can change anything until someone with permission to update the organisation raises the level. The levels are cumulative, so choosing one admits everything below it:

Write accessAdmitsFor example
Read-only (default)Nothing. Read tools only.None
Metadata onlyZopNight’s own records. No cloud state, no cost.Budgets, recommendation status, smart-tag acceptance
Reversible changesBounded blast radius, may affect cost.Schedules, overrides, tagging policies
Irreversible changesNo undo, or incurs cost.Starting and stopping resources

Two more conditions apply to writes. Irreversible changes also need a token bound to a single organisation. And writes must be switched on for the ZopNight service as a whole; if a write tool never appears in your client’s tool list even after you raise Write access, contact support.

Role and member management (creating, updating and deleting roles, adding, updating and removing organisation members, and team-member changes) is admitted at Metadata only, and bulk start and stop at Irreversible changes. Four capabilities are excluded at every level, and no setting adds them: organisation deletion, cloud-account deletion, credential reads, and org-level role assignment. Assigning a role to a team member is a team-member change, admitted at Metadata only.

An agent can never exceed the permissions of the person whose token it holds. Your role is resolved on every call, so revoking someone’s access in the app takes effect on their next tool call, and every write is recorded in the audit trail.

Troubleshooting

List my organisations fails

The usual causes are the transport flag, an expired token, the organisation toggle still being off, or (for OAuth) refusing the browser prompt. Check that the MCP Server section in Settings → Organization shows Active; only someone with permission to update the organisation can switch it on.

Claude Code tries to run the URL as a program

The server was added without the -t http flag, so Claude recorded the URL as a program to execute. Remove the entry and add it again with -t http.

Calls fail with an authentication error

For a Personal Access Token, check that it hasn’t expired on Settings → API & MCP → API Tokens, and create a new one if it has. For OAuth, check that you approved the browser prompt, and that the app hasn’t been revoked on Settings → API & MCP → Connected Apps: a revoked app’s next call fails.

A write tool never appears in my client

Every organisation starts at Read-only. Raise Write access in Settings → Organization, and remember that Irreversible changes also need a token bound to a single organisation. If a write tool still never appears, writes may be switched off for the ZopNight service as a whole; contact support.

New tools don't show up after setup

Clients pick up newly added tools once per session. Start a new chat on a web client, or open a fresh window or terminal in an IDE, desktop app, or CLI.

Next steps

Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·