npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@svasimahmed283/splunk-platform-mcp

v0.1.2

Published

Model Context Protocol server for Splunk: SPL search, dashboards (Studio + Classic), reports, and alerts via management REST—browser SSO cookies, ACL-aware reads/writes, documentation-first authoring.

Readme

splunk-platform-mcp

A Model Context Protocol (MCP) server for reading and building Splunk dashboards. It talks to the Splunk management REST API (data/ui/views) as you — via browser SSO cookies — so Splunk's own permissions decide what you can see and edit. It supports both Dashboard Studio (JSON) and Classic (Simple XML) dashboards, checks your edit access before updating, and always creates new dashboards under your own profile.

It also enforces a documentation-first workflow: the write tools require you to confirm you consulted the official Splunk docs before authoring SPL or a dashboard definition.

How it works

  • Auth: Complete SSO once in a browser (splunk_login); cookies are saved and reused for REST calls. Cookies carry your identity, so all reads/writes are ACL-enforced by Splunk. (Auth is SSO-cookie only — there is no token mode.)
  • Reach: REST is reached through the web tier proxy path ({base}/{locale}/splunkd/__raw/..., SSO-cookie friendly) with a fallback to the management port (:8089). The server probes which works and caches it. Pin it with SPLUNK_REST_MODE=proxy|mgmt.
  • Read: list_dashboards, get_dashboard return only what your account can see.
  • Access check: check_dashboard_access reads the ACL and reports can_write.
  • Write: create_dashboard creates under your username (private by default); update_dashboard re-checks can_write and refuses if Splunk denies write.

Tools

| Tool | Purpose | |------|---------| | splunk_login | Browser SSO; save cookies for REST. | | splunk_docs | Return official Splunk doc references (topic: spl/studio/classic/report/alert/rest). Use before authoring. | | whoami | Show the Splunk user the session runs as (create owner). | | query_splunk | Run an SPL search and return results (runs as you). | | list_dashboards | List dashboards you can see; filter by app/owner/name. | | get_dashboard | Full definition + ACL + detected format for one dashboard. | | check_dashboard_access | Report whether you can edit a dashboard before trying. | | create_dashboard | Create a new dashboard under your profile (Studio or Classic). Requires docsConsulted:true. | | update_dashboard | Update an existing dashboard; refuses if can_write=false. Requires docsConsulted:true. | | list_reports / get_report | List / read reports (saved searches). | | create_report / update_report | Create under your profile / update (access-checked). Requires docsConsulted:true. | | list_alerts / get_alert | List / read alerts (scheduled triggering saved searches). | | create_alert / update_alert | Create under your profile / update (access-checked). Requires docsConsulted:true. |

There is intentionally no delete tool — this server does not delete dashboards, reports, or alerts.

Reports and alerts

Both are Splunk saved/searches objects. A report is a saved search (optionally scheduled via cron). An alert is a scheduled saved search with a trigger condition (number of results / hosts / sources / custom), a comparator and threshold, and optional actions. New reports/alerts are created under your profile.

Search

query_splunk runs SPL via search/jobs/export (runs as you; Splunk enforces data access). Consult splunk_docs (topic spl) before composing queries — SPL is version-specific.

Session keep-alive

While the server runs, a background loop pings a lightweight REST endpoint to keep your Splunk session warm and warns early (on stderr) if the SSO cookie goes stale. Interval: SPLUNK_KEEPALIVE_SECONDS (default 240; 0 disables). Note: SSO cookies cannot be renewed headlessly — when the session truly expires, run splunk_login again. The client re-reads the cookie file on every request, so re-logging in another window is picked up with no restart.

Documentation-first policy

Any agent using this server must read the relevant Splunk docs before writing SPL or a dashboard definition, then pass docsConsulted: true (and a docsReference) to the write tools. The tools refuse writes without it. See .kiro/steering/splunk-platform-authoring.md. This protects accuracy — SPL and the dashboard schemas are version-specific and must not be guessed.

Setup

npm install
npm run install-browser   # one-time: Chromium for Playwright SSO

Configure via your MCP client (mcp.json) env block, or a local .env (see .env.example). Minimum:

SPLUNK_BASE_URL=https://splunk.<your-org>.com

Then, in your client, run the splunk_login tool (or npm run login) and complete SSO in the window that opens.

Example mcp.json entry

{
  "mcpServers": {
    "splunk-platform": {
      "command": "node",
      "args": ["c:/MCP Projects/splunk-platform-mcp/src/index.js"],
      "env": {
        "SPLUNK_BASE_URL": "https://splunk.example.com"
      }
    }
  }
}

Then run the splunk_login tool (or npm run login) and complete SSO. Auth is SSO-cookie only.

Validate

npm run validate            # syntax + config (no network)
npm run validate -- --probe # live: whoami + sample read (after completing login)
npm test                    # unit tests (format detection, docs gate)

Notes

  • Reading works with any authenticated account. Writing requires your Splunk role to allow it (e.g. the edit_view capability and write access to the target app). If your account is read-only, create/update will be refused by Splunk's ACL — the tools surface that clearly rather than failing with a raw 403.
  • New dashboards are created private (owned by you). Change sharing in Splunk if others need access.

npm

Package name: @svasimahmed283/splunk-platform-mcp. Install or run via MCP:

"args": ["-y", "@svasimahmed283/[email protected]"]

Repository: Wasim-Shaikh25/splunk-platform-mcp.