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

@aaronsb/kg-cli

v0.8.0

Published

Knowledge Graph CLI and MCP server - interact with knowledge graph systems

Readme

@aaronsb/kg-cli

CLI and MCP server for interacting with Knowledge Graph System deployments.

Installation

Global install (requires sudo or npm configured for user-local):

npm install -g @aaronsb/kg-cli

User-local install (no sudo required):

npm install -g @aaronsb/kg-cli --prefix ~/.local

Then ensure ~/.local/bin is in your PATH.

Run without installing:

npx @aaronsb/kg-cli health
npx @aaronsb/kg-cli search "query"

This installs two commands:

  • kg - Command-line interface for the knowledge graph
  • kg-mcp-server - MCP server for AI assistant integration

Quick Start

# Configure your knowledge graph endpoint
kg config set api.url https://kg.example.com/api

# Login
kg login

# Check health
kg health

# Ingest a document
kg ingest document.pdf

# Search concepts
kg search "machine learning"

CLI Commands

| Command | Description | |---------|-------------| | kg health | Check API connection | | kg login | Authenticate with the API | | kg logout | Clear saved credentials | | kg config | View/edit configuration | | kg ingest <file> | Submit document for extraction | | kg search <query> | Search concepts | | kg jobs | List extraction jobs | | kg artifact | Manage artifacts | | kg document | Manage documents |

Run kg --help or kg <command> --help for detailed usage.

MCP Server

The MCP server allows AI assistants (like Claude) to interact with your knowledge graph.

Claude Desktop Configuration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or ~/.config/Claude/claude_desktop_config.json (Linux):

{
  "mcpServers": {
    "knowledge-graph": {
      "command": "npx",
      "args": ["-p", "@aaronsb/kg-cli", "kg-mcp-server"],
      "env": {
        "KG_API_URL": "https://kg.example.com/api",
        "KG_API_TOKEN": "your-token-here"
      }
    }
  }
}

Or if installed globally/user-local (simpler):

{
  "mcpServers": {
    "knowledge-graph": {
      "command": "kg-mcp-server",
      "env": {
        "KG_API_URL": "https://kg.example.com/api",
        "KG_API_TOKEN": "your-token-here"
      }
    }
  }
}

Available MCP Tools

  • search_concepts - Semantic search across the knowledge graph
  • get_concept - Get details about a specific concept
  • list_sources - List ingested documents
  • get_relationships - Find connections between concepts
  • ingest_document - Submit new documents (with approval)

Configuration

Configuration is stored in ~/.config/kg/config.json:

{
  "api": {
    "url": "https://kg.example.com/api"
  },
  "auth": {
    "token": "..."
  }
}

Or use environment variables:

  • KG_API_URL - API endpoint
  • KG_API_TOKEN - Authentication token

Requirements

  • Node.js 18+
  • A running Knowledge Graph System instance

Shell Alias (optional)

If using npx, add an alias to your shell profile:

alias kg='npx @aaronsb/kg-cli'

Links

License

MIT