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

@studiometa/forge-mcp

v0.3.0

Published

MCP server for Laravel Forge — Model Context Protocol integration for AI agents

Readme

@studiometa/forge-mcp

npm version License: MIT

MCP (Model Context Protocol) server for Laravel Forge. Enables Claude Desktop and other MCP clients to manage servers, sites, deployments, and more through natural language.

Features

  • Two tools with clear safety splitforge (read) and forge_write (write)
  • MCP clients auto-approve forge reads, always prompt for forge_write writes
  • Resource/action routing from centralized constants
  • Built-in help system — action=help for any resource
  • Stdio and Streamable HTTP transports
  • Configuration tools for interactive token setup

Installation

npm install -g @studiometa/forge-mcp

Claude Desktop Configuration

Add to your Claude Desktop config:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "forge": {
      "command": "forge-mcp",
      "env": {
        "FORGE_API_TOKEN": "your-api-token"
      }
    }
  }
}

Alternatively, omit the env block and ask Claude to configure credentials using the forge_configure tool.

Read-Only Mode

To guarantee no write operations are possible at the server level:

{
  "mcpServers": {
    "forge": {
      "command": "forge-mcp",
      "args": ["--read-only"],
      "env": {
        "FORGE_API_TOKEN": "your-api-token"
      }
    }
  }
}

Or via environment variable: FORGE_READ_ONLY=true.

When enabled, the forge_write tool is not registered at all — only forge, forge_configure, and forge_get_config are available.

Tools

forge — Read Operations

Safe, read-only queries. Annotated readOnlyHint: true so MCP clients can auto-approve.

Actions: list, get, resolve, context, help, schema

{ "resource": "servers", "action": "list" }
{ "resource": "servers", "action": "get", "id": "123" }
{ "resource": "sites", "action": "list", "server_id": "123" }
{ "resource": "servers", "action": "help" }
{ "resource": "servers", "action": "resolve", "query": "prod" }
{ "resource": "servers", "action": "context", "id": "123" }
{ "resource": "sites", "action": "context", "server_id": "123", "id": "456" }
{ "resource": "batch", "action": "run", "operations": [{ "resource": "servers", "action": "list" }, { "resource": "recipes", "action": "list" }] }

forge_write — Write Operations

Mutating operations. Annotated destructiveHint: true so MCP clients always prompt for confirmation.

Actions: create, update, delete, deploy, reboot, restart, activate, run

{ "resource": "deployments", "action": "deploy", "server_id": "123", "site_id": "456" }
// deploy blocks until complete, returning: status, deployment log, elapsed time
{ "resource": "servers", "action": "reboot", "id": "123" }
{ "resource": "daemons", "action": "create", "server_id": "123", "command": "php artisan queue:work" }

Resources & Actions

| Resource | Read Actions | Write Actions | Required Fields | | --------------- | --------------------------- | ------------------------ | -------------------------- | | servers | list, get, resolve, context | create, delete, reboot | id (for get/delete/reboot) | | sites | list, get, resolve, context | create, delete | server_id | | deployments | list, get | deploy, update | server_id, site_id | | env | get | update | server_id, site_id | | nginx | get | update | server_id, site_id | | certificates | list, get | create, delete, activate | server_id, site_id | | databases | list, get | create, delete | server_id | | database-users | list, get | create, delete | server_id | | daemons | list, get | create, delete, restart | server_id | | firewall-rules | list, get | create, delete | server_id | | ssh-keys | list, get | create, delete | server_id | | security-rules | list, get | create, delete | server_id, site_id | | redirect-rules | list, get | create, delete | server_id, site_id | | monitors | list, get | create, delete | server_id | | nginx-templates | list, get | create, update, delete | server_id | | scheduled-jobs | list, get | create, delete | server_id | | backups | list, get | create, delete | server_id | | commands | list, get | create | server_id, site_id | | recipes | list, get | create, delete, run | id (for get/delete/run) | | user | get | — | — | | batch | run | — | operations array |

Auto-Resolve: Names Instead of IDs

The server_id and site_id fields accept names in addition to numeric IDs. When a non-numeric value is provided, it is resolved automatically via partial, case-insensitive match against the list of resources.

  • server_id: "prod" → resolves to the server whose name contains "prod" (must be unique)
  • site_id: "example" → resolves to the site whose domain contains "example" (requires server_id)

Use action: "resolve" explicitly when you want to search before committing to an ID:

{ "resource": "servers", "action": "resolve", "query": "prod" }
{ "resource": "sites", "action": "resolve", "server_id": "123", "query": "example" }

Resolution fails (and returns an error) when the query matches zero or more than one resource — in that case, use the numeric ID directly.

Discovery

Use action: "help" with any resource, or action: "context" to fetch a resource and all its sub-resources in one call:

{ "resource": "servers", "action": "help" }
{ "resource": "deployments", "action": "help" }
{ "resource": "servers", "action": "context", "id": "123" }
{ "resource": "sites", "action": "context", "server_id": "123", "id": "456" }

Use resource: "batch" to fan out multiple reads in a single round-trip (max 10 operations):

{
  "resource": "batch",
  "action": "run",
  "operations": [
    { "resource": "servers", "action": "list" },
    { "resource": "sites", "action": "list", "server_id": "123" },
    { "resource": "recipes", "action": "list" }
  ]
}

Stdio-Only Tools

| Tool | Description | | ------------------ | ---------------------------------- | | forge_configure | Save API token to local config | | forge_get_config | Show current config (token masked) |

Audit Logging

All write operations (forge_write tool calls) are automatically logged for traceability:

  • Default path: ~/.config/forge-tools/audit.log
  • Override: Set FORGE_AUDIT_LOG environment variable
  • Format: JSON lines (via pino) with timestamp, resource, action, sanitized args, and status
  • Safety: Logging never interrupts operations — silent on failure

The CLI also logs write commands to the same audit log.

Getting Your API Token

  1. Log into Laravel Forge
  2. Go to Account → API Tokens
  3. Create a new token with the scopes you need
  4. Copy the token (it's only shown once)

License

MIT © Studio Meta