The missing TypeScript SDK for Laravel Forge — plus an MCP server for AI agents.
The official Forge SDK exists only in PHP. This project fills the gap with a fully-typed TypeScript SDK and an MCP server that puts every Forge endpoint in the hands of AI agents.
| Package | Description |
|---|---|
@studiometa/forge-sdk |
Fluent, chainable TypeScript SDK for Laravel Forge |
@studiometa/forge-cli |
CLI tool for managing Forge servers, sites, and more |
@studiometa/forge-mcp |
MCP server for Claude Desktop and other MCP clients |
@studiometa/forge-core |
Shared business logic — executor functions with DI |
@studiometa/forge-api |
Internal API client, types, config, and rate limiter |
npm install -g @studiometa/forge-cli# Save your API token
forge config set YOUR_FORGE_TOKEN
# List all servers
forge servers list
# List sites on a server
forge sites list --server 123
# Deploy a site
forge deployments deploy --server 123 --site 456
# Get JSON output (for scripting and AI agents)
forge servers list --format jsonnpm install @studiometa/forge-sdkimport { Forge } from "@studiometa/forge-sdk";
const forge = new Forge("your-api-token");
// List all servers
const servers = await forge.servers.list();
// Deploy a site
await forge.server(123).site(456).deploy();
// Get environment variables
const env = await forge.server(123).site(456).env.get();
// Manage databases
const dbs = await forge.server(123).databases.list();npm install -g @studiometa/forge-mcpAdd to your Claude Desktop config:
{
"mcpServers": {
"forge": {
"command": "forge-mcp",
"env": {
"FORGE_API_TOKEN": "your-api-token"
}
}
}
}Two tools with a clear safety split:
forge— read-only operations (list,get,resolve,context,help,schema) — auto-approvableforge_write— write operations (create,update,delete,deploy,reboot,restart,activate,run,batch, etc.) — always requires confirmation
Key MCP features:
- Auto-resolve — pass a server/site name instead of a numeric ID and the MCP server resolves it automatically
- Batch operations — use the
batchresource to run multiple actions in a single tool call - Context dump — the
contextaction returns a structured snapshot of your Forge account for fast AI reasoning
For a read-only setup (no writes possible), use "args": ["--read-only"] or FORGE_READ_ONLY=true.
- Log into Laravel Forge
- Go to Account → API Tokens
- Create a new token with the scopes you need
- Copy the token (it's only shown once)
- Node.js 18+ (SDK and API packages)
- Node.js 24+ (for development)
- Laravel Forge account with API access
forge-api → (nothing) # HTTP client, types, config, rate limiter
forge-sdk → forge-api # Fluent chainable SDK (the hero package)
forge-core → forge-api # Executors with DI for MCP and CLI
forge-mcp → forge-core # MCP server (stdio transport)
forge-cli → forge-core # CLI tool (human + AI agent use)
→ forge-api
See CONTRIBUTING.md.
MIT © Studio Meta