Skip to content

[MCP Bundle] Long response from Tool #1744

@molarro

Description

@molarro

I use Symfony 7.4 and "symfony/mcp-bundle": "^0.6.0"

Using, MCP inspector or mcporter I get long response from tool, about 6-10 seconds.
Profiler shows that main problem is in controller.get_callable 6177.9 ms / 22 MiB.

Tool example:

<?php

namespace App\Mcp;

use Mcp\Capability\Attribute\McpTool;

class HelloTool
{
    #[McpTool(name: 'hello')]
    public function hello(string $name = 'World'): string
    {
        return "Hello $name from Symfony MCP!";
    }
}

Switching to prod env does not resolve the problem.

I have 4000+ services (php bin/console debug:container | wc -l), maybe bundle scan all services until find needed tool?

Symfony on Debian 13.3 (Docker)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingMCP BundleIssues & PRs about the MCP SDK integration bundleStatus: Needs Review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions