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

sourcecraft-mcp-light

v0.2.0

Published

Lightweight Model Context Protocol (stdio) server that exposes the SourceCraft REST API to AI assistants.

Readme

sourcecraft-mcp-light

Lightweight Model Context Protocol (stdio) server that exposes the SourceCraft REST API to AI assistants.

Why

AI assistants integrated into your editor cannot reach SourceCraft directly — so they end up asking you to paste CI logs, PR status, and merge results by hand. This MCP server fixes that by wrapping api.sourcecraft.tech with Bearer-token auth and exposing a small set of tools (plus a generic escape hatch) over stdio. The composite tool sc_run_failure_logs in particular answers "what broke in CI?" in a single round-trip — finds the latest failed run, walks workflows → tasks → cubes to the failure, paginates the log, and returns the tail.

Install

npx -y sourcecraft-mcp-light

Or install globally:

npm install -g sourcecraft-mcp-light

Configure your assistant

You need a SourceCraft personal access token. Set it as SOURCECRAFT_TOKEN.

Claude Desktop / Claude Code

~/.config/claude/claude_desktop_config.json (or the Claude Code MCP settings):

{
  "mcpServers": {
    "sourcecraft": {
      "command": "npx",
      "args": ["-y", "sourcecraft-mcp-light"],
      "env": {
        "SOURCECRAFT_TOKEN": "scp_xxx_your_token_here"
      }
    }
  }
}

Cursor

~/.cursor/mcp.json:

{
  "mcpServers": {
    "sourcecraft": {
      "command": "npx",
      "args": ["-y", "sourcecraft-mcp-light"],
      "env": {
        "SOURCECRAFT_TOKEN": "scp_xxx_your_token_here"
      }
    }
  }
}

Optional: SOURCECRAFT_API_BASE overrides the default https://api.sourcecraft.tech base URL.

Tools

repo arguments take the form org_slug/repo_slug (e.g. elfenmail/ui). PR ids are slugs (or numeric ids) from the SourceCraft UI.

PR / branches

| Name | Method + Path | Purpose | | --- | --- | --- | | sc_pr_list | GET /repos/{org}/{repo}/pulls | List PRs with optional state / source / target / limit filters. | | sc_pr_get | GET /pulls/id:{slug} | Fetch one PR by slug or numeric id. | | sc_pr_create | POST /repos/{org}/{repo}/pulls | Open a PR. Body: title, description, source_branch, target_branch, reviewer_ids, publish (default true). | | sc_pr_merge | POST /pulls/id:{slug}/merge | Merge a PR with boolean flags squash, rebase, delete_branch, force. | | sc_branch_list | GET /repos/{org}/{repo}/branches | List branches with optional filter, sort_by, pagination. |

CI / CD

| Name | Method + Path | Purpose | | --- | --- | --- | | sc_run_list | GET /repos/{org}/{repo}/cicd/runs | List recent runs (each with full workflows → tasks → cubes tree). | | sc_run_get | GET /repos/{org}/{repo}/cicd/runs/{run_slug} | One run, full tree. | | sc_run_logs | GET /repos/{org}/{repo}/cicd/logs/{run}/{wf}/{task}/{cube} | Cube logs for one page. Iterate ?page for long logs. | | sc_run_failure_logs | composite | Killer feature. Finds the most recent failed run (or uses your run_slug), walks to the failed cube, paginates logs to completion, returns the failure chain + tail of the log (capped at max_log_chars, default 8000). One call answers "what broke?". |

Generic + composites

| Name | Purpose | | --- | --- | | sc_request | Generic escape hatch: call any SourceCraft REST endpoint by method + path. Returns { status, body }. | | sc_swagger | Fetch the public or cicd swagger document. Cached in memory. Use to discover endpoints not yet wrapped here. | | sc_release_status | One round-trip overview for a repo: recent PRs (summarized) + available CI/CD paths. Combine with sc_run_failure_logs for full release triage. |

When the swagger changes

The cube logs path and run-tree shape were extracted from the swagger at the time of writing (POST /repos/{org}/{repo}/pulls, GET /repos/{org}/{repo}/cicd/runs, GET /repos/{org}/{repo}/cicd/logs/{run}/{workflow}/{task}/{cube}). If SourceCraft restructures the API, sc_swagger("cicd") will return the new shape (cache flushes on server restart), and sc_request lets the assistant adapt without code changes here.

License

MIT