-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hi,
I suspect that MCP element discovery caching is not working well in our setup.
Looks like it is running more than it should, upon every MCP request. (I see many "Starting MCP element discovery..." messages in our logs).
I suspect that it is not being cached correctly and therefore, cause delays.
I am using "http_integrated" mode, and Redis caching.
Any pointers on how I can troubleshoot this further can help!
I have got this mcp.php config out of tinker (replaced my actual folder with "[my_project_path]"):
config('mcp')
= [
"server" => [
"name" => "Laravel MCP",
"version" => "1.0.0",
"instructions" => null,
],
"discovery" => [
"base_path" => "[my_project_path]",
"directories" => [
"app/Mcp",
"app/Services",
],
"exclude_dirs" => [
"vendor",
"tests",
"storage",
"public",
"resources",
"bootstrap",
"config",
"database",
"routes",
"node_modules",
".git",
],
"definitions_file" => "[my_project_path]/routes/mcp.php",
"auto_discover" => true,
"save_to_cache" => true,
],
"cache" => [
"store" => "redis",
],
"transports" => [
"stdio" => [
"enabled" => false,
],
"http_dedicated" => [
"enabled" => false,
"legacy" => false,
"host" => "127.0.0.1",
"port" => 8090,
"path_prefix" => "mcp",
"ssl_context_options" => [],
"enable_json_response" => true,
"event_store" => null,
],
"http_integrated" => [
"enabled" => true,
"legacy" => false,
"route_prefix" => "mcp",
"middleware" => [
"mcp",
],
"domain" => null,
"sse_poll_interval" => 1,
"cors_origin" => "*",
"enable_json_response" => true,
"event_store" => null,
],
],
"session" => [
"driver" => "cache",
"ttl" => 3600,
"store" => "redis",
"path" => "[my_project_path]/storage/framework/mcp_sessions",
"connection" => "mysql",
"table" => "mcp_sessions",
"lottery" => [
2,
100,
],
],
"pagination_limit" => 50,
"capabilities" => [
"tools" => true,
"toolsListChanged" => false,
"resources" => false,
"resourcesSubscribe" => false,
"resourcesListChanged" => false,
"prompts" => false,
"promptsListChanged" => false,
"logging" => false,
"completions" => false,
"experimental" => null,
],
"logging" => [
"channel" => "stack",
"level" => "warning",
],
]