<link rel="stylesheet" href="/css/doc/mcp-server.css">
<div class="mcp-doc"></div>

obniz MCP Server lets MCP-compatible AI clients operate obniz devices through obniz Cloud.

MCP, or Model Context Protocol, is a standard way for an AI client to connect to external systems. With the obniz MCP Server, the AI client can request device operations without embedding obniz-specific code in the chat client itself.

## How it works

<div class="mcp-flow">
  <div class="mcp-flow__item">
    <div class="mcp-flow__num">1</div>
    <div class="mcp-flow__title">AI Client</div>
    <p class="mcp-flow__text">An MCP-compatible client such as Claude Desktop, Claude Code, or Codex.</p>
  </div>
  <div class="mcp-flow__item">
    <div class="mcp-flow__num">2</div>
    <div class="mcp-flow__title">MCP Server</div>
    <p class="mcp-flow__text">Receives requests and connects to the Hosted App tied to the App Token.</p>
  </div>
  <div class="mcp-flow__item">
    <div class="mcp-flow__num">3</div>
    <div class="mcp-flow__title">obniz Device</div>
    <p class="mcp-flow__text">Operates real hardware through obniz Cloud.</p>
  </div>
</div>

1. An AI client such as Claude Desktop or Claude Code connects to the obniz MCP Server.
2. The client sends an App Token in the `Authorization` header.
3. The MCP server uses the App Token to access the devices installed to the corresponding Hosted App in obniz Cloud.
4. The target obniz device is controlled through obniz Cloud.

## When to use it

Use the MCP server when you want to:

- operate an obniz device from an AI assistant
- check device status from a chat-based workflow
- try hardware behavior without writing a dedicated control program first
- let an MCP-compatible client connect to an existing obniz Cloud setup

## Requirements

- An [obniz Cloud](https://obniz.com/) account
- A Hosted App on obniz Cloud
- An App Token for that Hosted App
- At least one obniz device installed to the Hosted App
- An MCP-compatible AI client

For the fastest setup, use the cloud MCP endpoint in [Quick Start](/developer/mcp-server/quick-start).
