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

@legionai/mcp

v2.0.0

Published

Legion MCP Server - OAuth app management and Railway logs access for AI agents

Readme

Legion MCP Server

MCP server for AI agent integration — manage OAuth apps and access deployment logs from Claude Code, Cursor, or Windsurf.

For CLI commands (login, app management, log sources), install @legionai/cli.

Installation

npm install -g @legionai/mcp

Login (requires @legionai/cli)

npm install -g @legionai/cli
legion login

Configuration

Add to your MCP config (e.g., ~/.config/claude/mcp.json):

{
  "mcpServers": {
    "legion": {
      "command": "legion-mcp",
      "env": {
        "LEGION_AUTH_SERVER_URL": "https://auth.legion-ai.org",
        "LEGION_ACCESS_TOKEN": "<your_token>"
      }
    }
  }
}

Available Tools

OAuth App Management (8 tools)

| Tool | Description | |------|-------------| | legion_list_oauth_apps | List all OAuth apps on your account | | legion_get_oauth_app | Get details of an OAuth app by client ID | | legion_create_oauth_app | Create a new OAuth app | | legion_update_oauth_app | Update OAuth app name or redirect URIs | | legion_delete_oauth_app | Delete an OAuth app (revokes all connections) | | legion_rotate_app_secret | Rotate an OAuth app's client secret | | legion_get_oauth_app_stats | Get usage stats (users, tokens, earnings) | | legion_get_oauth_app_transactions | Get transaction history (prompts, costs) |

API Documentation (1 tool)

| Tool | Description | |------|-------------| | legion_get_api_docs | Get full API docs (request format, models, errors) |

Deployment Logs (5 tools)

| Tool | Description | |------|-------------| | legion_list_railway_sources | List connected Railway log sources | | legion_connect_railway_source | Connect a Railway deployment as a log source | | legion_get_deployment_logs | Fetch deployment logs with filters | | legion_get_deployment_errors | Fetch error-level deployment logs only | | legion_disconnect_railway_source | Remove a Railway log source connection |

Usage Example

Once configured, ask your AI agent:

  • "List my OAuth apps and their stats"
  • "Create a new OAuth app called my-saas with redirect URI https://myapp.com/callback"
  • "Check my deployment logs for errors"
  • "Connect my Railway deployment for debugging"

Security

  • All access is authenticated via your Legion account
  • You can only access logs for Railway deployments you've connected
  • Tokens are encrypted at rest
  • Access is rate-limited (30 requests/minute)