PHPackages                             vinkius/laravel-mcp-connect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. vinkius/laravel-mcp-connect

ActiveLibrary[API Development](/categories/api)

vinkius/laravel-mcp-connect
===========================

Laravel SDK for the Vinkius MCP Catalog — discover, activate, and execute 3,400+ governed MCP servers from any Laravel application

v1.0.0(1mo ago)022Apache-2.0PHPPHP ^8.2

Since May 8Pushed 1mo agoCompare

[ Source](https://github.com/vinkius-labs/laravel-mcp-connect)[ Packagist](https://packagist.org/packages/vinkius/laravel-mcp-connect)[ Docs](https://github.com/vinkius-labs/laravel-mcp-connect)[ RSS](/packages/vinkius-laravel-mcp-connect/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

Laravel MCP Connect
===================

[](#laravel-mcp-connect)

**Laravel SDK for the [Vinkius](https://vinkius.com) MCP Catalog — discover, activate, and execute 3,400+ governed MCP servers from any Laravel application.**

[![Latest Version on Packagist](https://camo.githubusercontent.com/fa5caab9ff5a3006888fba8a4fba87692b6e17b85242bf3882e71dac95aec077/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76696e6b6975732f6c61726176656c2d6d63702d636f6e6e6563742e737667)](https://packagist.org/packages/vinkius/laravel-mcp-connect)[![License](https://camo.githubusercontent.com/2a26b8d35c759d0986a53e55a18020ad4ba1e7704d560aa48c1a9aafb1ba6000/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f76696e6b6975732f6c61726176656c2d6d63702d636f6e6e6563742e737667)](https://packagist.org/packages/vinkius/laravel-mcp-connect)

---

What is this?
-------------

[](#what-is-this)

`laravel-mcp-connect` is the official Laravel SDK for the Vinkius MCP Catalog API. It enables any Laravel application to discover, inspect, activate, and execute tools from 3,400+ MCP servers — with zero local tool implementations.

**Instead of building tool integrations yourself**, your Laravel app delegates tool execution to the Vinkius runtime, which handles authentication, DLP, FinOps, and SSRF protection on every call.

```
use Vinkius\McpConnect\Facades\Mcp;

// Search the marketplace
$results = Mcp::search('github issues');

// Inspect a tool's schema
$schema = Mcp::inspect('github__create_issue');

// Execute a tool
$result = Mcp::execute('github__create_issue', [
    'owner' => 'my-org',
    'repo'  => 'my-repo',
    'title' => 'Bug: Login broken on mobile',
]);

echo $result->text(); // "Issue #42 created successfully"
```

---

Getting Started
---------------

[](#getting-started)

### 1. Explore available MCP servers

[](#1-explore-available-mcp-servers)

Visit [vinkius.com](https://vinkius.com) to browse the full registry of 3,400+ MCP servers — AI, DevOps, data, payments, and more. Each listing shows available tools, prompt examples, and pricing.

### 2. Create your account

[](#2-create-your-account)

Sign up at [cloud.vinkius.com](https://cloud.vinkius.com) to activate MCP servers, manage subscriptions, and generate API tokens for your projects.

### 3. Install the package

[](#3-install-the-package)

```
composer require vinkius/laravel-mcp-connect
```

Publish the configuration file:

```
php artisan vendor:publish --tag=mcp-connect-config
```

### 4. Configure your token

[](#4-configure-your-token)

Generate a catalog token at [cloud.vinkius.com/settings/catalog-tokens](https://cloud.vinkius.com/settings/catalog-tokens) and add it to your `.env`:

```
VINKIUS_CATALOG_TOKEN=vk_catalog_your_token_here
```

> **Note:** The catalog token is only required for authenticated operations (tool execution, activation, analytics). Marketplace browsing — listings, categories, featured sections, and search — works without a token.

---

Usage
-----

[](#usage)

### Discovery

[](#discovery)

```
use Vinkius\McpConnect\Facades\Mcp;

// List all activated servers and their tools (requires token)
$servers = Mcp::tools();

foreach ($servers as $server) {
    echo "{$server->title}: " . implode(', ', $server->toolNames());
}

// Search the catalog (requires token)
$results = Mcp::search('stripe payments');

// Browse catalog categories (requires token)
$categories = Mcp::browse();
```

### Marketplace (Public — No Token Required)

[](#marketplace-public--no-token-required)

```
// Browse marketplace categories
$categories = Mcp::categories();

foreach ($categories as $cat) {
    echo "{$cat->label}: {$cat->listingCount} apps";
}

// Fetch paginated listings with filters
$response = Mcp::listings(['category' => 'ai', 'page' => 2, 'sort' => 'popular']);
foreach ($response['data'] as $listing) {
    echo "{$listing->title} — {$listing->priceFormatted()}";
}

// Get full detail for a single listing
$listing = Mcp::listing('github-mcp');
echo "{$listing->title}: " . implode(', ', $listing->toolNames());

// Featured sections for discovery carousels
$featured = Mcp::featured();

// Search marketplace listings
$results = Mcp::searchListings('payment processing');
```

### Inspection

[](#inspection)

```
// Always inspect before executing — know the exact parameters
$schema = Mcp::inspect('github__create_issue');

echo $schema->description;
// "Create a new issue in a GitHub repository"

print_r($schema->inputSchema);
// ["type" => "object", "properties" => [...], "required" => [...]]
```

### Execution

[](#execution)

```
$result = Mcp::execute('github__create_issue', [
    'owner' => 'my-org',
    'repo'  => 'my-repo',
    'title' => 'Automated issue from Laravel',
    'body'  => 'Created via MCP Connect.',
]);

if ($result->successful()) {
    $data = $result->json(); // Parsed JSON from first content block
} else {
    $error = $result->text(); // Error message
}
```

### Lifecycle Management

[](#lifecycle-management)

```
// Activate a marketplace listing
$activation = Mcp::activate('listing-uuid');

if ($activation->requiresCheckout()) {
    // Redirect user to checkout for paid listings
    return redirect($activation->checkoutUrl);
}

// Deactivate a subscription
Mcp::deactivate('subscription-uuid');
```

### Analytics

[](#analytics)

```
$analytics = Mcp::analytics();

foreach ($analytics as $sub) {
    echo "{$sub->title}: {$sub->requestCount} requests ({$sub->status})";
}
```

### Health Check

[](#health-check)

```
if (Mcp::ping()) {
    echo 'Vinkius API is reachable!';
}
```

---

Artisan Commands
----------------

[](#artisan-commands)

CommandDescription`php artisan mcp:tools`List all activated servers and tools`php artisan mcp:search "query"`Search the marketplace`php artisan mcp:inspect tool_name`View full tool schema`php artisan mcp:execute tool_name --arg="key:value"`Execute a tool`php artisan mcp:browse`Browse marketplace categories`php artisan mcp:analytics`View subscription usage stats---

Events
------

[](#events)

The package dispatches events on every operation for observability:

EventWhen`ToolExecuted`After successful tool execution`ToolExecutionFailed`On execution error`ServerActivated`After server activation`ServerDeactivated`After server deactivation```
use Vinkius\McpConnect\Events\ToolExecuted;

Event::listen(ToolExecuted::class, function (ToolExecuted $event) {
    Log::info("MCP tool executed: {$event->toolName}", [
        'duration_ms' => $event->durationMs,
        'is_error'    => $event->result->isError,
    ]);
});
```

---

Error Handling
--------------

[](#error-handling)

All exceptions extend `McpException` for easy catching:

```
use Vinkius\McpConnect\Exceptions\McpException;
use Vinkius\McpConnect\Exceptions\AuthenticationException;
use Vinkius\McpConnect\Exceptions\ExecutionException;

try {
    $result = Mcp::execute('tool__name', $args);
} catch (AuthenticationException $e) {
    // Token invalid/expired — non-retryable
} catch (ExecutionException $e) {
    // Tool returned an error
    $errorDetail = $e->getResult()->text();
} catch (McpException $e) {
    // Any MCP-related error
}
```

---

Configuration
-------------

[](#configuration)

```
// config/mcp-connect.php

return [
    'base_url'        => env('VINKIUS_API_URL', 'https://api.vinkius.com'),
    'token'           => env('VINKIUS_CATALOG_TOKEN'),  // optional for marketplace
    'timeout'         => 30,
    'connect_timeout' => 10,
    'retry'           => ['times' => 2, 'sleep' => 500],
    'cache'           => [
        'enabled' => true,
        'store'   => null,  // null = default cache store
        'prefix'  => 'mcp_connect',
        'ttl'     => [
            // Catalog (authenticated)
            'tools'     => 60,
            'schema'    => 300,
            'search'    => 120,
            'browse'    => 600,
            'analytics' => 60,
            // Marketplace (public)
            'listings'  => 120,
            'featured'  => 600,
        ],
    ],
];
```

---

Architecture
------------

[](#architecture)

```
McpConnect (Service)
├── McpClient (HTTP Transport)
│   └── Vinkius Catalog API
├── Cache (Read-through, per-endpoint TTLs)
├── DTOs (Readonly, immutable response mapping)
├── Events (Fire-and-forget observability)
└── Exceptions (Typed, structured error handling)

```

- **Zero local tool implementations** — all execution routes through the Vinkius runtime
- **Type-safe** — every response is a `readonly` DTO with IDE autocompletion
- **Cacheable** — granular cache with per-endpoint TTLs
- **Observable** — events on every operation
- **Testable** — bind `McpConnectInterface` to a mock in tests

---

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12

License
-------

[](#license)

Apache 2.0 — see [LICENSE](LICENSE.md)

---

 Built by [Vinkius](https://vinkius.com)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance94

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

33d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26571?v=4)[Renato Marinho](/maintainers/renatomarinho)[@renatomarinho](https://github.com/renatomarinho)

---

Top Contributors

[![renatomarinho](https://avatars.githubusercontent.com/u/26571?v=4)](https://github.com/renatomarinho "renatomarinho (1 commits)")

---

Tags

aiai-agentsai-toolslaravellaravel-packagelaravel-sdkllmmcpmcp-clientmcp-servermodel-context-protocolphpsdktool-executionvinkiuslaravelmcpaiAgentgatewaytoolscatalogllmModel Context Protocolvinkius

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/vinkius-laravel-mcp-connect/health.svg)

```
[![Health](https://phpackages.com/badges/vinkius-laravel-mcp-connect/health.svg)](https://phpackages.com/packages/vinkius-laravel-mcp-connect)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M120](/packages/laravel-pulse)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.4k](/packages/larastan-larastan)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76318.2M110](/packages/laravel-mcp)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9732.3M121](/packages/roots-acorn)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
