Skip to content
nejcc edited this page Jul 7, 2026 · 2 revisions

MCP for AI agents

If laravel/mcp is installed, the package registers a local MCP server named minimax, so AI coding agents (Laravel Boost, Claude Code, Codex, …) can read the Minimax API directly.

It ships three read-only tools:

Tool Arguments Returns
list-organisations Every org id + name the user can access.
list-resource resource, org_id? Rows from any org-scoped endpoint.
find-record resource, id, org_id? A single record by id.

Each call uses the configured MINIMAX_ORG_ID unless you pass org_id.

Start it

php artisan mcp:start minimax

Wire it into a client

Add the server to your MCP client config (.mcp.json / Claude Code):

{
  "mcpServers": {
    "minimax": {
      "command": "php",
      "args": ["artisan", "mcp:start", "minimax"]
    }
  }
}

Pair it with MINIMAX_FAKE=true to let an agent explore the API shape with no credentials.

Expose it over HTTP (optional)

The server is local (stdio) by default. To also serve it over HTTP for remote clients, publish the routes and uncomment the Mcp::web(...) line — protect it with auth middleware:

php artisan vendor:publish --tag=minimax-ai-routes

Why read-only?

Write operations (issuing invoices, creating customers) have side effects, so they are intentionally left out of the MCP surface. Use the SDK in your own code for those.

Clone this wiki locally