Token导航 LogoToken导航TokenDH.com
Laravel Telescope MCP Server Mvp logo
开发工具未说明官方级别未说明来源级核验

Laravel Telescope MCP Server Mvp

MCP Server

一个基于PHP的模型上下文协议(MCP)服务器,为AI代理提供直接访问Laravel Telescope数据的能力,实现高效的Laravel应用调试与分析。

工具数

4

提示词数

0

GitHub Stars

0

资源数

0
PHPIDE集成CursorCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

eduardocruz

提供方

eduardocruz

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Laravel望远镜MCP服务器(PHP)

一个内置于PHP中的模型上下文协议(MCP)服务器,为AI代理提供对Laravel Telescope数据的直接访问,从而能够高效地调试和分析Laravel应用程序。

项目概述

关键目标

  • 概念验证:创建最基本的MCP服务器来演示Laravel Telescope集成
  • PHP原生:完全内置于PHP中,使用PHP-mcp/server库
  • 光标集成:针对Cursor IDE进行了优化,支持深度链接,实现了无缝的开发工作流程
  • 最低可行性产品:专注于核心功能,使其快速工作

功能(计划中)

核心MCP工具

  • telescope_requests -列出最近来自Telescope的HTTP请求
  • telescope_search -使用基本过滤器(状态、方法、URI模式)搜索请求
  • telescope_request_details -获取特定请求的详细信息
  • telescope_queries -查看特定请求的数据库查询

光标集成

  • Deeplink支持快速启动和调试服务器
  • 开发友好型配置
  • Laravel项目的简单设置

建筑

Laravel App → Telescope → MySQL Database
                              ↓
                    PHP MCP Server (php-mcp/server)
                              ↓
                         Cursor IDE
                              ↓
                      AI Assistant Integration

快速启动(计划中)

先决条件

  • PHP 8.1+
  • 作曲家
  • 安装了Telescope的Laravel应用程序
  • 光标IDE

安装

git clone 
cd laravel-telescope-mcp-server
composer install

配置

# Copy environment file
cp .env.example .env

# Configure database connection to your Laravel app
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_laravel_db
DB_USERNAME=your_username
DB_PASSWORD=your_password

运行服务器

选项1:直接执行PHP

php server.php

选项2:使用Composer脚本

composer run serve

选项3:使用PHPX(推荐)

如果你有 PHPX 安装:

phpx laravel-telescope-mcp-server

游标深度链接集成

要与Cursor集成,您需要创建一个深度链接配置。以下是Cursor的MCP服务器配置:

用于光标IDE设置

将此添加到您的Cursor MCP配置中:

{
  "telescope": {
    "command": "php",
    "args": [
      "/path/to/laravel-telescope-mcp-server/server.php"
    ],
    "env": {
      "DB_HOST": "127.0.0.1",
      "DB_PORT": "3306",
      "DB_DATABASE": "your_laravel_db",
      "DB_USERNAME": "your_username",
      "DB_PASSWORD": "your_password"
    }
  }
}

替代方案:使用PHPX

{
  "telescope": {
    "command": "phpx",
    "args": [
      "laravel-telescope-mcp-server"
    ],
    "env": {
      "DB_HOST": "127.0.0.1",
      "DB_PORT": "3306",
      "DB_DATABASE": "your_laravel_db",
      "DB_USERNAME": "your_username",
      "DB_PASSWORD": "your_password"
    }
  }
}

生成光标深度链接

  1. 获取服务器配置JSON
  2. 使用 JSON.stringify() 转换它并对其进行base64编码
  3. 创建深度链接: cursor://mcp/install?name=telescope&config=BASE64_ENCODED_CONFIG

生成深度链接的示例辅助脚本:

 [
        "command" => "php",
        "args" => [getcwd() . "/server.php"],
        "env" => [
            "DB_HOST" => "127.0.0.1",
            "DB_PORT" => "3306",
            "DB_DATABASE" => "your_laravel_db",
            "DB_USERNAME" => "your_username",
            "DB_PASSWORD" => "your_password"
        ]
    ]
];

$encoded = base64_encode(json_encode($config));
echo "cursor://mcp/install?name=telescope&config=" . $encoded . "\n";
?>

## Development Roadmap

### Phase 1: Basic MCP Server
- [x] Project setup and README
- [ ] Basic MCP server using php-mcp/server
- [ ] Database connection to Laravel Telescope tables
- [ ] Simple request listing tool

### Phase 2: Core Tools
- [ ] Request search and filtering
- [ ] Request detail retrieval
- [ ] Query analysis tool
- [ ] Basic error handling

### Phase 3: Cursor Integration
- [ ] Deeplink configuration
- [ ] Development workflow optimization
- [ ] Documentation for Cursor setup

### Phase 4: Enhancement
- [ ] Performance optimization
- [ ] Additional Telescope data types (jobs, cache, etc.)
- [ ] Better error messages and debugging

## Technical Stack

- **Language**: PHP 8.1+
- **MCP Library**: [php-mcp/server](https://github.com/php-mcp/server)
- **Database**: MySQL/MariaDB (Laravel Telescope tables)
- **IDE Integration**: Cursor with deeplink support

## Inspiration

This project draws inspiration from:
- [bradleybernard/TelescopeMCP](https://github.com/bradleybernard/TelescopeMCP) - Python implementation
- [php-mcp/server](https://github.com/php-mcp/server) - PHP MCP server library

## Why PHP?

- Native integration with Laravel ecosystem
- Leverages existing PHP knowledge for Laravel developers
- Direct access to Laravel's database structure and conventions
- Easier deployment alongside existing PHP/Laravel infrastructure

## Contributing

This is a proof-of-concept project focused on getting a minimal viable product working. Contributions welcome once the basic functionality is established.

## License

MIT License - see LICENSE file for details.

---

**Status**: 🚧 Early Development - Proof of Concept Phase

**Next Steps**: Set up basic MCP server structure using php-mcp/server library. ```

目录标签

目录标签

PHPIDE集成Cursor本地部署Laravel调试工具PHP开发AI集成数据库分析

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP