Laravel Forge MCP Server

by bretterer

192 downloads
Not rated
GitHub

About

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

Details

Author
bretterer
Downloads
192
Categories
Other, AI

- List and get details of Laravel Forge servers
- Manage sites (list, get, deploy, update scripts)
- Deploy sites and toggle quick deploy
- View deployment history and reset deployment state
- Reboot servers and check server load
- Use all tools via simple MCP tool calls

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Laravel Forge MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the npm package, set the FORGE_API_KEY environment variable with your Laravel Forge API key, then run npx forge-mcp-server or import the server programmatically into your Node.js project. The server exposes a set of tools that can be called by an MCP-compatible client.

forge_auth

Authenticate with the RightNow Forge GPU kernel optimization service. Opens the user's browser to sign in via the RightNow dashboard. Required before using any other Forge tools. If valid tokens already exist, verifies them without opening the browser.

forge_credits

Check your current Forge credit balance. Each single-GPU optimization costs 1 credit. Credits are only charged for successful optimizations (speedup >= 1.1x). Credits are lifetime (not monthly) and can be purchased on the dashboard.

forge_optimize

Submit PyTorch code to Forge for GPU kernel optimization. Forge generates optimized Triton or CUDA kernels, evaluates them on real H100/A100 GPUs, and returns the best result with speedup metrics over torch.compile(max-autotune). USE THIS TOOL WHEN YOU SEE: - PyTorch custom operations (torch.autograd.Function, custom forward/backward) - Manual CUDA kernels that could be faster - Performance-critical tensor operations (attention, convolution, normalization, softmax) - Code with comments like "slow", "bottleneck", "optimize", "performance" - torch.compile() targets or triton.jit kernels - Any nn.Module with significant compute in forward() - Matrix multiplication, reduction, or scan operations - Custom loss functions with reduction operations - Fused operation opportunities (e.g., LayerNorm + activation) The tool streams real-time progress and blocks until optimization completes (1-10 minutes). Cost: 1 credit per optimization (only charged if speedup >= 1.1x). Requires authentication via forge_auth first.

forge_generate

Generate an optimized GPU kernel from scratch based on a specification. Use this when you need to create a new high-performance kernel without existing PyTorch code. Forge will generate a PyTorch baseline first, then optimize it into Triton or CUDA. Requires authentication via forge_auth first. Cost: 1 credit per generation.

forge_status

Check the current status of a running or completed Forge optimization job.

forge_cancel

Cancel a running Forge optimization job. Credits may be refunded if less than 20% of iterations completed.

forge_sessions

List past Forge optimization sessions with their results. Useful for checking what has already been optimized.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "laravel forge mcp server": {
            "forge-mcp-server": {
                "command": "npx",
                "args": [
                    "forge-mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "forge-mcp-server": {
        "command": "npx",
        "args": [
            "forge-mcp-server"
        ]
    }
}

Laravel Forge MCP Server

A Model Context Protocol (MCP) server for interacting with Laravel Forge API. This server enables AI assistants to manage Laravel Forge servers, sites, and deployments.

Features

- List and get details of Laravel Forge servers
- Manage sites on Laravel Forge servers
- Deploy sites and manage deployment scripts
- Toggle quick deploy functionality
- View deployment history
- Reboot servers and check server load

Installation

npm install @bretterer/forge-mcp-server

Usage

Prerequisites

You need a Laravel Forge API key to use this server. You can get one from your Laravel Forge account settings.

Environment Variables

Set your Laravel Forge API key as an environment variable:

export FORGE_API_KEY=your_forge_api_key

Running the Server

npx forge-mcp-server

Or add it to your project:

import { ForgeServer } from '@bretterer/forge-mcp-server';

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

Available Tools

The MCP server provides the following tools:

- list_servers - List all Laravel Forge servers
- get_server - Get details of a specific server
- list_sites - List all sites on a server
- get_site - Get details of a specific site
- deploy_site - Deploy a site
- get_deployments - Get deployment history for a site
- get_deployment_script - Get the deployment script for a site
- update_deployment_script - Update the deployment script for a site
- toggle_quick_deploy - Enable or disable quick deploy for a site
- reboot_server - Reboot a server
- get_server_load - Get server load metrics
- reset_deployment_state - Reset deployment state for a site

Development

Setup

git clone https://github.com/bretterer/forge-mcp-server.git
cd forge-mcp-server
npm install

Build

npm run build

Run in Development Mode

npm run dev

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.