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.
php artisan nimbus:mcp --install --writeThe 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
| Tool | What it does |
|---|---|
list_applications | Lists the applications and their settings. |
list_routes | Lists and filters routes. |
describe_route | Returns the request schema and the required fields of a route. |
build_payload | Builds a valid, minimal or invalid sample body. |
validate_payload | Checks a body against the schema of a route. |
decrypt_value | Decrypts a cookie or a value made by encrypt() with the application key. |
list_environments | Lists the environments requests can be sent to. |
send_request | Sends 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_requests | Lists the requests saved in the workspace. |
run_request | Sends a saved request. It uses the same safety rules as send_request. |
save_request | Saves a new request file. Credential headers are refused, and an existing file is never replaced. |
explain_response | Reports 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.
| Prompt | What it asks the agent to do |
|---|---|
smoke_test_route | Describe a route, build a valid payload, send it, and report the result. |
check_validation | Break 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.
| Level | What the agent can do |
|---|---|
read | List routes, read schemas, build and check payloads, decrypt values, list saved requests. |
send | Also send requests, run saved requests and explain responses. This is the default. |
write | Also save request files in the workspace. |
Safety rules for send
- A request that is not
GETorHEADruns in a database transaction that is rolled back, on every connection. Setmcp.allow_committed_writestotrueto keep the changes. An agent cannot turn this off. - Requests go to the current host only. Set
mcp.allow_remote_environmentstotrueto allow the environments from theenvironmentsoption. These requests use thehttpdriver.
Drivers
The mcp.driver option sets how a request is sent.
| Driver | How it works |
|---|---|
process | Runs the request without a running server. This is the default. |
http | Sends the request over HTTP. It needs a running server. |