Skip to content

Error while trying to use this bundle with Claude Code #12

@gabiudrescu

Description

@gabiudrescu

@killerwolf First of all, let me thank you and congratulate you for the work you've done. It is a very helpful bundle and I want to express my gratitude for it by contributing to it.

I am trying to use it with Claude code and unless i edit the tool names to replace : with - i get this error:

⎿  API Error: 400 {"type":"error","error":{"type":"invalid_requesterror","message":"tools.17.custom.name: String should match pattern '^[a-zA-Z0-9-]{1,128}$'"}}

i temporarily fixed this by editing the Command/RunMCPServerCommand.php like this:

Index: vendor/killerwolf/mcp-profiler-bundle/Command/RunMCPServerCommand.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/vendor/killerwolf/mcp-profiler-bundle/Command/RunMCPServerCommand.php b/vendor/killerwolf/mcp-profiler-bundle/Command/RunMCPServerCommand.php
--- a/vendor/killerwolf/mcp-profiler-bundle/Command/RunMCPServerCommand.php
+++ b/vendor/killerwolf/mcp-profiler-bundle/Command/RunMCPServerCommand.php	(date 1754862370575)
@@ -157,17 +157,17 @@
 
         try {
             $result = match ($name) {
-                'profiler:list' => (new ProfilerList($this->profiler, null, $this->parameterBag))->execute(
+                'profiler-list' => (new ProfilerList($this->profiler, null, $this->parameterBag))->execute(
                     $arguments['limit'] ?? 10
                 ),
-                'profiler:get_collectors' => (new ProfilerGetAllCollectorByToken($this->profiler, null))->execute(
+                'profiler-get_collectors' => (new ProfilerGetAllCollectorByToken($this->profiler, null))->execute(
                     $arguments['token'] ?? ''
                 ),
-                'profiler:get_collector' => (new ProfilerGetOneCollectorByToken($this->profiler, null))->execute(
+                'profiler-get_collector' => (new ProfilerGetOneCollectorByToken($this->profiler, null))->execute(
                     $arguments['token'] ?? '',
                     $arguments['collector'] ?? ''
                 ),
-                 'profiler:get_by_token' => (new ProfilerGetByTokenTool($this->profiler, null, $this->parameterBag))->execute(
+                 'profiler-get_by_token' => (new ProfilerGetByTokenTool($this->profiler, null, $this->parameterBag))->execute(
                     $arguments['token'] ?? ''
                 ),
                 default => null, // Will be handled below

without this, i cannot use this mcp in claude code.
i am happy to contribute to this repo if you would be interested in my contribution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions