ovac/laravel-mcp-inspector 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ovac/laravel-mcp-inspector

Composer 安装命令:

composer require ovac/laravel-mcp-inspector

包简介

A powerful MCP server inspector and documentation UI for Laravel — tools reference, interactive playground, scope explorer, and client connect guides.

README 文档

README

Latest Version on Packagist License Tests

A powerful, beautiful inspection and documentation UI for Laravel MCP servers. Think of it as Scalar or Swagger UI, but purpose-built for the Model Context Protocol.

Features

  • Interactive Tool Explorer — Browse all MCP tools with descriptions, risk levels, schemas, and annotations
  • Live Playground — Execute tools directly from the browser with a built-in JSON-RPC 2.0 client
  • Scope Explorer — Visualize scopes and discover which tools each scope unlocks
  • Client Connect — Ready-to-copy configuration for Claude Desktop, Cursor, and cURL
  • Dark & Light Themes — Beautiful UI with automatic system theme detection
  • Zero Config — Auto-discovers your MCP tools from your Laravel config; no manifest scraping
  • Self-Contained — Single Blade view with all CSS/JS inline; no build step required

Installation

composer require ovac/laravel-mcp-inspector

The package auto-registers its service provider via Laravel's package discovery.

Quick Start

Once installed, visit:

https://your-app.test/mcp/inspector

The inspector reads your MCP tool definitions directly from your Laravel config (default key: mcp_user_public). No HTTP calls to the MCP manifest — this is what makes it fast and reliable.

Configuration

Publish the config file:

php artisan vendor:publish --tag=mcp-inspector-config
// config/mcp-inspector.php

return [
    'enabled' => env('MCP_INSPECTOR_ENABLED', true),
    'route_prefix' => 'mcp',
    'route_middleware' => ['web'],
    'config_key' => 'mcp_user_public',
    'title' => 'MCP Inspector',
    'theme' => 'auto', // auto|dark|light
];

Options

Key Default Description
enabled true Enable/disable the inspector. Set to false in production if needed.
route_prefix mcp URL prefix. Inspector available at /{prefix}/inspector.
route_middleware ['web'] Middleware for the inspector route. Add auth to restrict access.
config_key mcp_user_public The Laravel config key containing your MCP server definition.
title MCP Inspector Title shown in the inspector UI header.
theme auto Default theme: auto, dark, or light.

Customizing the View

php artisan vendor:publish --tag=mcp-inspector-views

The published view will be in resources/views/vendor/mcp-inspector/.

MCP Config Format

The inspector expects your MCP config to follow this structure:

// config/mcp_user_public.php

return [
    'name' => 'My MCP Server',
    'version' => '1.0.0',
    'description' => 'API tools for my application.',
    'tokens_url' => '/api/mcp/tokens',
    'mcp_endpoint' => '/mcp',

    'tools' => [
        [
            'name' => 'get_user',
            'description' => 'Retrieve a user by their ID.',
            'inputSchema' => [
                'type' => 'object',
                'properties' => [
                    'user_id' => [
                        'type' => 'integer',
                        'description' => 'The user ID.',
                    ],
                ],
                'required' => ['user_id'],
            ],
            'annotations' => [
                'scope' => 'users:read',
                'risk' => 'low',
                'readOnlyHint' => true,
            ],
        ],
    ],

    'scopes' => [
        [
            'name' => 'users:read',
            'description' => 'Read user data.',
            'tools' => ['get_user'],
        ],
    ],
];

Security

For production, you should:

  1. Disable the inspector: MCP_INSPECTOR_ENABLED=false
  2. Or add authentication middleware:
// config/mcp-inspector.php
'route_middleware' => ['web', 'auth'],

Testing

composer test

Changelog

See CHANGELOG.md for recent changes.

License

MIT License. See LICENSE for details.

Built with care by Ariama Victor (Gidipex).

ovac/laravel-mcp-inspector 适用场景与选型建议

ovac/laravel-mcp-inspector 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「documentation」 「laravel」 「inspector」 「mcp」 「api-docs」 「model-context-protocol」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 ovac/laravel-mcp-inspector 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ovac/laravel-mcp-inspector 我们能提供哪些服务?
定制开发 / 二次开发

基于 ovac/laravel-mcp-inspector 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 31
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-29