> For AI agents: guidance on navigating Viam documentation is available at https://docs.viam.com/llms.txt.

# MCP server

Connect Claude or another MCP client to your Viam fleet, and reference the tools the Viam MCP server exposes.
> Source: https://docs.viam.com/reference/mcp/


The Viam MCP server exposes your Viam organizations, locations, machines, and fragments to an [MCP](https://modelcontextprotocol.io/) client such as Claude, Claude Code, ChatGPT, or Codex. Once connected, the client can look up fleet and machine information, read and edit machine and fragment configuration, and call APIs on live machines on your behalf.

## Connect

Add the Viam MCP server to your MCP client as a remote server at:

```text
https://app.viam.com/mcp
```

The server uses OAuth: your MCP client redirects you to sign in to Viam and authorize access, then uses the resulting token for subsequent tool calls. You must accept Viam's terms of service before any tool call succeeds; if you haven't, a tool call returns an error with a link to do so.

Every tool call is scoped to the organizations, locations, and machines your Viam account can already access. The MCP server does not grant any access beyond your existing permissions.

## Tool categories

Tools fall into five groups, reflected in the **Category** column below:

- **Read-only**, **Read-only (external)**, and **Live machine (read-only)** tools only read; none of them change anything, so most MCP clients don't prompt for confirmation before running any of them. The difference is what they read: Read-only tools query Viam's own data (your fleet, a machine's saved configuration); Read-only (external) tools, such as `read_viam_docs`, search something outside that data, like Viam's documentation; and Live machine (read-only) tools, such as `get_world_state`, connect to an online machine and read its current state directly, so they need the machine to be reachable and can take longer to answer than the other two.
- **Write** tools create or add configuration. Most clients ask for confirmation before running one.
- **Write (destructive)** and **Live machine (destructive)** tools change or delete existing configuration, or act directly on a live machine (for example, moving hardware with `call_machine_api` or `run_docommand`). These save or act immediately, with no draft and no undo, so review what a tool is about to do before approving it.

## Tools

| Tool | Category |
| ---- | -------- |
| `get_registry_item_information` | Read-only |
| `list_machines` | Read-only |
| `list_organization_locations` | Read-only |
| `list_organizations` | Read-only |
| `read_fragment_config` | Read-only |
| `read_inline_module_code` | Read-only |
| `read_machine_config` | Read-only |
| `read_machine_logs` | Read-only |
| `read_machine_metadata` | Read-only |
| `read_part_status` | Read-only |
| `search_configuration_blocks` | Read-only |
| `read_viam_docs` | Read-only (external) |
| `get_world_state` | Live machine (read-only) |
| `read_machine_api` | Live machine (read-only) |
| `add_fragment_config_item` | Write |
| `add_machine_config_item` | Write |
| `create_fragment` | Write |
| `create_machine` | Write |
| `delete_fragment_config_item` | Write (destructive) |
| `delete_machine_config_item` | Write (destructive) |
| `update_fragment_config_item` | Write (destructive) |
| `update_machine_config_item` | Write (destructive) |
| `call_machine_api` | Live machine (destructive) |
| `run_docommand` | Live machine (destructive) |


