Search by

datomatic / laravel-mcp-support

trippo

Shared building blocks for Datomatic's Laravel MCP servers: gated routes, audit log, OAuth client deduplication and MCP token lifetimes.

Package info

github.com/datomatic/laravel-mcp-support

pkg:composer/datomatic/laravel-mcp-support

Statistics

Installs: 37

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-30 14:58 UTC

This package is auto-updated.

Last update: 2026-11-30 15:03:34 UTC


README

Shared building blocks for Datomatic's Laravel MCP servers (laravel-database-mcp, laravel-log-mcp). You normally don't require it directly: it is installed as a dependency.

  • McpEndpoint — registers an MCP server over HTTP behind middleware and a can: gate, and defines the gate with a local-only fallback when the application didn't.
  • AuditLog — logs every tool call (user, arguments, outcome, duration) when {config-key}.audit_log.enabled is true.
  • OAuth client deduplication — MCP clients re-register a Passport client on every login; the existing client with the same name is reused instead.
  • MCP token lifetimes — override Passport access/refresh token lifetimes only for tokens carrying the mcp:use scope.

Because these OAuth bindings are app-wide, they live here once instead of in every server package.

Configuration

php artisan vendor:publish --tag=mcp-support-config
Key Env Default
dedupe_oauth_clients MCP_DEDUPE_OAUTH_CLIENTS true
oauth_token_ttl (minutes) MCP_OAUTH_TOKEN_TTL null (Passport default)
oauth_refresh_token_ttl (minutes) MCP_OAUTH_REFRESH_TOKEN_TTL null (Passport default)

The OAuth features require laravel/passport and are ignored without it.

License

MIT.