papertrail-mcp
A read-only MCP server for searching migrated Papertrail logs through the SolarWinds Observability /v1/logs API.
List environments (
papertrail_list_environments): show configured credential profiles without revealing API tokens or base URLs.Get logs (
papertrail_get): make one bearer-authenticated GET to a site-relative/v1/logspath, optionally with query params (arrays sent as repeated params) against a chosen environment (defaults toprod).Follow pagination by passing the exact query returned in
pageInfo.nextPage.Receive bounded output: results are truncated at 2,000 lines or 50 KiB, so large responses may be cut off.
Stay safe: strictly read-only — no writes, no other SolarWinds endpoints, no relative-time parsing, filter composition, or live tailing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@papertrail-mcp search prod logs for authentication failures in the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Papertrail MCP
A focused, read-only Model Context Protocol server for searching migrated Papertrail logs through the SolarWinds Observability API. It runs locally over stdio and works with any stdio-capable MCP client.
Tools
papertrail_list_environmentslists complete credential profiles without exposing API tokens or origins.papertrail_getperforms one bearer-authenticatedGETrequest to/v1/logsfor a selected profile.
The server does not expose writes, other SolarWinds Observability endpoints, relative-time parsing, filter composition, terminal formatting, or live-tail polling. Tool output is limited to 2,000 lines or 50 KiB.
Related MCP server: quickwit-mcp
Requirements
Node.js 20 or newer.
A SolarWinds Observability API Access token and regional public API origin for each Papertrail environment.
Configure profiles with environment variables:
export PAPERTRAIL_QA_API_TOKEN="your-qa-api-access-token"
export PAPERTRAIL_QA_API_BASE_URL="https://api.eu-01.cloud.solarwinds.com"
export PAPERTRAIL_STAGING_API_TOKEN="your-staging-api-access-token"
export PAPERTRAIL_STAGING_API_BASE_URL="https://api.na-02.cloud.solarwinds.com"
export PAPERTRAIL_PROD_API_TOKEN="your-prod-api-access-token"
export PAPERTRAIL_PROD_API_BASE_URL="https://api.na-01.cloud.solarwinds.com"The segment between PAPERTRAIL_ and the suffix becomes the lower-case profile name. Each profile needs both _API_TOKEN and _API_BASE_URL. The base URL must be a bare HTTPS origin for the account's SolarWinds Observability region, not a log-ingestion endpoint. The default profile is prod.
SolarWinds Observability API Access tokens currently have broader account access than this server exposes. Use a distinct token per environment where possible, store tokens as secrets, and never commit them to source control.
Run the published package with:
npx -y @andreimaxim/papertrail-mcpThe process communicates over stdio, so running it directly waits for an MCP client and may appear idle.
Client configuration
Register the server as a stdio MCP server that runs npx -y @andreimaxim/papertrail-mcp. Many clients accept a JSON configuration like this:
{
"mcpServers": {
"papertrail": {
"command": "npx",
"args": ["-y", "@andreimaxim/papertrail-mcp"],
"env": {
"PAPERTRAIL_PROD_API_TOKEN": "${PAPERTRAIL_PROD_API_TOKEN}",
"PAPERTRAIL_PROD_API_BASE_URL": "${PAPERTRAIL_PROD_API_BASE_URL}"
}
}
}
}The exact file location and syntax depend on the client. Make sure the client forwards both PAPERTRAIL_<ENVIRONMENT>_API_TOKEN and PAPERTRAIL_<ENVIRONMENT>_API_BASE_URL for every profile you want to use, and store each _API_TOKEN value in the client's secret storage where available.
Skill
The optional using-papertrail skill teaches an agent how to search logs, follow pagination, and handle sensitive output. Its mcp.json declares the server for clients that let skills bundle MCP servers, so the server starts only when the skill is loaded. Copy the complete skill/using-papertrail directory into your client's skills directory. The bundled configuration forwards the conventional qa, staging, and prod profiles. Add another variable pair to the papertrail.env map in mcp.json when using a custom profile name.
Development
npm install
npm run check
npm pack --dry-runRepository layout:
src/papertrail.ts: profile discovery, URL validation, HTTP transport, redirect safety, and bounded output.src/server.ts: MCP schemas, read-only annotations, and tool handlers.src/index.ts: stdio executable.test/: client and MCP protocol tests.skill/using-papertrail/: optional agent skill.
Available Tools
2 toolspapertrail_getGet Papertrail logsARead-onlyIdempotent
Make one authenticated GET request to the migrated Papertrail logs API at /v1/logs. This tool is read-only and may truncate large output.
Inputs: path (required), query, environment.
papertrail_list_environmentsList Papertrail environmentsARead-onlyIdempotent
List configured Papertrail credential environments without exposing their API tokens or URLs.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have entirely distinct purposes: one lists configured credential environments, the other executes a generic GET request to the Papertrail API. There is no overlap or confusion between them.
Both tools use snake_case and are prefixed with 'papertrail_', but one follows a verb_noun pattern (list_environments) while the other is a bare verb (get). This is mostly consistent but not perfectly uniform.
With only two tools, the server is at the low end of the acceptable range. For its narrow read-only purpose, the minimal set is understandable, but it still feels thin compared to typical MCP servers.
The tool pair covers the essential workflow of identifying an environment and making an authenticated GET request, which is sufficient for basic read-only access. However, there is no dedicated search or pagination tool, though agents can work around this via the generic GET.
Maintenance
Related MCP Connectors
Syslog receiver and MCP server for homelab log intelligence.
Syslog receiver and MCP server for homelab log intelligence.
MCP server for interacting with the Supabase platform
Access New Relic observability data through MCP - query metrics, logs, traces, entities, and more
Related MCP Servers
- AlicenseBqualityDmaintenanceA read-only MCP server for OpenObserve Community Edition that works over the REST API. Provides tools for searching logs, traces, stream schemas, and dashboards - no Enterprise license required.873 PyPI16GPL 3.0
- AlicenseNot gradedqualityFmaintenanceA read-only MCP server that exposes Quickwit log search and aggregations to LLM clients, enabling natural language log investigation.Apache 2.0
- AlicenseAqualityCmaintenanceMinimal MCP server that integrates with Graylog, enabling agents to search, analyze, and inspect log messages across streams, discover fields and streams, and query multiple Graylog instances.580 npm2MIT
- AlicenseAqualityDmaintenanceA read-only MCP server for querying Sumo Logic logs, enabling AI assistants to search and investigate application logs with opinionated tools and secure credential handling.51MIT