Skip to content

MCP server ​

Nimbus can give an AI agent access to your routes and their request schemas, and let it send requests safely. The server runs only in the environments listed in allowed_envs.

Install ​

Run this command in your application.

Terminal
php artisan nimbus:mcp --install --write

The command adds a nimbus entry to .mcp.json in your project root. Agents that read .mcp.json start the server on their own with php artisan nimbus:mcp. Leave out --write to print the entry and copy it yourself.

HTTP transport ​

The server can also run over HTTP, for clients that cannot start a process. Set mcp.http to true in config/nimbus.php. It accepts requests from the local machine only, and it follows the allowed_envs option like the rest of Nimbus.

Tools ​

ToolWhat it does
list_applicationsLists the applications and their settings.
list_routesLists and filters routes.
describe_routeReturns the request schema and the required fields of a route.
build_payloadBuilds a valid, minimal or invalid sample body.
validate_payloadChecks a body against the schema of a route.
decrypt_valueDecrypts a cookie or a value made by encrypt() with the application key.
list_environmentsLists the environments requests can be sent to.
send_requestSends a request and returns the response. Global headers that use a generator such as $uuid are not added, so the agent has to provide them.
list_saved_requestsLists the requests saved in the workspace.
run_requestSends a saved request. It uses the same safety rules as send_request.
save_requestSaves a new request file. Credential headers are refused, and an existing file is never replaced.
explain_responseReports the likely cause of a response, with evidence such as the exception, the validation errors and the logs.

Resources and prompts ​

The resource nimbus://workspace/requests/{id} returns a saved request file. Use the request id.

PromptWhat it asks the agent to do
smoke_test_routeDescribe a route, build a valid payload, send it, and report the result.
check_validationBreak one rule at a time and report which rules the application enforces.

Levels ​

The mcp.level option in config/nimbus.php sets what an agent may do. Each level includes the ones before it.

LevelWhat the agent can do
readList routes, read schemas, build and check payloads, decrypt values, list saved requests.
sendAlso send requests, run saved requests and explain responses. This is the default.
writeAlso save request files in the workspace.

Safety rules for send ​

  • A request that is not GET or HEAD runs in a database transaction that is rolled back, on every connection. Set mcp.allow_committed_writes to true to keep the changes. An agent cannot turn this off.
  • Requests go to the current host only. Set mcp.allow_remote_environments to true to allow the environments from the environments option. These requests use the http driver.

Drivers ​

The mcp.driver option sets how a request is sent.

DriverHow it works
processRuns the request without a running server. This is the default.
httpSends the request over HTTP. It needs a running server.