MCP integration
Thesanvex/mcp package exposes Sanvex drivers as an MCP server for IDE agents and other MCP clients.
Install
Stdio server
Start the MCP server over stdin/stdout (one JSON-RPC message per line):HTTP SSE (optional)
Enable HTTP transport in.env:
Available tools
Run script tool
RunScriptTool is disabled by default because it uses eval. Only enable in trusted environments:
Tenancy note
The bundledJsonRpcServer uses global resolveDriver() — no for($owner) path. Multi-tenant apps should handle owner context in application code or custom MCP tooling.
See Tenancy.
Related
- Laravel AI integration — alternative for Laravel AI SDK agents
- Usage — direct PHP driver calls
