> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withterminal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Endpoint, authentication, arguments, and tools for the Terminal MCP server.

<Warning>
  The Terminal MCP server is in **beta**. Tool names and arguments may change.
  Please share feedback via our shared Slack channel or
  [support@withterminal.com](mailto:support@withterminal.com).
</Warning>

The MCP server exposes Terminal API read operations as [Model Context Protocol](https://modelcontextprotocol.io) tools. For setup steps, see the [Agents guide](/guides/agents#mcp-server).

## Endpoint

```
https://mcp.withterminal.com/mcp
```

| Property  | Value                                                                                                                                 |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Transport | [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http), stateless (`POST` only) |
| Auth      | OAuth 2.1 with dynamic client registration                                                                                            |
| API       | Production. Tool calls are proxied to the Terminal production API                                                                     |

## Authentication

Clients authenticate with OAuth. When you add the server, your client opens a browser to sign in with your Terminal Dashboard account. You do not put a secret key (`sk_…`) in the client config.

The server requests the `openid`, `profile`, `email`, `user:org:read`, and `public_metadata` scopes. The resulting token acts as your Dashboard user: every tool call is authorized against the applications in your active organization and the data that user can read.

## Arguments

Each tool's input schema is generated from the matching API operation. Query and path parameters become tool arguments with the same names. The server also accepts the following arguments, which it maps onto the request:

| Argument          | Sent as                   | Description                                                                                                                                                   |
| ----------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `applicationId`   | `X-Application-Id` header | Required on application-scoped tools. Resolve it with `listApplications`.                                                                                     |
| `connectionToken` | `Connection-Token` header | Required on connection-scoped tools. Resolve it with `listConnections` and use the connection's `token`. See [Authentication](/api-reference/authentication). |
| `intent`          | Not sent                  | Optional. A short English summary of why the agent chose the tool. Used for analytics only; do not include IDs, PII, or secrets.                              |

The server's instructions tell the agent to resolve `applicationId` and `connectionToken` before calling scoped tools, so you rarely need to provide them yourself.

## Tools

Every tool is a `GET` against the Terminal API and is annotated `readOnlyHint`. The MCP server cannot create, update, or delete data.

Tools map one-to-one to API operations, named by operation ID: for example, `listVehicles` is [List Vehicles](/api-reference/vehicles/list-vehicles) and `listHOSLogs` is [List HOS Logs](/api-reference/hours-of-service/list-hoslogs). Tools cover applications, connections, providers, vehicles and locations, drivers and HOS, trips, safety events, fault codes, devices, groups, trailers, IFTA, syncs, and issues. Ask your agent to list its tools for the current set.

Tools return the API response body as JSON text. Paginated tools accept `cursor` and `limit` like the API; see [Pagination](/api-reference/pagination).

## Errors

A tool call that fails returns an MCP result with `isError: true` and a text message:

* **Invalid arguments.** The arguments do not match the tool's input schema. The message lists each failing field.
* **API errors.** The Terminal API returned a non-2xx status. The message is `Terminal API <status>: <response body>`.

## Rate limits

Tool calls are ordinary Terminal API requests and count toward the same [rate limits](/api-reference/rate-limits). A `429` is returned to the agent as an API error.
