Locket is a demo application to show Laravel MCP capabilities.
It combines a read-later app with a link sharing social feed.
Locket allows users to share interesting links, manage their 'to read' list of links, and bookmark links shared by others. Locket allows users to do this through the web, API, and MCP.
To learn the most from Locket and Laravel MCP, take a look at these directories & files:
routes/ai.php
app/Mcp/Servers/Locket.php
app/Mcp/Tools/
app/Mcp/Actions/
routes/api.php
Locket provides a REST API for programmatic access. See the API Documentation for detailed endpoint information and usage examples.
- Log in to your Locket account
- Go to Settings → Profile (
/settings/profile
) - Create a new personal access token in the API Tokens section
- Use the token in the
Authorization: Bearer YOUR_TOKEN
header for API requests
This app uses Laravel Passport for both MCP OAuth authentication and API token authentication.
Users can manage their API tokens in the user profile settings area (/settings/profile
).
Locket comes with an MCP server located at http://locket.test/mcp, with tools, a resource, and a prompt.
composer install
cp .env.example .env
php artisan passport:keys
npm install
npm run build
Many AI agents use Node which comes with its own certificate store, meaning they'll fail to connect to an MCP server on https://
. We recommend leaving Locket on http://
locally for testing with AI agents, and using https://
on production.