Give Claude your Lambda logs — not your AWS account.
LogStitch ships a built-in MCP server that lets AI assistants on your Mac query your already-stitched Lambda logs. The assistant never receives your AWS credentials and never talks to AWS — it queries a local database, over loopback, on your machine.
What the MCP server is
A local server that turns your stitched Lambda logs into something an AI assistant can actually query.
LogStitch already does the hard part: it pulls CloudWatch log events for your Lambda functions, reads the request ID stamped on every line, and stitches those lines back into the invocation they belong to — then stores the result in a SQLite database on your Mac. The MCP server exposes that database to AI assistants running on the same machine.
The important part is what doesn't happen. The AI never receives your AWS credentials, and it never talks to AWS. It talks to LogStitch over 127.0.0.1, and LogStitch answers from log data it has already downloaded and organized. Your credentials stay in the macOS Keychain, used only by LogStitch itself. That means you can point an assistant at production log data without ever handing it a key, a role, or a console session.
MCP — the Model Context Protocol — is an open standard for connecting AI assistants to external tools and data sources. A program exposes a set of tools; an MCP-capable assistant discovers those tools and calls them when a question needs them. LogStitch exposes 21 such tools, covering invocations, errors, patterns, performance, cost, and full-text log search.
Security model
Loopback-only, same-machine-only, no egress. The boundary is enforced by where the socket is bound, not by a setting you have to trust.
The MCP server listens on the loopback interface only — it binds to 127.0.0.1, never to 0.0.0.0 or a LAN address. There is no configuration that exposes it to the network, because the bind address is not configurable. A machine on the same Wi-Fi, a device on your VPN, or anything on the public internet cannot reach it. Only processes already running on your Mac can connect.
Because a loopback-bound HTTP server can still be attacked from a browser page via DNS rebinding, the server also validates the Origin header on every request, as the MCP Streamable HTTP transport requires. Requests carrying no Origin — which is what native clients such as Claude Code send — are allowed. Requests carrying an Origin that does not resolve to loopback are rejected with 403 Forbidden before any tool runs, so a malicious web page cannot use your browser as a proxy into your log database.
Every tool reads from the local SQLite database. The server makes no outbound network requests of its own and transmits nothing off your device. The single exception is deliberate, opt-in, and off by default: the sync_function tool, which lets an assistant ask LogStitch to fetch fresh CloudWatch logs. That one makes AWS API calls — using your credentials, from LogStitch, not from the AI — and it only works if you have explicitly enabled Allow MCP-triggered syncs. You can revoke it at any time.
Enabling the server
The server is off by default. Turning it on takes one toggle.
- Open LogStitch → Settings (
⌘,). - Select the Claude Integration tab.
- Turn on Enable MCP Server. The status line below the toggle changes to Running on localhost:47821, and an MCP indicator with a green dot appears in the main window's toolbar.
That's it — the server is live and ready for a client to connect. If the port is already taken by something else, the toggle reverts and the status line shows the error rather than silently failing.
Settings on this tab
47821. Any port from 1024 to 65535 is accepted; ports below 1024 need root. LogStitch tests the port before saving and tells you if it is already in use. Changing the port while the server is running restarts it on the new one.limit parameter is clamped to this ceiling, so it protects your assistant's context window from a runaway query.sync_function tool, which lets an assistant fetch fresh CloudWatch logs on demand. This makes AWS API calls and may incur cost, which is why it is opt-in.Transport
The server implements the MCP Streamable HTTP transport (protocol revision 2025-03-26 and later) at POST /mcp. It is stateless: there is no session to establish and no server-initiated stream to open, so GET /mcp and DELETE /mcp return 405 Method Not Allowed by design. Fast calls such as initialize and tools/list come back as a single JSON response; tools/call streams its result back over server-sent events on the same connection, with keep-alive comments so a multi-minute CloudWatch fetch does not get torn down as idle.
Connecting Claude Code
One command, run once. Claude Code discovers the server on every session after that.
Recommended: the CLI
With the server running, run this in your terminal:
claude mcp add --transport http -s user logstitch http://127.0.0.1:47821/mcp
The -s user flag registers the server at user scope, so it is available in every project rather than just the current directory. If you changed the port in settings, substitute it here.
Alternative: edit the config directly
Merge this into the mcpServers object in ~/.claude.json for user scope, or .mcp.json in a project directory for project scope:
{
"mcpServers": {
"logstitch": {
"type": "http",
"url": "http://127.0.0.1:47821/mcp"
}
}
}
Restart any Claude Code sessions that were already open — the config is read at session start. Ask Claude to list its tools and you should see the LogStitch tools appear.
Claude Desktop
Claude Desktop cannot connect to the LogStitch MCP server. This is a structural limitation, not a missing feature.
Claude Desktop's custom connectors are routed through Anthropic's servers rather than run on your machine. That means the connector fetches your MCP endpoint from Anthropic's infrastructure — which has no route to 127.0.0.1 on your Mac, because 127.0.0.1 means "this machine" wherever it is evaluated. From Anthropic's side, that address is their own server, not yours.
No configuration fixes this. Exposing LogStitch to the public internet so a remote connector could reach it would defeat the entire security model described above, so LogStitch deliberately does not offer it.
Use Claude Code instead. It runs locally on your Mac, so it connects straight to the loopback address with no intermediary — see connecting Claude Code above. Any other MCP client that runs locally works too.
Other MCP clients
Anything that runs on the same Mac and speaks Streamable HTTP can connect.
The server is not Claude-specific. Any MCP-capable client running locally — an editor extension, a CLI agent, your own script built on an MCP SDK — can connect using the same parameters. There is no API key or token to configure: the loopback binding and Origin validation are the security boundary, so anything already running on your Mac is already trusted.
http://127.0.0.1:47821/mcp (or your configured port)http or streamable-http in client configsPOST. GET and DELETE return 405; the transport is stateless403Browser-based MCP clients work as long as the page is served from a loopback origin; the server sends the CORS headers such a client needs. A page on any other origin is refused.
Tool reference
All 21 tools the server exposes, grouped as they appear in the app. Parameters in blue are required; the rest are optional.
Functions
skip_live (default false) skips the CloudWatch live-metrics fetch and returns local-only counts.status filters to success, error, timeout, or throttled. since is an ISO 8601 datetime. limit defaults to 50, max 500.function_name disambiguates if the same request ID appears under more than one function.days defaults to 7, max 90.Errors & Anomalies
error_type filters by classification, e.g. TypeError or TimeoutError. limit defaults to 50, max 500.include_auto_resolved (default false) also returns anomalies that have since settled below 1.5σ.Performance
window accepts 1h, 6h, 24h, 7d (default), or 30d.window values as above.Cost
include_dismissed (default false) also returns opportunities you have already dismissed in the app.Patterns
pattern_type is error, timeout, or throttled. sort_by accepts occurrence_count (default), invocation_count, last_seen_at, or first_seen_at, always descending. include_suppressed defaults to true.limit defaults to 50, max 500.function_name to summarize across every function.pattern_id comes from list_patterns or search_patterns.limit defaults to 50, max 500.window accepts 1h, 6h, 24h (default), 7d, or 30d.force re-clusters even when the cache is fresh. dry_run reports freshness without running anything. deadline_seconds defaults to 60, clamped to 5–300. Runs entirely locally — no AWS calls.Search & Correlation
AND, OR, NOT, "exact phrase", and prefix*.limit defaults to 20, max 100. Results carry the function, request ID, timestamp, and status of the invocation each line belongs to.correlation_id wins.Sync
timeout_seconds defaults to 300, range 10–900.Example workflows
Real questions, and the tools your assistant reaches for to answer them.
START to REPORT, in order, including the stack trace — and reads it as a single narrative rather than a scattered stream.function_name as a required parameter, so naming it saves your assistant a list_functions round trip.
Troubleshooting
The failure modes you are most likely to hit, and what each one actually means.
The server doesn't appear in my client
Check the Claude Integration settings tab: the status line should read Running on localhost:47821 with a green dot, and the toolbar should show the MCP indicator. If it says Stopped, the toggle is off. If you registered the server while a Claude Code session was already open, restart that session — the MCP config is read at session start, not re-read mid-session.
Connection refused
Something is listening at nothing on that port. In order of likelihood: LogStitch is not running (the server lives inside the app, so quitting the app stops it); the client is configured with a different port than the app; or the app failed to bind at startup because another process holds the port. The settings tab reports "Port N is already in use" when that happens — pick another port there and update your client config to match.
404 on /sse
You are using an older config that points at the legacy SSE endpoint. LogStitch now implements the Streamable HTTP transport, and the old /sse and /message paths were removed — they return 404. Update the URL to http://127.0.0.1:47821/mcp and set the transport type to http.
405 on GET
Expected, not a fault. The transport is stateless, so there is no server-initiated stream to open with GET and no session to tear down with DELETE; both return 405. MCP clients POST. If your client insists on opening a GET stream first, it is speaking the older HTTP+SSE transport rather than Streamable HTTP.
403 Forbidden
The request carried an Origin header that does not resolve to loopback, and was rejected by the DNS-rebinding defense before any tool ran. Native clients send no Origin at all and are unaffected. If you are building a browser-based client, serve it from localhost or 127.0.0.1.
The data looks stale
The MCP server reads the local database — it does not fetch from CloudWatch on every question. If your assistant is reasoning about logs that end an hour ago, that is simply where the cache ends. Sync the function in the app, or enable Allow MCP-triggered syncs so the assistant can call sync_function itself. Bear in mind that syncing makes AWS API calls and may incur cost.
Results look truncated
The Response Size setting caps how much any tool returns, and a tool's own limit parameter is clamped to that ceiling — so asking for 1,000 results on the Standard preset yields 500. Raise the preset if you need more, but remember that everything returned lands in your assistant's context window.
Frequently asked questions
Does my log data leave my Mac?
No. The MCP server binds only to the loopback interface (127.0.0.1) and accepts connections only from processes already running on your Mac. Every tool reads from the local SQLite database LogStitch has already populated. The server makes no outbound network requests and transmits no data off your device.
Does the AI get my AWS credentials?
No. Your AWS credentials stay in the macOS Keychain and are used only by LogStitch itself when it fetches logs from CloudWatch. The AI assistant never sees them, never receives them, and never talks to AWS. It talks only to LogStitch over localhost, and LogStitch answers from data it has already downloaded.
Does this work with Claude Desktop?
No. Claude Desktop's custom connectors are routed through Anthropic's servers rather than run on your machine, so they cannot reach a server bound to your Mac's loopback interface. Use Claude Code, which runs locally and connects directly.
Does it work with MCP clients other than Claude?
Yes. Any MCP client running on the same Mac that speaks the Streamable HTTP transport can connect. Point it at http://127.0.0.1:47821/mcp with transport type http. There is no API key or token to configure — the loopback binding and Origin validation are the security boundary.
Is the MCP server available during the free trial?
Yes. The 14-day trial grants full access to every feature, including the MCP server. There is no separate license check on the MCP server or on any of its tools.
Does the MCP server cost extra?
No. The MCP server is part of LogStitch and is covered by the same one-time purchase as the rest of the app. There is no subscription, no per-seat AI add-on, and no usage metering — the server runs on your Mac against your own database.
Related
The local-AI angle is where LogStitch differs most sharply from the hosted platforms.