Get the FREE Ultimate OpenClaw Setup Guide →

forge

Laravel Forge MCP server for managing servers, sites, and deployments

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio bretterer-forge-mcp-server npx -y @bretterer/forge-mcp-server \
  --env FORGE_API_KEY="Your Laravel Forge API key"

How to use

The Laravel Forge MCP Server exposes a set of tools that allow an AI assistant to interact with your Laravel Forge account. Through these tools you can list and inspect servers, manage sites, deploy sites, view deployment histories, and handle deployment scripts. The server integrates with Forge via your API key, enabling programmatic control of Forge resources such as servers and sites, as well as deployment operations and server health checks. Use the provided tools to retrieve information, perform actions, and monitor deployment activity within your automation workflows.

Available tools include listing servers and sites, retrieving details for a specific server or site, deploying a site, and managing deployment scripts. You can toggle quick deploy for a site, reboot a server, and fetch server load metrics. There is also functionality to reset deployment state for a site, which can be useful after a failed or interrupted deployment. When using these tools, supply the appropriate identifiers (server ID, site ID, or deployment script) as required by each command.

How to install

Prerequisites:

  • Node.js and npm installed on your machine or in your environment
  • Access to a Laravel Forge account with an API key

Installation steps:

  1. Install the MCP server package from npm:
npm install @bretterer/forge-mcp-server
  1. Obtain your Forge API key from your Laravel Forge account settings and set it in your environment:
export FORGE_API_KEY=your_forge_api_key
  1. Run the MCP server using npx (or install locally and run the CLI):
npx forge-mcp-server
  1. (Optional) If you prefer to use it as a module in code, you can instantiate and run the server as shown in the repository examples:
import { ForgeServer } from '@bretterer/forge-mcp-server';

const server = new ForgeServer();
server.run().catch(console.error);

Additional notes

Environment variables:

  • FORGE_API_KEY: Your Laravel Forge API key. This is required for authenticating with Forge.

Common issues:

  • If you see authentication errors, double-check that FORGE_API_KEY is correct and has the necessary permissions.
  • Ensure network access to forge.laravel.com from the environment where the MCP server runs.
  • When upgrading the package, review breaking changes in tool names or payload formats and adjust your usage accordingly.

Configuration options:

  • You can run the server via npx or integrate it into your project as a module. The mcp_config supports the npx-based startup with env vars as shown above.

Related MCP Servers

Sponsor this space

Reach thousands of developers