nette / mcp-inspector
🔠MCP server for Nette application introspection
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/nette/mcp-inspector
Requires
- php: 8.2 - 8.5
- mcp/sdk: ^0.2
- nette/bootstrap: ^3.2
- nette/di: ^3.2
- nette/neon: ^3.4
- nyholm/psr7: ^1.8
- nyholm/psr7-server: ^1.1
Requires (Dev)
- mockery/mockery: ^1.6@stable
- nette/application: ^3.2
- nette/database: ^3.2
- nette/routing: ^3.1
- nette/tester: ^2.5.2
- phpstan/phpstan-nette: ^2.0@stable
- tracy/tracy: ^2.11
This package is auto-updated.
Last update: 2026-01-05 03:25:58 UTC
README
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.
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
| Tool | Description |
|---|---|
di_get_services |
List all registered services with types and autowiring info |
di_get_service |
Get details of a specific service (factory, setup calls, tags) |
Database
| Tool | Description |
|---|---|
db_get_tables |
List all database tables |
db_get_columns |
Get columns of a specific table (types, nullable, primary key, foreign keys) |
db_get_relationships |
Get foreign key relationships between all tables (belongsTo, hasMany) |
Router
| Tool | Description |
|---|---|
router_get_routes |
List all registered routes with masks and defaults |
router_match_url |
Match URL to presenter/action (e.g., "/article/123") |
router_generate_url |
Generate 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+