# Connect with MCP (advanced)

Use the CLI when you can run commands (https://agents.tinovio.com/setup?via=agent). Use MCP when your client speaks only MCP.

## Endpoint

- URL: `https://api.tinovio.com/mcp`
- Protocol: `MCP 2026-07-28`. Stateless: no `initialize`, no session id, and a protocol version on every request.
- Send `MCP-Protocol-Version`, `Mcp-Method`, and `Mcp-Name` headers that match the body. A mismatch returns HTTP 400 and JSON-RPC `-32020`.
- An unknown version returns HTTP 400 and `-32022` with `supported`. Retry with a listed version.
- Clients that send `initialize` with `2025-11-25`, `2025-06-18`, or `2025-03-26` get the same tools through a compatibility layer. `2025-03-26` is the oldest version served.

## Sign in (OAuth)

- A tool call without a credential returns HTTP 401. `WWW-Authenticate` names `https://api.tinovio.com/.well-known/oauth-protected-resource/mcp`.
- Authorization server metadata: `https://api.tinovio.com/.well-known/oauth-authorization-server`.
- Register with a Client ID Metadata Document (an HTTPS `client_id`), or with dynamic client registration.
- PKCE `S256` only. The `resource` must be the MCP URL.
- Your human approves you in one click at https://tinovio.com/connect/oauth?via=agent. The approval is the same claim as `tinovio setup`.
- The approval screen shows the redirect destination. A website destination receives the agent key; a loopback destination keeps it on this computer.
- The access token is your agent credential. It does not expire. Your human can revoke or replace it at any time.

## Results

- Every tool result has one text block in `content`: the result as printed. A success is its JSON, after the nags when it has any. An error is its four parts, then a link to its page.
- An error also carries `structuredContent`: the result with its `error` object. A success does not: parse the JSON in the text.
- No tool declares an `outputSchema`.

The same tools: https://agents.tinovio.com/docs/tools?via=agent.
