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

axi-mcp-proxy

v0.4.0

Published

Composable MCP proxy with Nickel configuration

Readme

axi-mcp-proxy

A composing MCP proxy that makes it easy to build tools that follow Axi design principles. You declare composite tools in a Nickel config file, and the proxy handles fan-out, parallelism, TOON formatting, aggregation, and next-step suggestions — enforced by Nickel contracts that reject invalid configs at eval time before the proxy even starts.

Why

Raw MCP tool output is verbose JSON that burns through agent context windows. Axi defines principles for token-efficient, agent-friendly tool output. This proxy enforces several of those principles structurally:

| Principle | How | |---|---| | Token-efficient output | All configured tool output goes through the TOON formatter | | Pre-aggregates | Nickel contract requires non-empty aggregates | | Empty states | Nickel contract requires empty_message | | Next steps | Nickel contract requires non-empty next_steps | | Consistent help | Nickel contract requires description; help text is auto-generated from config | | Content first | Tools run by default; help only returned when help: true is explicitly passed | | Structured errors | All errors use MCP ToolResultError consistently |

Quick start

Run via npx/bunx (no build required):

npx axi-mcp-proxy --config config.ncl

Or build from source:

cargo build --release
./target/release/axi-mcp-proxy --config config.ncl

Nickel configs (.ncl) are validated against Axi contracts at eval time. The Nickel evaluator is linked in-process via nickel-lang-core. The axi.ncl contracts are embedded in the binary, so import "axi.ncl" works everywhere.

Use with Claude Code

Add a .mcp.json to your project root:

{
  "mcpServers": {
    "my-proxy": {
      "type": "stdio",
      "command": "npx",
      "args": ["axi-mcp-proxy", "--config", "my-config.ncl", "--transport", "stdio"]
    }
  }
}

Then restart Claude Code — your composite tools will appear alongside built-in tools.

Example

Define a composite tool that fans out to multiple upstream calls:

let axi = import "axi.ncl" in
{
  upstreams = {
    github = {
      cmd = "gh",
      args = ["mcp"],
    },
  },
  tools = {
    repo_context = {
      description = "Open PRs, CI status, and assigned issues at a glance",
      parameters = [
        { name = "owner", type = "string", description = "Repo owner", required = true },
        { name = "repo",  type = "string", description = "Repo name",  required = true },
      ],
      steps = [
        {
          name = "prs",
          upstream = "github",
          tool = "list_pull_requests",
          args = { owner = "$param.owner", repo = "$param.repo", state = "open", per_page = 10 },
          transform = { pick = ["number", "title", "user.login", "updated_at"] },
        },
        {
          name = "issues",
          upstream = "github",
          tool = "list_issues",
          args = { owner = "$param.owner", repo = "$param.repo", state = "open", per_page = 10 },
          transform = { pick = ["number", "title", "labels", "updated_at"] },
        },
      ],
      aggregates = [
        { label = "open PRs",    value = "count($step.prs)" },
        { label = "open issues", value = "count($step.issues)" },
      ],
      next_steps = [
        { command = "repo_context {owner} {repo}", description = "refresh repo overview" },
      ],
      empty_message = "No open PRs or issues found.",
    },
  },
} | axi.Config

The proxy fans out both steps in parallel and returns TOON-encoded output:

3 open PRs | 2 open issues

[3]{login,number,title,updated_at}:
  alice,42,Fix auth timeout,2026-04-10T12:00:00Z
  bob,41,Add retry logic,2026-04-09T08:30:00Z
  carol,40,Update deps,2026-04-07T15:00:00Z

[2]{labels,number,title,updated_at}:
  [bug],18,Flaky CI,2026-04-10T09:00:00Z
  [enhancement],15,Add dark mode,2026-04-08T11:00:00Z

→ repo_context {owner} {repo} — refresh repo overview

Key concepts

  • Steps declare upstream tool calls with a dependency DAG (depends_on). Independent steps run in parallel.
  • Transforms (pick, rename, filter) trim upstream responses before output.
  • Aggregates (count(...), sum(...)) produce the summary line at the top.
  • Next steps guide the agent toward follow-up actions.
  • TOON encoding compresses arrays of uniform objects into tabular form, cutting token usage vs raw JSON.
  • ${ENV_VAR} syntax in auth fields expands environment variables at startup.
  • A built-in list_upstream_tools tool is always available for upstream discovery.

Credits

Based on Axi by @kunchenguid.

Development

Prerequisites

Install coverage tooling for the pre-push hook:

cargo install cargo-llvm-cov
rustup component add llvm-tools-preview

Running coverage locally

cargo llvm-cov --fail-under-lines 90

This runs all tests with LLVM instrumentation and fails if line coverage drops below 90%.