wachterjohannes/debug-mcp-tools 问题修复 & 功能扩展

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

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

wachterjohannes/debug-mcp-tools

Composer 安装命令:

composer require wachterjohannes/debug-mcp-tools

包简介

Debugging tools for debug-mcp server (clock, PHP configuration)

README 文档

README

⚠️ PROTOTYPE - FOR TESTING AND DISCUSSION PURPOSES ONLY

Development and debugging tools for the debug-mcp MCP server.

Purpose

Provides two essential debugging tools:

  • ClockTool: Get current time with customizable format and timezone
  • PhpConfigTool: Inspect PHP configuration, extensions, and environment

Features

  • Current time retrieval with timezone support
  • PHP configuration inspection (version, extensions, paths, memory limits)
  • Automatic discovery by debug-mcp server
  • Attribute-based registration using PHP 8

Installation

composer require wachterjohannes/debug-mcp-tools

The tools will be automatically discovered when debug-mcp server starts.

Available Tools

clock

Get the current time in a specified format and timezone.

Parameters:

  • format (optional, default: 'Y-m-d H:i:s'): PHP date format string
  • timezone (optional, default: 'UTC'): Valid timezone identifier

Example:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "clock",
    "arguments": {
      "format": "c",
      "timezone": "Europe/Berlin"
    }
  },
  "id": 1
}

Returns:

{
  "time": "2024-11-29T15:30:45+01:00"
}

php_config

Get PHP configuration information about the development environment.

Parameters:

  • section (optional, default: 'general'): One of:
    • general: PHP version, memory limit, max execution time
    • extensions: List of loaded PHP extensions
    • paths: Include paths and configuration file locations
    • all: All information combined

Example:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "php_config",
    "arguments": {
      "section": "general"
    }
  },
  "id": 1
}

Returns:

{
  "php_version": "8.2.12",
  "memory_limit": "256M",
  "max_execution_time": "30",
  "zend_version": "4.2.12"
}

Registration

Tools are registered via composer.json extra configuration:

{
  "extra": {
    "wachterjohannes/debug-mcp": {
      "classes": [
        "Wachterjohannes\\DebugMcp\\Tools\\ClockTool",
        "Wachterjohannes\\DebugMcp\\Tools\\PhpConfigTool"
      ]
    }
  }
}

The debug-mcp server scans installed packages for this configuration and automatically loads the tools.

Adding New Tools

To add a new tool to this package:

  1. Create a class in src/ with the tool logic
  2. Add #[McpTool] attribute from the SDK
  3. Add the class name to composer.json extra config
  4. Update this README with tool documentation

Example tool structure:

<?php
namespace Wachterjohannes\DebugMcp\Tools;

use Mcp\Capability\Attribute\McpTool;

class MyNewTool
{
    #[McpTool(
        name: 'my_new_tool',
        description: 'Description of what this tool does'
    )]
    public function execute(string $param): array
    {
        return ['result' => 'value'];
    }
}

Development

Code Quality

Format code before committing:

composer cs-fix

Testing Tools

Test individual tools by installing into a debug-mcp instance and using Claude Desktop or direct JSON-RPC messages.

Requirements

  • PHP 8.1 or higher
  • modelcontextprotocol/php-sdk
  • wachterjohannes/debug-mcp (for testing)

Repository

GitHub: https://github.com/wachterjohannes/debug-mcp-tools

License

MIT

wachterjohannes/debug-mcp-tools 适用场景与选型建议

wachterjohannes/debug-mcp-tools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 11 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 wachterjohannes/debug-mcp-tools 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-29