termal.in

Agents · Your own agent

SSH for your own AI agent — one MCP endpoint and an API key.

Building your own agent? Give it servers the way the chat apps get them: point an MCP client at https://termal.in/mcp and send Authorization: Bearer tk_live_…. The agent reaches every server running a Connector — and you never hand it an SSH key.

This page is the wiring. For why a key custodian beats a key sitting in ~/.ssh, read SSH for AI agents; for every tool, field and error, the MCP reference. Below: a key, then four ways to connect — the OpenAI Agents SDK, a TypeScript client, the Codex CLI, and plain curl.

Requires Pro or the 14-day trial · MCP Streamable HTTP

00  /  how it works

One endpoint, a Bearer key, keyless servers.

The endpoint is https://termal.in/mcp, MCP over Streamable HTTP, authenticated with a header — Authorization: Bearer tk_live_…. It reaches only servers running a Termalin Connector, and the agent is given no SSH key or password: each login uses a short-lived certificate instead. There are 40+ tools behind it — shell, background jobs, files, read-only databases, metrics, alerts, backups, internal sites and remote desktops — all listed in the reference.

01  /  the key

Create a key in the web cabinet.

Go to termal.in/account → AI access → API keys. Keys look like tk_live_…. The cabinet shows ready-to-paste setup for Claude Code, Codex, Cursor, VS Code, n8n, Hermes Agent and Python, and confirms the first time a key is used. Scope the key before you copy it — chosen servers, a command policy and an expiry (see below).

02  /  four ways to connect

Wire it into your agent.

OpenAI Agents SDK (Python). pip install openai-agents, then drive it with any OpenAI-compatible model — DeepSeek below; GLM, MiniMax and local models work the same way, and the model name and base URL come from your provider:

import asyncio
from agents import Agent, Runner, AsyncOpenAI, OpenAIChatCompletionsModel, set_tracing_disabled
from agents.mcp import MCPServerStreamableHttp

set_tracing_disabled(True)
model = OpenAIChatCompletionsModel(model="deepseek-chat",
    openai_client=AsyncOpenAI(base_url="https://api.deepseek.com", api_key="YOUR_MODEL_KEY"))

async def main():
    async with MCPServerStreamableHttp(
        params={"url": "https://termal.in/mcp", "headers": {"Authorization": "Bearer tk_live_…"}},
        client_session_timeout_seconds=300) as termalin:
        agent = Agent(name="ops", instructions="You manage my servers.", model=model, mcp_servers=[termalin])
        print((await Runner.run(agent, "Check disk space on all my servers")).final_output)

asyncio.run(main())

TypeScript. The official client, package @modelcontextprotocol/client:

import { Client, StreamableHTTPClientTransport } from '@modelcontextprotocol/client';
const client = new Client({ name: 'my-agent', version: '1.0.0' });
await client.connect(new StreamableHTTPClientTransport(new URL('https://termal.in/mcp'),
  { requestInit: { headers: { Authorization: `Bearer ${process.env.TERMALIN_API_KEY}` } } }));
const r = await client.callTool({ name: 'ssh_exec', arguments: { host: 'web-01', command: 'df -h' } });

Codex CLI. Add Termalin to ~/.codex/config.toml and keep the key in the TERMALIN_API_KEY environment variable — more in Codex SSH:

[mcp_servers.termalin]
url = "https://termal.in/mcp"
bearer_token_env_var = "TERMALIN_API_KEY"
tool_timeout_sec = 300

curl. List the tools to check the key and endpoint:

curl -s https://termal.in/mcp -H "Authorization: Bearer tk_live_…" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

03  /  scope & limits

Scope the key — and the limits it runs under.

A key can be limited: an expiry (30 / 90 / 365 days), only chosen servers, and a command policy — full, an allowlist of command prefixes, or read-only (no commands or file writes). Each Connector carries its own policy, and the stricter of the two wins — a command must pass both.

  • ▸Rate. 60 commands and 60 file operations a minute, per account.
  • ▸Time. An ssh_exec runs up to 300 seconds; longer work runs as a background job (job_start). Set the client timeout to at least 300 s — the examples above do.
  • ▸Files. Small files read and write directly — up to 512 KB read, 5 MB write; larger ones go through a one-time upload or download link, up to 95 MB, valid 30 minutes.

04  /  audit & revoke

Every call on the log; revoke in one click.

Every call lands in the account's activity log — which key, which server, what ran, and from where. A key can be revoked any time, and that is one toggle rather than a key rotation across every host. More on security →

Questions

What do I need to give my own agent SSH access?

Two things: a Termalin API key (tk_live_…) and the endpoint https://termal.in/mcp. Any MCP client that speaks Streamable HTTP connects by sending Authorization: Bearer tk_live_… — the OpenAI Agents SDK, the official TypeScript client, the Codex CLI, or plain curl. The agent reaches only servers running a Connector, and never holds an SSH key.

Does this work with DeepSeek, GLM or a local model?

Yes. The MCP connection is the same whatever model drives the agent — DeepSeek, GLM, MiniMax or a local model through an OpenAI-compatible endpoint. The model name and base URL come from your provider; the Termalin side doesn't change.

Does my agent get my SSH keys?

No. The only secret it holds is the API key. Servers are reached keylessly through a Connector, with a short-lived certificate issued per login — no SSH key or password is handed to the agent or the model. More on security →

How do I limit or revoke a key?

In the web cabinet a key can be scoped to chosen servers and set to a command policy — full, an allowlist of command prefixes, or read-only (no commands or file writes) — with an expiry (30 / 90 / 365 days). Each Connector carries its own policy, and the stricter of the two wins. Every call is on the activity log, and a key can be revoked any time.

What are the limits?

60 commands and 60 file operations a minute, per account. An ssh_exec runs up to 300 seconds — use job_start for longer work — so set your client timeout to at least 300 s. Small files read and write directly (up to 512 KB read, 5 MB write); larger ones go through a one-time link (up to 95 MB, valid 30 minutes).

How is this different from the MCP reference?

This page is the copy-paste wiring for a custom agent. For why a key custodian beats a key in ~/.ssh, read SSH for AI agents; for every tool, field and error, the MCP reference.

Give your agent a real terminal — one endpoint, one key.

Any MCP client, a Bearer token, every server with a Connector — no SSH key in the agent's reach. Needs Pro or the 14-day trial.

Requires Pro or the 14-day trial · SSH for AI agents · MCP reference