# MCP

The NodeRings [Model Context Protocol](https://modelcontextprotocol.io) server lets an assistant use your account. It searches the marketplace, runs virtual machines, edits DNS, including GeoDNS, and opens tickets. It signs in as you. It does not get a separate admin account, and it does not receive your password.

<Cards>
  <Card title="Marketplace" description="Search plans across providers and read the regions a plan can deploy in." />

  <Card title="Virtual machines" description="Create, start, stop, reboot, and delete. Addresses appear when the platform has allocated them." />

  <Card title="DNS" description="Create a zone, ordinary records, and GeoDNS records. You still delegate the domain at the registrar." />

  <Card title="Support" description="Read the tickets on the account and open a new one." />

  <Card title="Provider fleet" href="/docs/provider-guides/mcp" description="A provider organization sees nodes, address space, and plans instead of these tools." />
</Cards>

## How it works

The assistant connects to the hosted server and signs in with your NodeRings account. The session carries one organization. A client organization receives the tools on this page. A provider organization receives the [provider tools](../provider-guides/mcp). Sign in again after you change organization.

<Callout type="info">
  Server: `https://mcp.noderings.com/mcp`. Each tool is a fixed operation. The assistant cannot call an arbitrary NodeRings URL, and it never sees your password.
</Callout>

***

## Connect

Every client uses the same server, `https://mcp.noderings.com/mcp`, and signs in with your NodeRings account.

<McpConnect />

Create, power, delete, DNS changes, and tickets are available on the hosted server. They spend money and change your account, and they run only when you ask for them. A delete still requires an explicit request.

***

## Order a virtual machine

<Steps>
  <Step>
    ### Add an SSH key

    Create the key on your machine and upload the public key in [SSH Keys](https://noderings.com/orchestration/ssh-keys). `list_ssh_keys` returns the id, name, type, and fingerprint. It never returns the key.
  </Step>

  <Step>
    ### Search, then create

    `list_marketplace_offerings` takes a short query such as "1 vcpu in Ashburn" and returns `id` (the plan) and `region_id`. `list_distros` returns the `distro` value, for example `DISTRO_UBUNTU_24_04`. `create_virtual_machine` needs the hostname, plan, region, distro, and one or more SSH key ids. It does not accept a password.
  </Step>

  <Step>
    ### Wait for an address

    `get_virtual_machine` returns `ipv4` and `ipv6` when the platform has allocated them. A VM that is still provisioning can come back with those fields empty. Start it with `update_virtual_machine_power` (`start`, `stop`, or `reboot`) if it was created and not yet running. The same address fields are on the power response.
  </Step>

  <Step>
    ### SSH from your machine

    The server does not open a shell and does not log in for you. On a standard OS image the selected key is installed for `root`:

    ```bash
    ssh root@<ipv4>
    ```

    A custom cloud-init profile can use a different user. The API does not report that user, so the tools do not invent one. See [Virtual machines](./platform/virtual-machines).
  </Step>
</Steps>

Usage-based creates require a prepaid credit balance. If the balance is short, create fails and the error states the minimum.

***

## What it will not do

* Run commands on the guest, open a console, or hold an SSH session.
* Accept a root password or a pasted private key.
* Return public key material. You match a key by name and fingerprint, then use the private key that already sits on your machine.
* Call an arbitrary NodeRings URL. Each tool is a fixed operation.
* Change firewall rules. It can list rulesets and read one by id.
* Restore a backup. It can list backups and create a snapshot.

***

## Delete a virtual machine

`delete_virtual_machine` removes the VM, its snapshots, and its backups, and releases its addresses. If that was the last VM on the subscription, the subscription is cancelled and a final hourly usage charge is recorded. Say which VM to delete. A second delete of the same id returns not found.

***

## 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                                                                      |

### Client organization

A provider organization does not see these tools.

| Tool                           | Effect | Input                                                                                                                | Returns                                                                                                                                                                                    |
| ------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `list_marketplace_offerings`   | Read   | `query` (1–500 characters)                                                                                           | Plans with `id`, `region_id`, place, and size                                                                                                                                              |
| `get_marketplace_plan`         | Read   | `plan_id`                                                                                                            | One plan and the regions it can deploy in                                                                                                                                                  |
| `list_ssh_keys`                | Read   | —                                                                                                                    | Id, name, type, and fingerprint. The key material stays on your machine                                                                                                                    |
| `list_virtual_machines`        | Read   | —                                                                                                                    | Id, name, status, region, `ipv4`, `ipv6`                                                                                                                                                   |
| `get_virtual_machine`          | Read   | `id`                                                                                                                 | The same summary for one VM. A guest user is not included                                                                                                                                  |
| `create_virtual_machine`       | Write  | `hostname`, `plan_id`, `region_id`, `distro`, `ssh_key_ids`                                                          | Success. Read the new id from `list_virtual_machines`. A password is not accepted                                                                                                          |
| `update_virtual_machine_power` | Write  | `id`, `action` (`start`, `stop`, or `reboot`)                                                                        | The VM summary, including addresses                                                                                                                                                        |
| `delete_virtual_machine`       | Write  | `id`                                                                                                                 | Success. Removes the VM, its snapshots, and its backups, and releases its addresses                                                                                                        |
| `list_snapshots`               | Read   | `vm_id`                                                                                                              | Snapshots for that VM                                                                                                                                                                      |
| `create_snapshot`              | Write  | `vm_id`, optional `description`                                                                                      | Success                                                                                                                                                                                    |
| `list_backups`                 | Read   | `vm_id`                                                                                                              | Backups for that VM                                                                                                                                                                        |
| `list_firewall_rulesets`       | Read   | —                                                                                                                    | Rule set ids and names                                                                                                                                                                     |
| `get_firewall_ruleset`         | Read   | `id`                                                                                                                 | One rule set. Rules are not changed                                                                                                                                                        |
| `list_dns_zones`               | Read   | —                                                                                                                    | Zones, including the nameservers to delegate                                                                                                                                               |
| `get_dns_zone`                 | Read   | `id`                                                                                                                 | One zone                                                                                                                                                                                   |
| `list_dns_records`             | Read   | `zone_id`                                                                                                            | Records in that zone                                                                                                                                                                       |
| `create_dns_zone`              | Write  | `name` (apex domain)                                                                                                 | The new zone. It stays pending until the registrar delegates it                                                                                                                            |
| `upsert_dns_record`            | Write  | `zone_id`, `name`, `type`, `content`, optional `ttl`, optional `allow_overwrite`                                     | The record. Types are A, AAAA, CNAME, MX, and TXT. An existing name and type is replaced only when `allow_overwrite` is true                                                               |
| `list_dns_geo_locations`       | Read   | optional `kind`, `parent`, `query`                                                                                   | Continent, country, region, and region-group codes a GeoDNS record can target                                                                                                              |
| `list_dns_geo_records`         | Read   | `zone_id`                                                                                                            | GeoDNS records in that zone. Each answers by resolver location                                                                                                                             |
| `check_dns_geo_record`         | Read   | `zone_id`, `name`, `type`, optional `continent`, `country`, `region`                                                 | The target that resolver would receive, and which rule matched                                                                                                                             |
| `upsert_dns_geo_record`        | Write  | `zone_id`, `name`, `type`, `default_target`, optional `continents`, `countries`, `regions`, `ttl`, `allow_overwrite` | The GeoDNS record. Types are A, AAAA, CNAME, SRV, and NAPTR. TTL is 30–60 seconds. An existing name and type is replaced only when `allow_overwrite` is true; the whole policy is replaced |
| `delete_dns_geo_record`        | Write  | `zone_id`, `name`, `type`                                                                                            | Success. The name stops resolving unless a plain record also exists                                                                                                                        |

Ordinary DNS records use `upsert_dns_record`. [GeoDNS](./network/geodns) records answer by continent, country, or region; use the GeoDNS tools above for those.

Provider tools are in [MCP for providers](../provider-guides/mcp).
