# Coding agents & MCP

Use Youniton from a coding agent: with a personal token on the REST API, or with an agent identity on the agent API and the MCP server.

## A personal token

A coding agent can call the REST API with a [personal access token](https://docs.youniton.com/api/authentication.md#personal-tokens). It acts as you, narrowed by the abilities that you select. It can read projects and tickets, comment on tickets and write Markdown notes into a project's memory.

- [Connect a coding agent / CLI](https://docs.youniton.com/api/guides/coding-agent.md): A token, a copy-paste setup prompt and a small CLI.
- [Write project memory](https://docs.youniton.com/api/guides/project-memory.md): Upsert Markdown entries by path, safe to repeat.

## Agent identities

An agent identity is a principal that is not a person: an AI agent, a service such as CI, or a meeting assistant. An Admin creates it in **Administration › Agents**. A tenant setting can also let members create identities that they own.

- An identity has an owner, its projects, its abilities, its rate limits and, as an option, allowed address ranges.
- It has its own token, `kanso_agt_…`. Youniton shows the secret one time. A token has an expiry, can be rotated with an overlap and can be revoked at once.
- It acts only within its owner's current access, never as a person. When the owner leaves the tenant, the identity is suspended.
- An Admin can pause, resume, transfer and revoke an identity.
- Each write of an identity is in the audit log and shows the identity as the author.

> **Where the data goes**
>
> Data that an agent reads leaves Youniton and goes where the agent runs. It can leave the EU. Make sure that the agent and its model provider meet your data rules.

## The agent API

The agent API has 24 operations under `/api/v1/agent/…`. They accept only agent tokens. An identity adds, searches, gets, revises, retracts and links knowledge items, records decisions and reads one ticket by key. Writes are idempotent by `Idempotency-Key`. The tenant's agent write mode decides whether an agent writes directly (the default) or into a review queue.

See each operation in the [Agent API](https://docs.youniton.com/api/reference/agent.md) reference.

## The MCP server

Youniton has its own Model Context Protocol server at `https://app.youniton.example/mcp` (the app host of your workspace):

- Streamable HTTP transport, JSON-RPC 2.0, stateless, `POST` only;
- authentication with an agent token only;
- the agent API's operations as typed tools, and the item types and items as resources;
- the same admission, limits and audit as the agent API.

The MCP server is not part of the OpenAPI contract.
