---
title: "Sign-in, scopes and keys | Hostemi"
description: "OAuth in the browser for people, a key for scripts. Read-only connections, the two scopes, and what is never shared with your AI."
canonical: https://hostemi.com/docs/mcp/authentication
source: https://hostemi.com/docs/mcp/authentication.md
---

# Sign-in, scopes and keys

OAuth in the browser for people, a key for scripts. Read-only connections, the two scopes, and what is never shared with your AI.

#### On this page

1. [For people: OAuth in the browser](#for-people-oauth-in-the-browser)
2. [Scopes and read-only connections](#scopes-and-read-only-connections)
3. [For scripts: an MCP key](#for-scripts-an-mcp-key)
4. [What is never shared](#what-is-never-shared)

## For people: OAuth in the browser

Chat apps and coding agents sign in the way an app signs in to your Google account: the client opens the Hostemi sign-in in your browser, you approve, and the client gets a token for this server only. You never paste a password or a key into the AI.

- A call without a token gets `401` with `WWW-Authenticate` pointing at the resource metadata (RFC 9728): `https://mcp.hostemi.com/.well-known/oauth-protected-resource/mcp` (and `…/mcp/full`).
- Authorization server: `https://api.hostemi.com`, metadata at `https://api.hostemi.com/.well-known/oauth-authorization-server`. Consent page: `https://hostemi.com/oauth/authorize`.
- OAuth 2.1 authorization code with PKCE (S256 only); refresh tokens are issued.
- Client registration: Client ID Metadata Documents first, dynamic registration (RFC 7591) as the fallback. A client needs no pre-registered id.
- Access tokens start with `pos_` and are bound to the resource they were issued for: a token for `/mcp` does not open the REST API.

## Scopes and read-only connections

| Scope | Allows |
| --- | --- |
| `pms:read` | Every tool that reads. |
| `pms:write` | Previews, drafts and apply\_change. Still subject to the approval setting. |

On the consent page you choose whether the connection may make changes or only read. A read-only connection that calls a tool which changes something gets the step-up answer (`403` with `error="insufficient_scope"` and the scope it needs), which Claude and other clients turn into a request to allow it. Inside a tool answer the same refusal is `READ_ONLY`.

## For scripts: an MCP key

A script or a server-side agent that cannot open a browser uses a key. Create it in Hostemi under Settings, AI & apps (an MCP key starts with `hst_mcp_`) and send it as a bearer token. Keys follow their owner's current role: someone who leaves the workspace takes their keys' power with them.

```bash
curl -s https://mcp.hostemi.com/mcp \
  -H "Authorization: Bearer $HOSTEMI_MCP_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_context","arguments":{}}}'
```

One credential per door: an MCP key or a token issued for `/mcp` is refused on the REST API, and a REST API key is meant for `/public/v1`. A key in the URL (`?key=`) is refused everywhere.

## What is never shared

No tool returns a booking platform password, a card number or your Hostemi password. A door code, the Wi-Fi password and the signed link of a website draft never come back in a tool answer: they stay in the Hostemi app, and the answer says where.

Documentation pages

Something missing from this page? Write to [hello@hostemi.com](mailto:hello@hostemi.com), or use the form on the [Help](https://hostemi.com/help) page.
