Skip to content

MCP tools

MCP authentication and headers

Bearer tokens, API key headers, basic auth and custom headers for MCP servers, and how the secrets are stored.

Reference1 min readUpdated 23 October 2026

Each MCP server on an agent has its own authentication, set on the Tools tab when you add or edit it. What you choose is sent on every request to that server: the handshake, tool discovery and every tool call.

Authentication types

TypeWhat is sent
NoneNo credentials. Use only for servers that are public or protected another way.
Bearer tokenAuthorization: Bearer <token>
API key headerA header you name (for example X-Api-Key) with your key as its value
Username and passwordAuthorization: Basic … (HTTP basic auth)

Custom headers

Add any other headers the server expects under Custom headers, one KEY=VALUE per line, for example a workspace or version header. Headers that HTTP manages itself, such as Host, Content-Length and Transfer-Encoding, can't be set.

Headers SentientOne always sends

What your server receives
POST /mcp HTTP/1.1Host: mcp.example.comContent-Type: application/jsonAccept: application/json, text/event-streamAuthorization: Bearer …X-Request-Id: 284662c8227a417d9f66755385919e0e{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", …}}# then, reusing any Mcp-Session-Id the server returned:{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "get_order", "arguments": {"order_id": "10482"}}}
  • Accept: application/json, text/event-stream, so the server may answer either way.
  • X-Request-Id: the correlation id of the chat request that led to the call. Log it on your server to match a tool call to its trace. See Request ids.
  • Mcp-Session-Id, once your server has returned one.

How secrets are stored

  • Tokens and passwords are encrypted at rest with AES-256-GCM before they are saved, and decrypted only when a request is made.
  • They are never sent back to the browser in full; the Tools tab shows them masked.
  • Caches hold only the encrypted value.

Least privilege

Give the agent a token that can only do what its tools need, ideally read-only. The model chooses the arguments, so your server should validate them like any other public input.

Still stuck?

Email us with what you tried and any request id. A person replies.

support@sentientone.ai