AgentLatch MCP sunucusu
Commit 15 Kas 2026AI agent kodlarını güvenlik risklerine karşı tarar ve MCP tool trafiğini gizli bilgileri maskeleyerek izler.
Ayrıca bilinen adı AgentLatch/agent-latch
- Yıldızlar
- 11
- Araçlar
- —
- İndirmeler, 30 gün
- —
- En son sürüm
- —
- Son commit
- 15 Kas 2026
- Lisans
- MIT
AgentLatch MCP nedir?
AI agent kodlarını güvenlik risklerine karşı tarar ve MCP tool trafiğini gizli bilgileri maskeleyerek izler.
Özet, projenin README dosyasından oluşturuldu
AgentLatch MCP sunucusu hakkında
agent-latch, kodlardaki güvenlik açıklarını tespit ederek ve tool etkileşimlerini izleyerek AI agent projelerini güvence altına almanızı sağlar. Geliştiriciler, Python agent kodlarını, prompt şablonlarını ve agent manifestlerini çalıştırmadan önce riskli desenlere karşı denetlemek için statik tarayıcıyı kullanabilirler. Araç, bulguları terminal, JSON veya SARIF formatlarında raporlar ve GitHub Actions veya pre-commit hook'ları kullanarak iş akışlarına entegre edilebilir.
Gerçek zamanlı denetim için agent-latch-runtime, bir AI agent ile Model Context Protocol (MCP) server arasında yerel öncelikli (local-first) bir proxy görevi görür. Bu proxy; tool listelerini, çağrıları, sonuçları ve promptları kaydederken gizli bilgileri otomatik olarak maskeler. Yalnızca bir izleyici olarak çalışır, yani çağrıları engellemeden veya değiştirmeden trafiği gözlemler. Yerel öncelikli yapısı sayesinde, paket adlarını bir danışma servisine gönderen isteğe bağlı bağımlılık denetimi hariç, tüm proje dosyaları ve taramalar makinenizde kalır.
Neler yapabilirsiniz
- 1MCP tool trafiğini izleyinHassas bilgilerin maskelendiğinden emin olurken, bir agent'ın çalışma sırasında tool'ları ile neler yaptığını gözlemleyin.
- 2CI süreçlerinde güvenlik kontrollerini otomatize edinYüksek öncelikli riskler tespit edildiğinde derlemelerin başarısız olması için güvenlik taramasını pull request iş akışınıza entegre edin.
- 3Log bütünlüğünü doğrulayınÇalışma zamanı loglarının düzenlenmediğinden veya silinmediğinden emin olmak için müdahale edilemez (tamper-evident) bir kayıt defteri kullanın.
Projenin README dosyasından alınmıştır. Her kullanım durumu, oradaki bir alıntı ile kontrol edilir.
Otomatik kontroller
Çalıştırıldı 14 Kas 2026Tam rapor →Henüz doğrulanmadı. Bir sunucunun 80 puana, ciddi bir bulgu olmamasına ve kontrol edebilmemiz için yeterli veriye ihtiyacı vardır. Kontroller nasıl çalışır · Daha fazla puan için nelerin düzeltileceği
- Kaynak deposu bağlantılı ve erişilebiliragentlatch/agent-latch is public and reachablegithub.com/agentlatch/agent-latch ↗Geçti
- Paket, bu depoyu kaynağı olarak gösteriyorKontrol edilmedi
- Derleme kökeni (Sigstore onayı)Kontrol edilmedi
- Açık kaynak lisansı (OSI)MITspdx.org/licenses/MIT.html ↗Geçti
- Son bir yıl içinde commit veya sürüm mevcutLast commit or release 2026-11-14github.com/agentlatch/agent-latch ↗Geçti
- OpenSSF ScorecardKontrol edilmedi
- Paket adı popüler bir pakete yakın değilKontrol edilmedi
- Pakette veya bağımlılıklarında kritik uyarı yokKontrol edilmedi
- Modele yönelik gizli talimat yokInstruction aimed at the model found in the description or READMEBulgu
- Yıkıcı araçlar etiketlenmişKontrol edilmedi
- Uzak uç nokta MCP el sıkışmasına yanıt veriyorKontrol edilmedi
AgentLatch — Local-First AI Agent Security Scanner and MCP Traffic Monitor
Find selected security risks in AI-agent projects before you run them, and see what your agent does with its MCP tools while it runs. AgentLatch is an open-source, local-first AI agent security toolkit with two parts:
- Static scanner (
agent-latch scan): checks Python agent code, agent manifests (tools, permissions, authentication) and prompt templates, optionally audits pinned Python dependencies, and reports evidence in your terminal, JSON or SARIF. Run it from the command line, as a pre-commit hook or as a GitHub Action. - Runtime proxy for MCP, preview (
agent-latch-runtime): sits between an AI agent and a Model Context Protocol (MCP) server and records every tool list, tool call, result and prompt, with secrets masked. Monitor only: it never blocks or changes traffic.

Project status: early proof of concept. AgentLatch is not a complete vulnerability scanner, runtime protection system, security score, or certification. A clean scan means only that the enabled checks did not report a finding. The runtime proxy records traffic and runs two preview gates: ALR03 on the connection handshake and ALR04 on MCP tool definitions. It reports findings and does not block calls.
What AgentLatch does so far
AgentLatch checks an AI agent at three points, and you can use each on its own:
- Static scan: reads an agent project's code, prompts and manifests before anything runs, and reports risky patterns with the file and line.
- Runtime monitor (preview): sits between an agent and its MCP server, records the tool traffic with secrets masked, and flags tool definitions that contain instruction-like content.
- Tamper-evident ledger (preview): seals that record in a hash chain, so an edited, deleted or rebuilt log shows up when you verify it.
Everything runs on your machine and nothing is uploaded. The only network use is the opt-in --dependencies audit. AgentLatch reports findings and never blocks a tool call, and a clean result is not a security guarantee.
Every section below follows the same four steps: what it does, Run it (copy-paste), See the result (the command that shows the output), and Go deeper (links).
| I want to… | Go to |
|---|---|
| Scan an agent project on my laptop | 1. Static scan |
| Fail a pull request on risky changes | 2. Static scan in CI |
| See what my agent asks its MCP tools to do | 3. Runtime monitor |
| Prove the runtime log was not edited | 4. Tamper-evident ledger |
| Hook up Claude, ChatGPT or Cursor | 5. Connect your app |
Contents
- What AgentLatch does so far
- Install once
- 1. Static scan (local)
- 2. Static scan in CI (GitHub Actions and pre-commit)
- 3. Runtime monitor for MCP (preview)
- 4. Tamper-evident ledger (preview)
- 5. Connect Claude, ChatGPT or Cursor
- How it works
- What the scanner checks today
- OWASP Agentic Top 10 coverage
- Documentation
- Why AgentLatch?
- Reports and data handling
- Important limitations
- FAQ
- Development and tests
- Roadmap
- Contributing and security reports
Install once
Requires Python 3.11+. pipx keeps AgentLatch in its own environment (Windows and other options: Getting started).
pipx install agentlatch-security
Sections 3 to 5 use the runtime proxy, which needs the runtime extra (it adds FastMCP). Install this instead if you want everything:
pipx install "agentlatch-security[runtime]"
Or use a virtual environment:
python3 -m venv .venv && source .venv/bin/activate
python -m pip install "agentlatch-security[runtime]"
Check it:
agent-latch -V
On PyPI, AgentLatch is published as agentlatch-security. It installs the agent-latch and agent-latch-runtime commands. The PyPI package named agentlatch is a separate project.
Prefer containers? Two images, ghcr.io/agentlatch/agent-latch (scanner) and ghcr.io/agentlatch/agent-latch-runtime (runtime proxy), run as a non-root user with pinned dependencies. See Container images:
docker run --rm -v "$PWD:/src:ro" ghcr.io/agentlatch/agent-latch:<version> scan . --fail-on high
New to Docker? The setup guide goes from installing Docker to a first scan and a recorded MCP session.
1. Static scan (local)
What it does: reads the files of an agent project (Python code, prompts, YAML, manifests) and reports risky patterns. It never imports or runs the code it checks. No configuration or manifest is needed: every folder and text file is scanned.
Run it:
agent-latch scan /path/to/my-agent
Try it on the deliberately insecure example in this repository:
git clone https://github.com/AgentLatch/agent-latch.git
agent-latch scan agent-latch/examples/vulnerable-agent
Common options:
agent-latch scan --config agent-manifest.yaml # also audit a manifest's declared tools (optional)
agent-latch scan . --project-ignores # your own repo: apply its .agent-latch-ignore
agent-latch scan . --min-severity medium # hide low and info findings (still counted)
agent-latch scan . --dependencies # add known-vulnerability checks (sends package names to PyPI)
agent-latch scan . --fail-on high # exit 1 on high-severity findings, for CI
agent-latch scan . --exclude tests/ # skip a path for one run
agent-latch scan . --format sarif --output results.sarif
agent-latch --interactive # guided mode
Suppressions written inside the scanned project (.agent-latch-ignore, inline ignore comments) are not applied unless you add --project-ignores, so a project you scan cannot hide its own findings.
See the result: the terminal shows each finding with its rule, file and line, and OWASP mapping. This is real output for the example above (shortened):
Findings: 12
[HIGH] MAN001 (ALR09) High-risk tool without human approval
agent-manifest.yaml:29:1
Tool 'run_shell' can perform high-impact actions with no approval gate declared. ...
Gate: ALR09 Human approval for sensitive actions
OWASP Agentic: ASI02 Tool Misuse and Exploitation; ASI05 Unexpected Code Execution (RCE); ...
agent-latch scan . --plain # plain text, for logs and pipes
agent-latch scan . --format json # machine-readable
agent-latch scan . --format sarif --output results.sarif # for code scanning and SARIF viewers
echo $? # 0 passed, 1 findings at or above --fail-on, 2 error
What the rules look for: how one piece of untrusted text can travel from a web page to a shell command. Each red marker is a shipped rule (AG003, AG004, PY002), and breaking any one link stops the chain.
Go deeper: Getting started (ignores, output formats, exit codes) · Rule reference · Agent manifest
2. Static scan in CI (GitHub Actions and pre-commit)
What it does: runs the same scan on every pull request, or before every commit, and fails the check when a finding meets your threshold.
Run it, GitHub Actions: save this as .github/workflows/agent-latch.yml (Marketplace listing):
name: agent-latch
on: [push, pull_request]
permissions:
contents: read
security-events: write # needed to upload results to code scanning
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: AgentLatch/agent-latch@v0.5.1
with:
fail-on: high
# min-severity: medium # optional: hide low and info findings
# project-ignores: "true" # apply your repo's .agent-latch-ignore (a pull request can edit it)
Run it, pre-commit: add this to .pre-commit-config.yaml, then run pre-commit install:
repos:
- repo: https://github.com/AgentLatch/agent-latch
rev: v0.5.1
hooks:
- id: agent-latch
See the result:
- Actions: open the run's log and its job summary (a findings table), or the repository's Security → Code scanning tab and the pull request's checks. The job exposes the outputs
sarif-file,finding-countandexit-code. - pre-commit: the commit is blocked on a high or critical finding. Check the whole repo at any time with:
pre-commit run agent-latch --all-files
Upgrading from v0.1.0: the project's own
.agent-latch-ignore,pyproject.tomlexcludes, and inline ignore comments are no longer applied by default. If your repository relies on them, addproject-ignores: "true"to the Action or--project-ignoreson the command line. See the v0.2.0 release notes.
Go deeper: pre-commit and CI (all inputs and outputs, other CI systems, choosing a threshold)
3. Runtime monitor for MCP (preview)
What it does: agent-latch-runtime sits between an AI agent and an MCP server and records what the agent asks its tools to do and what comes back. It is a preview and monitor only: it never blocks a call. It runs ALR04, which reports a finding when a tool definition contains instruction-like content. Secrets are masked in every file.
Run it: try it with a bundled synthetic server, no setup:
agent-latch-runtime demo
demo starts the synthetic server behind the real proxy, makes a few tool calls (one returns a fake credential, one fails), then imports the logs. This is real output:
Watch a real agent. Put the proxy in front of any MCP server, then follow its logs from a second terminal:
# Terminal 1: the agent's MCP traffic goes through the proxy.
agent-latch-runtime proxy --trace runtime-logs/trace.jsonl --payloads runtime-logs/payloads.jsonl \
-- npx -y @modelcontextprotocol/server-github
# Terminal 2: one line per message, plus events.csv and gate-results.csv in runtime-logs/.
agent-latch-runtime import-logs
Run both from the same folder, in the environment where AgentLatch is installed. mcp-server/.venv does not provide agent-latch-runtime. To also keep a queryable local copy, add --database runtime-logs/runtime.db to import-logs (SQLite, nothing is uploaded).
See the result:
agent-latch . --runtime-result runtime-logs/gate-results.csv
This prints the gate findings in the same table as a scan, with the local tool's file and line when the project defines it (add --plain for text). Real output, shortened:
Runtime findings · 3
HIGH ALR04-003 mcp-server/tools/alr04_fixture_tools.py:14
concealment
Tool definition contains above-threshold injection indicators; no exploit confirmed.
Evidence: instruction_to_conceal_from_user @ $/description
OWASP: ASI01 Agent Goal Hijack; ASI02 Tool Misuse and Exploitation; ...
The report lists findings only. Nothing was blocked. Add --fail-on high to exit 1 on a high finding, and --min-severity to hide lower ones.
Go deeper: Runtime proxy guide (limits, SQLite store, HTTP mode) · Live run with a CrewAI agent, plus 20 test scenarios
What the proxy records
| MCP message | Trace (always) | Full payload (--payloads) |
|---|---|---|
tools/list: tool names, descriptions, schemas |
✅ | ✅ |
tools/call: request, response and error |
✅ | ✅ (a failed call is logged with its error type) |
prompts/get: request and response |
✅ | ✅ |
prompts/list |
✅ | names only |
The trace keeps argument names, sizes, SHA-256 hashes and a short secret-masked excerpt, never raw values. The opt-in payloads file keeps full argument values and tool output, secret-masked and cut to --payload-max-chars. import-logs joins the two into one event per message.
Not recorded yet: resources/list and resources/read, initialize, sampling/createMessage, notifications (including tools/list_changed), image, audio and embedded-resource content in tool results, and a failed prompts/get. These pass through the proxy unchanged with no record. The proxy also never sees the user's chat with the model, an app's built-in tools, or servers not routed through it. Details: docs/runtime.md.
4. Tamper-evident ledger (preview)
What it does: a log the agent can rewrite is not evidence. --ledger FILE seals every trace record into a local hash chain, and one short digest per batch (an anchor) is published somewhere the agent cannot write. An edit, a deletion or a full rebuild then shows up when you verify. It is off unless you ask for it, uses only the standard library, makes no network call, and is never in the request path.
Run it:
# 1. Record with a ledger (the ledger needs a trace file beside it)
agent-latch-runtime proxy --trace runtime-logs/trace.jsonl \
--ledger runtime-logs/trace.ledger.jsonl -- npx -y @modelcontextprotocol/server-github
# 2. Publish an anchor to a place the agent cannot write (a mounted drive, another host, ...)
agent-latch-runtime anchor --ledger runtime-logs/trace.ledger.jsonl --to /mnt/audit/anchors.jsonl
# 3. Verify, any time
agent-latch-runtime verify runtime-logs/trace.ledger.jsonl # finds trace.jsonl beside it
agent-latch-runtime verify runtime-logs/trace.ledger.jsonl --anchor /mnt/audit/anchors.jsonl
agent-latch-runtime verify runtime-logs # every ledger in a folder
agent-latch-runtime verify runtime-logs --all # ... and its subfolders, archives included
See the result: verify prints one verdict (intact, unanchored, tampered, deleted, rewritten or missing) and exits 1 when the trail cannot be trusted. For the full picture, put the ledger in the runtime report:
agent-latch . --runtime-result runtime-logs/gate-results.csv \
--ledger runtime-logs/trace.ledger.jsonl --anchor /mnt/audit/anchors.jsonl
The verdict leads the report, followed by a table with one row per record. Problem records are always listed, and --ledger-rows N sets how many intact ones to show (0 for all). Real output for a ledger with one edited record, one gap and one out-of-order block (shortened):
AUDIT TRAIL TAMPERED — a record was altered; the log cannot be trusted.
#5: the block's digest does not match its content
#11: 2 records are missing here
#13: this block does not follow the block before it
# TIME METHOD STAGE DIGEST STATE
5 2026-10-31T15:52:51.881Z tools/list request b1c5e3ae7973 EDITED
11 - - - - DELETED
13 2026-10-31T15:52:51.882Z tools/call request 65cbcbd329ef REORDERED
30 2026-10-31T15:52:51.883Z tools/call request 97adbec2a3bd ok
Export it as SARIF for a viewer or code scanning. The file gets the SARIF and the terminal still shows the report above:
agent-latch . --runtime-result runtime-logs/gate-results.csv \
--ledger runtime-logs/trace.ledger.jsonl --anchor /mnt/audit/anchors.jsonl \
--format sarif --output audit.sarif
A failed trail exits 1 even with --fail-on none, because log integrity is not a severity threshold.
What to expect: without an anchor the best verdict is unanchored: the chain is consistent, but nothing outside the machine proves the file was not rebuilt. The ledger makes tampering visible; it does not prevent it, and it cannot show a change made before a record was sealed. Check live sessions with verify runtime-logs (the folder, without --all) and use --all to audit archived sessions on purpose. What an agent with write access can still do, and how to narrow it: the ledger operations guide.
Go deeper: Audit ledger overview · Setup · Reference · Operations and incident runbook
5. Connect Claude, ChatGPT or Cursor
What it does: your app starts the proxy instead of the MCP server, and the proxy starts the real server. Nothing else about the app changes.
Run it: in the app's MCP settings, replace the server's command with the proxy and move the old command after --. Use full paths: desktop apps often start servers with a different PATH and working directory.
{
"mcpServers": {
"github": {
"command": "/full/path/to/.venv/bin/agent-latch-runtime",
"args": [
"proxy", "--name", "github", "--trace", "/full/path/to/runtime-logs/trace.jsonl", "--",
"npx", "-y", "@modelcontextprotocol/server-github"
]
}
}
}
Restart the app afterwards. Add "--ledger", "/full/path/to/runtime-logs/trace.ledger.jsonl" before the -- to also seal the log (section 4).
| App | Settings file |
|---|---|
| Claude Code | .mcp.json in the project |
| Claude Desktop | Settings → Developer → Edit Config |
| Cursor | ~/.cursor/mcp.json |
| GitHub Copilot in VS Code | .vscode/mcp.json (top-level key is servers, not mcpServers) |
| ChatGPT (web) | cannot start a local program: it reaches the proxy through OpenAI's Secure MCP Tunnel, see the ChatGPT guide |
See the result: use the app as usual, then follow the traffic with agent-latch-runtime import-logs and read it with the commands from sections 3 and 4.
Go deeper: Connect an app (exact paths per OS, remote servers over HTTP, the supported-clients table) · ChatGPT through the tunnel · Claude Desktop on Windows with the MCP server in WSL
AgentLatch MCP soruları
AgentLatch tool çağrılarını engeller mi?
Hayır, runtime proxy yalnızca trafiği kaydeder ve herhangi bir çağrıyı engellemeden bulguları raporlar.
Verilerim buluta yükleniyor mu?
Her şey yerel makinenizde çalışır; tek ağ kullanımı, yalnızca paket adlarını ve sürümlerini bir danışma servisine gönderen isteğe bağlı bağımlılık denetimidir.