MCP Hub
Back to servers

mcp-inspector

A specialized MCP server for Nette Framework introspection, allowing AI agents to analyze DI containers, database schemas, and application routing. It provides deep visibility into Nette internals to assist with debugging, architecture analysis, and code generation.

Stars
3
Tools
8
Updated
Jan 9, 2026
Validated
Jan 17, 2026

Nette MCP Inspector

MCP (Model Context Protocol) server for Nette application introspection. Allows AI assistants to inspect your Nette application's DI container, database schema, routing, and more.

image

Installation

With Claude Code and the Nette plugin:

/install-mcp-inspector

Or manually:

composer require nette/mcp-inspector

After installation, restart Claude Code session to activate the MCP server.

Available Tools

DI Container

ToolDescription
di_get_servicesList all registered services with types and autowiring info
di_get_serviceGet details of a specific service (factory, setup calls, tags)

Database

ToolDescription
db_get_tablesList all database tables
db_get_columnsGet columns of a specific table (types, nullable, primary key, foreign keys)
db_get_relationshipsGet foreign key relationships between all tables (belongsTo, hasMany)

Router

ToolDescription
router_get_routesList all registered routes with masks and defaults
router_match_urlMatch URL to presenter/action (e.g., "/article/123")
router_generate_urlGenerate URL for presenter/action (e.g., "Article:show")

Configuration

Create mcp-config.neon in your project root (optional):

# Path to Bootstrap file (defaults to app/Bootstrap.php)
bootstrap: app/Bootstrap.php

# Bootstrap class name (defaults to App\Bootstrap)
bootstrapClass: App\Bootstrap

# Custom toolkits
toolkits:
    - App\Mcp\MyCustomToolkit

Creating Custom Toolkits

use Mcp\Capability\Attribute\McpTool;
use Nette\McpInspector\Toolkit;
use Nette\McpInspector\Bridge\BootstrapBridge;

class MyToolkit implements Toolkit
{
    public function __construct(
        private BootstrapBridge $bridge,
    ) {}

    /**
     * Tool description from PHPDoc.
     * @param string $param Parameter description
     */
    #[McpTool(name: 'my_tool')]
    public function myMethod(string $param): array
    {
        return ['result' => 'data'];
    }
}

Register in mcp-config.neon:

toolkits:
    - App\Mcp\MyToolkit

Standalone Usage

CLI Mode

php vendor/bin/mcp-inspector

HTTP Mode

Copy www/mcp-inspector.php to your web root for HTTP-based MCP access.

Manual MCP Configuration

If not using the Nette plugin, add to your project's .mcp.json:

{
    "mcpServers": {
        "nette-inspector": {
            "command": "php",
            "args": ["vendor/bin/mcp-inspector"]
        }
    }
}

Requirements

  • PHP 8.2+
  • Nette Framework 3.2+

Reviews

No reviews yet

Sign in to write a review