SShortSingh.
Back to feed

Connecting Laravel to an MCP Server: Setup, Tools, and Testing

0
·1 views

The Model Context Protocol is an open standard that lets AI models call functions in external applications in a structured way. Developers can build an MCP server inside Laravel by using the laravel/mcp package, which brings familiar features like Artisan scaffolding, dependency injection, validation, and authentication. The setup involves installing the package, publishing a dedicated routes file for MCP traffic, and generating a server class. Developers then register the server as a web or local endpoint, define tools that AI clients can invoke, and annotate them with safety hints. Finally, the Artisan inspector command lets developers interactively test tools and check their schemas.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Blogger Details Repeated Tampering With His Sonarr Setup by Torrent Site User

A developer published a blog post describing how someone repeatedly interfered with his Sonarr media-automation setup through torrent sites. The account is shared via a Hacker News link with only limited metadata available, so the specific methods and timeline are not confirmed here. The post has drawn a small amount of attention, with one comment so far. Readers wanting the full details of the incident are directed to the original blog post.

0
ProgrammingDEV Community ·

Short link creator treats slug collisions as negotiations, not errors

The developer of a short link creator built custom slugs for AI agents, but initially returned a hard error whenever a slug was already taken. A collision with an abandoned link caused retry storms that saturated the rate limiter, prompting a redesign. Collisions now return the existing link with a flag, letting callers accept an auto-suffixed variant or reclaim a slug only if it has had no clicks in 90 days. The developer also found that agents losing their one-time manage secret create duplicate links for the same destination, and proposed making creation idempotent on destination and owner hint. The overall lesson is that link APIs should treat slug collisions, lost secrets, and moved destinations as normal operation.

0
ProgrammingDEV Community ·

Six documented ways to simplify a cluttered Zoho CRM

Zoho CRM can feel overwhelming when every user sees the same fields and records, so the platform offers several built-in ways to tailor the view for each role. Page layouts let a single module serve different processes, with distinct fields, sections and pick-list values assigned to profiles, though enabling this requires the Module Customization permission and edition checks. Layout rules can show or hide fields and sections or make them mandatory based on other entries, but they cannot remove fields and do not apply to imported, web-form or lead-convert records. Field permissions per profile let administrators set fields to read and write, read only, or hidden, with hidden fields blocked from viewing and editing rather than deleted. Custom list views, Kanban views and Canvas views then present records in task-focused formats, with the advice to keep columns under ten and build one view per daily need.

0
ProgrammingDEV Community ·

NTP Clock Step Cost a Batch Job 40 Seconds of Its Budget, Field Notes Show

A developer's 20-minute batch job kept stopping early on a host where every API call was fast. The cause was deadline accounting that read the wall clock, which shifted during the run and made the job think more time had passed than it had. Switching to a monotonic clock would have prevented the early exits, and the author also points to a separate retry bug in parsing the Retry-After header. The author also notes the difficulty of confirming the clock adjustment's cause, since the affected server was not theirs to inspect. The post closes by describing how injecting the clock makes such failures testable on a local machine.