What is MCP?
The Model Context Protocol (MCP) is an open standard that allows AI assistants (such as Claude Desktop, Cursor, and Claude Code) to securely discover and invoke tools in external applications. Geni turns your Laravel application into a fully autonomous, AI-ready toolkit:- Zero-Effort Tool Discovery (
tools/list): Every documented route becomes an AI tool with strictly typed parameter schemas derived directly from your Form Requests, Data DTOs, and migrations. - Autonomous Action Execution (
tools/call): AI agents can execute real actions against your app. You can ask an agent: “Find user alex@example.com and update their role to admin”, and the agent will discoverGET /api/usersand dispatchPATCH /api/users/{id}on its own. - Isolated Authentication: Bearer tokens and API keys are injected at the HTTP layer and never exposed in the OpenAPI document or prompt context.
Live Stdio Server
Run
php artisan geni:mcp:serve for local AI clients like Claude Desktop or Claude Code.HTTP Remote Endpoint
Access
GET / POST on /docs/api/mcp for cloud AI agents and webhooks.Running the Live MCP Server
Geni includes a built-in stdio MCP server command:tools/list: Returns all available endpoints formatted as tool definitions.tools/call: Dispatches HTTP requests to your application and returns structured responses.
Connecting to Claude Desktop
Add Geni to yourclaude_desktop_config.json:
claude_desktop_config.json
Generating Static Manifests
You can also export an MCP tool manifest or client configuration to a file:HTTP MCP Endpoint
Geni also serves an HTTP MCP discovery endpoint at/docs/api/mcp:
GET /docs/api/mcp: Returns tool definitions as JSON.POST /docs/api/mcp: Executes tools calls via HTTP JSON-RPC.
Security & Authentication
Configure token injection inconfig/geni.php:
config/geni.php