# MCP

The NodeRings [Model Context Protocol](https://modelcontextprotocol.io) server lets an assistant use your provider account. It reads the fleet, address space, images, and plans, and it can record a change when you ask. It signs in as you. It does not get a separate admin account, and it does not receive your password or your hypervisor credential.

<Cards>
  <Card title="Fleet" description="Nodes, platforms, regions, agents, and a count of what is reachable." />

  <Card title="Customers" description="Organizations that bought from you, and the virtual machines they run." />

  <Card title="Address space" description="The public prefixes you sell. Add one, then see how full it is." />

  <Card title="Images" description="Operating systems already on a node. Record one that exists." />

  <Card title="Plans" description="Clone a template into one region. The template keeps its price." />

  <Card title="Placement" description="See which node receives the next order, then replace that rule on purpose." />
</Cards>

## How it works

Connect the hosted server, then sign in with the provider organization. Sign in again after you change organization. A client organization receives the [client tools](../client-guides/mcp) instead.

<Callout type="info">
  Server: `https://mcp.noderings.com/mcp`. Reads are available as soon as you connect. A create or a policy change runs only when you ask, and it changes the live fleet. Marketplace search and client virtual-machine tools stay on a client organization.
</Callout>

`list_plans` is the NodeRings subscription catalog. Template plans, the ones you clone, come from `list_template_plans`.

***

## Connect

Every client uses the same server, `https://mcp.noderings.com/mcp`. Sign in with the provider organization.

<McpConnect />

***

## What it will not do

* Read or store your hypervisor password, API token, or cloud-init script.
* Install an agent, assign an agent to a platform, or return peering configuration, an install command, or agent error text. Do that in [Agents](./infrastructure/agents) or with the [nr CLI](./cli-and-automation).
* Power, delete, or open a console on a customer virtual machine.
* Delete a network, prefix, plan, node, or VM template.
* Create a cloud-init script. `create_vm_template` only records an image and a script that already exist.
* Set a price, a CPU limit, or a credit policy. `create_plan` copies those from the template. Change prices in [Plans & Addons](./infrastructure/plan).
* Call an arbitrary NodeRings URL. Each tool is a fixed operation.
* Return payment details or billing amounts for a customer.
* Return the MAC address of a customer virtual machine.
* Return every reserved address in a prefix. You get a count, plus any reserved prefixes.

If an id is not in this organization, the tool reports that it was not found.

***

## Read the fleet

`get_dashboard_summary` returns active VM, customer, and node counts, ticket counts for the recent window, and a breakdown by region and plan.

`list_nodes` and `get_node` return id, name, and whether the node is reachable. `list_platforms` and `get_platform` return name, driver, reachability, and the platform address you registered. Do not put a password in that address. The assistant can read it back.

`list_agents` and `get_agent` return name, status, public address, gateway region, driver, and peering state. They stop there.

`list_provider_customers` returns the customer organization, name, and contact email, and whether purchases are blocked. `get_provider_customer` takes `client_organization_id` from that list. `list_provider_virtual_machines` can be narrowed with `node_id`, `region_id`, `platform_id`, or `customer_email`. It returns hostname, size, distro, addresses, and the customer organization. It does not return a MAC address.

***

## Address space

<Steps>
  <Step>
    ### List networks first

    `list_networks` returns each network id, name, DNS servers, and MAC prefix. `list_prefixes` requires one `network_id` from that list. A call without it tells you to list networks first.
  </Step>

  <Step>
    ### Read one prefix

    `get_prefix_utilization` takes a prefix id. It returns how many addresses are allocated, reserved, and free. `list_prefixes` returns the CIDR, gateway, allocation strategy, reserved count, and reserved prefixes. It does not return each reserved address.
  </Step>

  <Step>
    ### Add a network or prefix

    `create_network` records a name, description, DNS servers, and an optional MAC prefix (`XX:XX:XX`). It does not allocate addresses.

    `create_prefix` needs `network_id` and `cidr`. Gateway and reserved addresses must sit inside that CIDR. Register the public prefixes you sell. For IPv6, set `vm_assignment_prefix_length` greater than the prefix and at most 128. On a `/48`, `64` is valid.
  </Step>
</Steps>

`add_reserved_ip` and `remove_reserved_ip` change one address inside a prefix you already have. Strategies are `ALLOCATION_STRATEGY_SEQUENTIAL`, `ALLOCATION_STRATEGY_RANDOM`, `ALLOCATION_STRATEGY_FIRST_AVAILABLE`, and `ALLOCATION_STRATEGY_LAST_AVAILABLE`.

These calls return success only. Read the new id back with `list_networks` or `list_prefixes`.

***

## Images

`list_vm_templates` returns the name, distro, node, and the hypervisor template id already on that node. `list_distros` returns the distro value to pass when you record another image, for example `DISTRO_UBUNTU_24_04`.

`create_vm_template` records an image that is already on the node. It needs:

| Input                    | Where it comes from                                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `name`                   | 3 to 255 characters                                                                                          |
| `distro`                 | `list_distros`                                                                                               |
| `template_id`            | The hypervisor id on that node. Proxmox ids start at 100                                                     |
| `node_id`                | `list_nodes`                                                                                                 |
| `cloud_init_template_id` | A cloud-init template that already exists. See [Cloud-init templates](./infrastructure/cloud-init-templates) |

The tool does not upload an image and does not create or return a cloud-init script.

***

## Clone a plan

<Steps>
  <Step>
    ### Pick a template

    `list_template_plans` returns template id, name, code, and currency. It does not return prices. Pass `code` to narrow the list, for example `SC-GC-1C-1G-20`. An empty code returns the whole template catalog.
  </Step>

  <Step>
    ### Choose one region and the nodes

    `list_regions` and `list_nodes` supply `region_id` and `node_ids`. Use at least one node and at most 32. Duplicates are ignored.
  </Step>

  <Step>
    ### Clone

    `create_plan` takes `plan_id`, `region_id`, `node_ids`, and `currency`. `currency` must be the template currency, such as `USD` when the template says `USD`. Prices, CPU limits, and credit policy stay on the template. The same template in a region you already offer is refused.
  </Step>

  <Step>
    ### Check the new plan

    The call returns success only. `list_preflight_checks` shows the new plan id, code, whether it is marketplace-ready, and a short note. Listing still depends on [preflight](./infrastructure/preflight).
  </Step>
</Steps>

To change a price after the clone, use [Plans & Addons](./infrastructure/plan). The assistant cannot publish a different price.

***

## Placement

Read `get_node_placement_policy` before you change it. `update_node_placement_policy` replaces the whole policy. If you omit `region_overrides`, the current overrides are cleared.

| Value                                        | Meaning                               |
| -------------------------------------------- | ------------------------------------- |
| `NODE_PLACEMENT_STRATEGY_FIRST_STABLE`       | First eligible node in a stable order |
| `NODE_PLACEMENT_STRATEGY_ROUND_ROBIN`        | Spread new VMs across eligible nodes  |
| `NODE_PLACEMENT_STRATEGY_LEAST_ASSIGNED_VMS` | Eligible node with the fewest VMs     |
| `NODE_PLACEMENT_STRATEGY_RANDOM`             | An eligible node chosen at random     |

`default_strategy` is required. Each override needs a `region_id` from `list_regions` and one of those values. See [Node placement](./infrastructure/node-placement) for where this sits in the console.

***

## Tool spec

An assistant calls one tool by name and passes a single JSON object. A field that is not listed for that tool is rejected. A missing required field is rejected. Read tools do not change the account. Write tools change it, and they run only when you ask.

### Any organization

These tools are on a client account and a provider account.

| Tool                 | Effect | Input                                                        | Returns                                                                             |
| -------------------- | ------ | ------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| `get_identity`       | Read   | —                                                            | The signed-in user and organization                                                 |
| `list_organizations` | Read   | —                                                            | Organizations you can see                                                           |
| `get_organization`   | Read   | `id`                                                         | One organization                                                                    |
| `list_plans`         | Read   | —                                                            | NodeRings subscription plans. This is not a VM plan id and not a template plan id   |
| `list_distros`       | Read   | —                                                            | Guest OS catalog. Pass `distro` to `create_virtual_machine` or `create_vm_template` |
| `list_tickets`       | Read   | —                                                            | Tickets on the account                                                              |
| `get_ticket`         | Read   | `id`                                                         | One ticket                                                                          |
| `create_ticket`      | Write  | `title` (10–255 characters), `message` (10–16384 characters) | The new ticket                                                                      |

### Provider organization

A client organization does not see these tools. Reads do not return a hypervisor password, an API token, a cloud-init script, a peering config, an install command, a MAC address, or payment details.

| Tool                                | Effect | Input                                                                                                     | Returns                                                                                                                                             |
| ----------------------------------- | ------ | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `get_dashboard_summary`             | Read   | —                                                                                                         | Counts for VMs, customers, nodes, tickets, regions, and plans                                                                                       |
| `get_provider_onboarding_checklist` | Read   | —                                                                                                         | Completed steps and the next step                                                                                                                   |
| `list_nodes`                        | Read   | —                                                                                                         | Id, name, reachability                                                                                                                              |
| `get_node`                          | Read   | `id`                                                                                                      | One node                                                                                                                                            |
| `list_platforms`                    | Read   | —                                                                                                         | Platforms                                                                                                                                           |
| `get_platform`                      | Read   | `id`                                                                                                      | Driver, reachability, and the platform address you registered                                                                                       |
| `list_regions`                      | Read   | —                                                                                                         | Id, name, code                                                                                                                                      |
| `get_region`                        | Read   | `id`                                                                                                      | One region                                                                                                                                          |
| `list_agents`                       | Read   | —                                                                                                         | Name, status, public address, peering state                                                                                                         |
| `get_agent`                         | Read   | `id`                                                                                                      | One agent, with the same limits                                                                                                                     |
| `list_provider_customers`           | Read   | —                                                                                                         | Customer name and email                                                                                                                             |
| `get_provider_customer`             | Read   | `client_organization_id`                                                                                  | One customer, with the same limits                                                                                                                  |
| `list_provider_virtual_machines`    | Read   | Optional `node_id`, `region_id`, `platform_id`, `customer_email`                                          | Customer VMs                                                                                                                                        |
| `list_networks`                     | Read   | —                                                                                                         | Network id, name, DNS servers, and MAC prefix                                                                                                       |
| `list_prefixes`                     | Read   | `network_id` from `list_networks`. Omit it and the tool tells you to call `list_networks` first           | CIDR, gateway, allocation strategy, reserved count, and reserved prefixes. Each reserved address is not included                                    |
| `get_prefix_utilization`            | Read   | `prefix_id`                                                                                               | Allocated, reserved, and free counts                                                                                                                |
| `list_vm_templates`                 | Read   | —                                                                                                         | Images already registered on a node                                                                                                                 |
| `list_template_plans`               | Read   | Optional `code`                                                                                           | Template id, name, code, and currency. Prices are not included                                                                                      |
| `list_preflight_checks`             | Read   | —                                                                                                         | Plan id, code, marketplace-ready, and a short note                                                                                                  |
| `get_node_placement_policy`         | Read   | —                                                                                                         | Default strategy and region overrides                                                                                                               |
| `create_network`                    | Write  | Optional `name`, `description`, `dns_servers`, `mac_address_prefix` (`XX:XX:XX`)                          | Success. Read the id from `list_networks`                                                                                                           |
| `create_prefix`                     | Write  | `network_id`, `cidr`, optional gateway, reserved addresses, strategy, description, IPv6 assignment length | Success. Register a public prefix. Read the id from `list_prefixes`                                                                                 |
| `add_reserved_ip`                   | Write  | `prefix_id`, `ip_address`                                                                                 | Success                                                                                                                                             |
| `remove_reserved_ip`                | Write  | `prefix_id`, `ip_address`                                                                                 | Success                                                                                                                                             |
| `create_vm_template`                | Write  | `name`, `distro`, `template_id`, `node_id`, `cloud_init_template_id`                                      | Success. The image and the Cloud-Init script must already exist                                                                                     |
| `create_plan`                       | Write  | `plan_id`, `region_id`, `node_ids` (1–32), `currency`                                                     | Success. `currency` must match the template. Prices, CPU limits, and credit policy stay on the template. Find the plan with `list_preflight_checks` |
| `update_node_placement_policy`      | Write  | `default_strategy`, optional `region_overrides`                                                           | The policy you just saved. Omitting `region_overrides` clears them. Read `get_node_placement_policy` first                                          |

`default_strategy` and each override `strategy` are one of `NODE_PLACEMENT_STRATEGY_FIRST_STABLE`, `NODE_PLACEMENT_STRATEGY_ROUND_ROBIN`, `NODE_PLACEMENT_STRATEGY_LEAST_ASSIGNED_VMS`, or `NODE_PLACEMENT_STRATEGY_RANDOM`.

A prefix `allocation_strategy` is one of `ALLOCATION_STRATEGY_SEQUENTIAL`, `ALLOCATION_STRATEGY_RANDOM`, `ALLOCATION_STRATEGY_FIRST_AVAILABLE`, or `ALLOCATION_STRATEGY_LAST_AVAILABLE`.

Client tools are in [MCP for clients](../client-guides/mcp).
