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.

In short
Your assistant gets a read-only window onto logs that are already on your Mac. AWS sees nothing new, and neither does anyone else.

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.

Also documented in the privacy policy
Section 04 of the LogStitch privacy policy covers the local MCP server: loopback binding, same-machine connections only, and no data transmitted off your device.

Enabling the server

The server is off by default. Turning it on takes one toggle.

  1. Open LogStitch → Settings (⌘,).
  2. Select the MCP Server tab.
  3. 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.
  4. In Connection Setup, pick your client from the AI Tool menu and follow the numbered steps it shows.

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.

This tab was called "Claude Integration" before v1.4
It was renamed to MCP Server when setup instructions were added for the other nine clients. If you are following an older guide or a screenshot that says "Claude Integration", it means this tab.

Connection Setup

The AI Tool picker lists the ten clients LogStitch ships instructions for, grouped by family — command line, editors, desktop apps, and an "anything else" entry for the manual route. Select one and the panel shows numbered setup steps for that client specifically: the config file it uses, the exact snippet in that client's own format, a copy button on each step, a Reveal in Finder link that opens the folder containing that client's config file, and a closing step describing how to confirm the connection in that client's own UI.

This matters more than it sounds like it should. Every client wants the same URL, but each one wants it under a different key — and four of the ten fail silently if you use the wrong one. See supported AI clients for the full breakdown.

Test Connection, next to the toggle, probes the local endpoint and reports the tool count on success. On failure it distinguishes between connection refused, a request that timed out, and a response that wasn't what an MCP server should return — which tells you whether the problem is the server, the port, or something else holding the address.

Settings on this tab

Server Port
Defaults to 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.
Response Size
A ceiling on how much any single tool may return: Conservative (100 results, 50 KB of log content), Standard (500 results, 100 KB — the default), Large (2,000 results, 500 KB), or Unlimited. A tool's own limit parameter is clamped to this ceiling, so it protects your assistant's context window from a runaway query.
Allow MCP-triggered syncs
Off by default. Enables the 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.
Available Tools
Expands to the full list of tools the server exposes, with descriptions — the same catalog documented in the tool reference below.

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.

Not stdio
LogStitch does not run as a stdio subprocess of your client. It is a long-lived HTTP server inside the app, so configure your client with an HTTP transport and a URL — not a command and args. The app must be running for the server to answer. The one exception is Claude Desktop, which speaks only stdio and therefore needs a bridge process in between.

Supported AI clients

Any MCP client that speaks Streamable HTTP can connect. Ten of them have setup built into the app.

The server is not tied to any one vendor. It exposes POST /mcp over the standard MCP Streamable HTTP transport, so any client implementing that transport can talk to it — nothing is negotiated, licensed, or registered on either side. LogStitch works with these clients by reading their published config formats; there is no partnership or integration agreement behind any entry in this table.

What LogStitch adds is the tedious part: as of v1.4 the MCP Server settings tab ships ready-made, per-client setup for the ten clients below, with the snippet already in that client's format and your actual port already filled in.

Client Connects Config file Root key Key for the URL
Claude Code Direct ~/.claude.json mcpServers type: "http" + url
Cursor Direct ~/.cursor/mcp.json mcpServers url (no type field)
VS Code · Copilot Direct .vscode/mcp.json servers type: "http" + url
Cline · Roo Code Direct ~/.cline/mcp.json mcpServers url + type: "streamableHttp"
Gemini CLI Direct ~/.gemini/settings.json mcpServers httpUrl
Codex CLI Direct ~/.codex/config.toml [mcp_servers.logstitch] url (TOML, not JSON)
Zed Direct ~/.config/zed/settings.json context_servers url
Windsurf Direct ~/.codeium/windsurf/mcp_config.json mcpServers serverUrl
LM Studio Direct In-app: Program → Install → Edit mcp.json mcpServers url
Claude Desktop Via bridge ~/Library/Application Support/Claude/claude_desktop_config.json mcpServers command: "npx", args: ["-y", "mcp-remote", "<url>"]
Any other client Manual Endpoint + curl smoke test

Windsurf is also distributed as Devin Desktop; the config path is the same. Config formats verified against each vendor's own documentation on 12 August 2026.

Four ways to get it wrong and see no error

Every client above wants the same URL. Each one wants it under a different key. In four cases, using the key you would reasonably expect produces no error message at all — the client simply never connects, and the LogStitch tools never appear:

  • Cline · Roo Code — omit type and it falls back to the deprecated SSE transport, which LogStitch does not serve. You need "type": "streamableHttp" explicitly.
  • Gemini CLIurl means SSE there. Streamable HTTP is httpUrl, and the difference is one letter of config away from silence.
  • VS Code — nests servers under servers, not the mcpServers that almost everything else uses.
  • Zed — calls them context servers, so the root key is context_servers.

This is the reason the in-app picker is worth using rather than hand-writing config from memory: it emits the right shape for the client you selected, so a silent no-op isn't one of the outcomes.

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.

Copy it from the app instead
Select Claude Code in the AI Tool picker on the MCP Server settings tab and you get both of these snippets with your actual port already filled in, each with its own copy button. If you have changed the port, that is the quickest way to get a correct command.

Claude Desktop, via a bridge

Claude Desktop connects — but not the way you would first try. The remote connector route genuinely cannot reach a local server; a stdio bridge can.

Why the obvious route fails

Claude Desktop's remote connector feature is routed through Anthropic's servers rather than run on your machine. A connector pointed at http://127.0.0.1:47821/mcp is evaluated from Anthropic's infrastructure, and 127.0.0.1 means "this machine" wherever it is evaluated — so from there it resolves to Anthropic's own server, not to your Mac. No configuration fixes that, and exposing LogStitch to the public internet so a remote connector could reach it would defeat the entire security model, so LogStitch deliberately does not offer it.

The route that does work

Claude Desktop also launches MCP servers as local subprocesses over stdio, and that half runs on your machine. So you put a relay in the middle: mcp-remote is launched as the subprocess, speaks stdio to Claude Desktop on one side, and speaks Streamable HTTP to LogStitch on the other. Both hops stay on your Mac; nothing is routed through Anthropic.

Merge this into ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "logstitch": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://127.0.0.1:47821/mcp"]
    }
  }
}

Quit and reopen Claude Desktop afterwards — it reads this file at launch. The LogStitch tools then appear under the tools menu in a new conversation.

Needs Node 18 or later
mcp-remote runs under npx, so this route requires Node 18+ on your Mac. LogStitch checks for Node on the MCP Server settings tab and shows what it found, but the check is advisory only — the snippet is shown either way, so you can copy it now and install Node later. Every other client in the table above connects directly and needs no Node at all.

If you have the choice, Claude Code is still the simpler path: it speaks Streamable HTTP natively, so it connects straight to the loopback address with no bridge, no subprocess, and no runtime dependency.

Anything else: manual setup

Not on the list? Anything that runs on the same Mac and speaks Streamable HTTP can still connect.

The ten clients in the table above are the ones LogStitch ships instructions for — not the ones it is limited to. Any MCP-capable client running locally, including an editor extension, a CLI agent, or your own script built on an MCP SDK, can connect using the parameters below. Selecting Anything else in the AI Tool picker shows the same details with your configured port filled in. There is no API key or token: the loopback binding and Origin validation are the security boundary, so anything already running on your Mac is already trusted.

URL
http://127.0.0.1:47821/mcp (or your configured port)
Transport
Streamable HTTP — usually written as http or streamable-http in client configs
Method
POST. GET and DELETE return 405; the transport is stateless
Authentication
None
Origin header
Omit it, or send one that resolves to loopback. Anything else is rejected with 403

Smoke-test it first

Before wiring up a client, confirm the server is answering. This asks it to list its tools:

curl -sS http://127.0.0.1:47821/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

A healthy server returns a JSON-RPC result listing 21 tools. Connection refused means LogStitch isn't running or the port is wrong; 405 means you sent a GET; 403 means an Origin header that doesn't resolve to loopback came along for the ride. The Test Connection button on the MCP Server settings tab runs the equivalent check and reports the tool count without you leaving the app.

Browser-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

list_functions
Lists every Lambda function in the local LogStitch database, with runtime, memory, and invocation counts. Usually the first call an assistant makes, to discover what it can ask about.
profile_name skip_live
skip_live (default false) skips the CloudWatch live-metrics fetch and returns local-only counts.
get_invocations
Returns recent invocations for a function with status, duration, and memory usage.
function_name status since limit profile_name
status filters to success, error, timeout, or throttled. since is an ISO 8601 datetime. limit defaults to 50, max 500.
get_invocation_logs
Returns every log line for one invocation, looked up by request ID — the stitched view, as a single coherent block.
request_id function_name
function_name disambiguates if the same request ID appears under more than one function.
get_function_stats
Aggregated performance and cost statistics for a function — p50/p95/p99 duration and error rate over a rolling window.
function_name days profile_name
days defaults to 7, max 90.

Errors & Anomalies

get_errors
Returns error and timeout invocations for a function, including stack traces, for root cause analysis.
function_name error_type since limit profile_name
error_type filters by classification, e.g. TypeError or TimeoutError. limit defaults to 50, max 500.
get_anomalies
Surfaces statistical performance anomalies — duration spikes, memory surges, and error bursts — detected by z-score analysis.
profile_name function_name include_auto_resolved
Scopes to one function or across a whole profile. include_auto_resolved (default false) also returns anomalies that have since settled below 1.5σ.

Performance

get_cold_start_analysis
Cold start frequency and impact for a function: init durations, and the runtime and memory combinations driving them.
function_name window profile_name
window accepts 1h, 6h, 24h, 7d (default), or 30d.
get_memory_analysis
Memory allocated versus peak memory actually used, with right-sizing recommendations.
function_name window profile_name
Same window values as above.

Cost

get_cost_summary
Estimated Lambda cost distributed across every function in a profile, over a time window.
profile_name window
get_cost_optimization
Scans every function in a profile for cost reduction opportunities based on memory allocation and duration.
profile_name window include_dismissed
include_dismissed (default false) also returns opportunities you have already dismissed in the app.
get_cost_projection
Projects the next 30 days of Lambda cost using linear regression over recent daily spend.
profile_name

Patterns

list_patterns
Lists detected error, timeout, and throttle patterns for a function, with filtering, sorting, and pagination.
function_name pattern_type has_linked_issues include_suppressed sort_by since limit offset profile_name
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.
search_patterns
Searches patterns across all functions by substring against the pattern's canonical template, case-insensitive.
query limit profile_name
limit defaults to 50, max 500.
get_patterns_summary
A pattern health overview: total counts, breakdown by type and severity, and the highest-impact patterns.
function_name profile_name
Both optional — omit function_name to summarize across every function.
get_pattern_detail
Full detail for one pattern: metadata, representative log examples, and any linked issue tracker tickets.
pattern_id
pattern_id comes from list_patterns or search_patterns.
get_pattern_affected_invocations
A paginated list of every invocation containing instances of a given pattern.
pattern_id limit offset
limit defaults to 50, max 500.
get_pattern_trend
Time-bucketed occurrence counts for a pattern, for spotting regressions or confirming a fix landed.
pattern_id window
window accepts 1h, 6h, 24h (default), 7d, or 30d.
run_pattern_detection
Runs pattern clustering for a function when new error log lines have arrived, and returns the resulting pattern count.
function_name force dry_run deadline_seconds profile_name
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

search_logs
Full-text search across every cached log line, using SQLite FTS5 syntax — AND, OR, NOT, "exact phrase", and prefix*.
query function_name since limit profile_name
limit defaults to 20, max 100. Results carry the function, request ID, timestamp, and status of the invocation each line belongs to.
get_correlated_invocations
Finds every invocation sharing a correlation ID or an AWS X-Ray trace ID — the cross-function view of one request.
correlation_id xray_trace_id
At least one of the two is required. If both are supplied, correlation_id wins.

Sync

sync_function
Triggers a fresh CloudWatch Logs fetch for a function, so an assistant can pull data newer than what is cached.
function_name timeout_seconds profile_name
The only tool that reaches AWS. Requires Allow MCP-triggered syncs to be enabled in settings; otherwise it refuses. timeout_seconds defaults to 300, range 10–900.

Example workflows

Real questions, and the tools your assistant reaches for to answer them.

Why did request 7f3a9c2e-4b81-4f6a-9d3e-1c8f5a2b7e40 fail?
Claude pulls the complete stitched log for that one invocation — every line from START to REPORT, in order, including the stack trace — and reads it as a single narrative rather than a scattered stream.
get_invocation_logs
Summarize the error patterns in checkout-service over the last 24 hours.
Rather than reading thousands of lines, Claude asks for the clustered view: which distinct failure modes exist, how often each fired, and which ones are already linked to a ticket. It can then drill into any one of them.
get_patterns_summarylist_patternsget_pattern_detail
Which invocations exceeded 5 seconds yesterday, and where did the time go?
Claude pulls yesterday's invocations with their durations, establishes what normal looks like from the percentile stats, then checks whether cold starts explain the slow tail.
get_invocationsget_function_statsget_cold_start_analysis
Compare this failed invocation to a successful one.
Claude fetches a recent success alongside the failure and diffs the two stitched logs — which is usually how you find the input that broke, or the downstream call that never returned.
get_invocationsget_invocation_logs
Trace this request across every function it touched.
Given a correlation ID or X-Ray trace ID, Claude assembles the whole distributed path — every Lambda the request passed through — then reads the logs for whichever hop looks wrong.
get_correlated_invocationsget_invocation_logs
Where is my Lambda spend going, and what should I resize?
Claude breaks spend down by function, pulls the concrete optimization opportunities, and checks memory headroom before recommending a change — so the advice is grounded in your actual allocation-versus-usage numbers.
get_cost_summaryget_cost_optimizationget_memory_analysis
Tip
Name the function in your prompt when you know it. Most tools take 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 MCP Server 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. Hit Test Connection to confirm the endpoint answers — if it reports 21 tools, the server is fine and the problem is on the client side. 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.

No error, but the tools never show up

Almost always the wrong config key. Four clients accept a config that looks right, log nothing, and quietly never connect: Cline · Roo Code falls back to deprecated SSE unless you set "type": "streamableHttp"; Gemini CLI treats url as SSE and needs httpUrl for Streamable HTTP; VS Code nests under servers rather than mcpServers; and Zed uses context_servers. Check yours against the client table, or re-copy the snippet from the AI Tool picker, which emits the right shape for the client you select. If Test Connection succeeds while your client still sees nothing, this is the cause.

Claude Desktop shows nothing after adding the bridge

Two usual causes. Either Claude Desktop wasn't fully quit and reopened — it reads claude_desktop_config.json at launch, so a window reload isn't enough — or Node is missing. mcp-remote runs under npx and needs Node 18 or later; the MCP Server settings tab reports what it found. Also confirm you used the command/args form from the bridge section rather than a url: a remote connector pointed at 127.0.0.1 cannot reach your Mac and never will.

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?

Yes, through a bridge. Claude Desktop's remote connector feature cannot reach the server — those requests are routed through Anthropic's servers, where 127.0.0.1 means Anthropic's machine rather than yours. But Claude Desktop also launches MCP servers as local subprocesses, so running npx -y mcp-remote http://127.0.0.1:47821/mcp as that subprocess relays stdio on one side to LogStitch's HTTP endpoint on the other, with both hops staying on your Mac. It needs Node 18 or later. See Claude Desktop, via a bridge for the exact config.

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. LogStitch ships ready-made setup for ten of them — Claude Code, Cursor, VS Code · Copilot, Cline · Roo Code, Gemini CLI, Codex CLI, Zed, Windsurf, LM Studio and Claude Desktop — in the MCP Server settings tab. For anything else, 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. See the client table for each client's config format.

I followed the instructions and got no error, but no tools either. Why?

Most likely the wrong config key. Every client wants the same URL under a different name, and four of them fail silently rather than complaining: Cline needs "type": "streamableHttp", Gemini CLI needs httpUrl instead of url, VS Code nests under servers instead of mcpServers, and Zed uses context_servers. Pick your client in the AI Tool menu on the MCP Server settings tab and copy the snippet from there — it emits the correct shape for that client.

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.