Download the PHP package veda-ai/laravel-client without Composer
On this page you can find all versions of the php package veda-ai/laravel-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-client
sveda-laravel-sdk
Laravel SDK for integrating your application with Sveda without writing your own MCP server.
Docs: sveda.dev/docs/hosts/laravel
Packagist: sveda-ai/laravel-sdk
Install
sveda-ai/php-sdk is pulled in transitively. The service provider is auto-discovered.
Minimal .env:
How it fits together
The package registers both endpoints for you:
POST /sveda/session(namedsveda.session, middlewareweb+auth) — mints an embed session for the authenticated user.POST /mcp/sveda— the MCP server the sidecar calls to list and execute your tools.
Define a tool
mode() is metadata: read is annotated read-only, delete destructive, everything else a non-destructive write. domain() groups tools in the UI.
Register tools and access rules
In a service provider:
Render the chat
The component posts to route('sveda.session') and renders the iframe. Override the endpoints when needed:
Configuration
| Key | Default | Purpose |
|---|---|---|
base_url |
— | Sidecar URL (SVEDA_CLIENT_BASE_URL) |
host_api_key |
— | Host key the sidecar expects (SVEDA_CLIENT_HOST_API_KEY) |
mcp.path |
/mcp/sveda |
MCP endpoint path |
mcp.server_name / mcp.server_version |
Host Application / 0.1.0 |
Reported in MCP initialize |
mcp.instructions |
generic text | Server instructions sent to the model with your tool list |
mcp.ability |
sveda:mcp |
Sanctum ability required on MCP tokens |
mcp.token_ttl_seconds |
3600 |
MCP token lifetime |
mcp.throttle |
120,1 |
Rate limit for the MCP endpoint |
session.enabled |
true |
Set false to register your own session route |
session.path / session.name |
/sveda/session / sveda.session |
Session endpoint |
session.middleware |
['web', 'auth'] |
Use ['auth:sanctum'] for token-based APIs |
session.visitor_prefix |
host |
Default visitor id prefix |
Agent introspection
Dump registered host tools as JSON (sveda.host/v1) — the same tool payloads MCP exposes via tools/list:
Schema id: sveda.host/v1 (fields: sdk, subject, hooks, tools with MCP inputSchema and _meta).
With your app running and an authenticated session, playground apps also expose GET /sveda/tools for the current user.
Troubleshooting
- Chat renders but the model never calls tools. Check
php artisan route:listformcp/sveda; make sureresolveToolsUsingruns in a booted provider; describe when to call each tool indescription()— the description is the model's prompt. - 401 on
/mcp/sveda. The sidecar sends the Sanctum token minted at session start; tokens expire aftermcp.token_ttl_seconds. New chat session = new token. - 404 on session start.
SVEDA_CLIENT_BASE_URL/SVEDA_CLIENT_HOST_API_KEYare not configured, or the sidecar is down. route('sveda.session')not defined. You setsession.enabled=false; register your own route pointing toStartSidecarSessionController.
License
Apache License 2.0. See LICENSE.
All versions of laravel-client with dependencies
illuminate/contracts Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
laravel/mcp Version ^0.8.2
laravel/sanctum Version ^4.0
sveda-ai/php-sdk Version ^0.4 || dev-main