PHPackages                             wachterjohannes/debug-mcp-tools - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. wachterjohannes/debug-mcp-tools

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

wachterjohannes/debug-mcp-tools
===============================

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

11PHP

Since Dec 7Pushed 5mo agoCompare

[ Source](https://github.com/wachterjohannes/debug-mcp-tools)[ Packagist](https://packagist.org/packages/wachterjohannes/debug-mcp-tools)[ RSS](/packages/wachterjohannes-debug-mcp-tools/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

debug-mcp-tools
===============

[](#debug-mcp-tools)

**⚠️ PROTOTYPE - FOR TESTING AND DISCUSSION PURPOSES ONLY**

---

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

Purpose
-------

[](#purpose)

Provides two essential debugging tools:

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

Features
--------

[](#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
------------

[](#installation)

```
composer require wachterjohannes/debug-mcp-tools
```

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

Available Tools
---------------

[](#available-tools)

### clock

[](#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

[](#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
------------

[](#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
----------------

[](#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:

```
