# How to give an AI agent access to logs without handing over SSH or passwords

Source: https://checkcraft.ru/en/guides/ai-agent-log-access.html · updated 2026-11-23

How to connect Claude Code, Cursor or another AI agent to service logs safely: three approaches and their risks, what to check before you connect…

Practical workflow

Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. [Download, no sign-up →](https://checkcraft.ru/en/download-checkcraft.html#free-download)

An agent that investigates a failed request does not need a shell on the server. It needs the records of that request. Give it a narrow tool: search by one traceId, read only, with passwords and tokens masked. The agent then sees what it needs to investigate and can do nothing else.

Checkcraft · 23 November 2026

Get help with your first test →

## Three approaches and their cost

Compared by what the agent will see and what it can do beyond the task.

| Approach | What the agent sees | What else it can do | What it takes from you |
|---|---|---|---|
| Give the agent an SSH key | everything the key’s user can see: logs, configs, environment variables | run any command, read a file with passwords | nothing, which is why people do it |
| Your own gateway with filters | whatever the filter lets through | depends on the filters: pattern masks often miss a token in a query string or inside JSON | write and maintain the code |
| A narrow tool: search by one traceId | the records of one request, with secrets masked and long output cut | nothing: no server commands and no free-form queries to the log store | set up the log source once |

## What to check before you connect

Read-only access. A query by one ID, not free search across the whole store. Masking for password, token, secret, Authorization, api key and cookie values, including inside JSON. A limit on response size so the agent cannot pull a whole day of logs. Access is off until you turn it on and works only from your computer. You can see what the agent called and undo its edits.

Searching Kibana after every request? Checkcraft finds the record by traceId and checks it together with the response. [Download Free →](https://checkcraft.ru/en/download-checkcraft.html#free-download)

## How Checkcraft does it

Checkcraft for Windows 1.0.185 and later includes an MCP server, and the free version is enough. The agent gets a tool that searches the check’s log source, Kibana or Elasticsearch, by traceId only. Secrets in the output are masked and long output is cut. The Kibana login and password stay in the app. There are no server commands among the tools: the agent can create and run checks and search records by traceId. Access is off by default, and calls are accepted only from this computer with a key stored in your user folder. If your logs live in Loki or Graylog, this path does not fit yet.

[Connect an agent over MCP →](https://checkcraft.ru/en/guides/mcp-server.html)

## An example request to the agent

Give the agent a traceId and an investigation task, not “go look at the logs”. Asking it not to change anything keeps the decision with you.

```
POST /orders returned 200, but the order never showed up.
traceId: 4bf92f3577b34da6a3ce929d0e0e4736
Find the log records for this traceId in Checkcraft, using the "Create order" check.
Tell me which service logged ERROR and what it said. Don't change anything.
```

## No agent, no install

If the log is already exported to a file, you can find one request’s records right in the browser: paste the text or JSON log, and the page finds traceIds and shows errors first. Nothing is uploaded.

[Search a log by traceId online →](https://checkcraft.ru/en/guides/log-search-online.html)

Next step

## Repeat this on your own API

Checkcraft is a desktop app that saves API response checks without code and shows what did not match. Start with a sample, then use your own sanitized data. Free runs on Windows and Linux with no time limit.

[Download Free](https://checkcraft.ru/en/download-checkcraft.html#free-download) · [Download and first run](https://checkcraft.ru/en/download-checkcraft.html)

No sign-up or email needed, the archive is ready in a couple of minutes. See the [edition limits](https://checkcraft.ru/en/pricing.html).

## References

[Model Context Protocol](https://modelcontextprotocol.io/)

## Continue with a related task

[Checkcraft MCP server: an AI agent checks the API, logs and database](https://checkcraft.ru/en/guides/mcp-server.html) · [Search logs by traceId online: find every line of a request and its errors](https://checkcraft.ru/en/guides/log-search-online.html) · [traceId: what it is and how to find a request in the logs](https://checkcraft.ru/en/guides/trace-id.html) · [Automate API and log checks with Kibana](https://checkcraft.ru/en/guides/api-kibana-workflow.html) · [Find request logs by traceId in Kibana](https://checkcraft.ru/en/guides/kibana-logs-search.html)

Start with the linked example and compare its result with your own test requirement.

Ask a person

## Get help with your first test

Tell us what you want to test or where you got stuck. We can help you start Checkcraft, choose an example and understand your first run. You can ask before downloading.

[Ask in Telegram](https://t.me/checkcraftchat)Send an email

The Telegram group is public: do not post passwords, tokens or confidential work data. A description of your task is enough to start.

You can also email us support@checkcraft.ru

Page card: /ai/pages/en/guides/ai-agent-log-access.md
