Skip to content

Mcp tools/list empty on prod but working on dev #2118

@AlanCrevon

Description

@AlanCrevon

Hi all.

When my app is deployed to production, mcp tools are not registered. Everything works as expected in development.

No error in logs. It just fails silently

In dev :

 curl -s "$BASE_URL/_mcp" \
>   -H "Authorization: Bearer $ACCESS_TOKEN" \
>   -H "Mcp-Session-Id: $MCP_SESSION_ID" \
>   -H "Content-Type: application/json" \
>   -d '{
quote>     "jsonrpc": "2.0",
quote>     "method": "tools/list",
quote>     "id": 2
quote>   }' | jq .
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "tools": [
      {
        "name": "my_tool",
        "title": "Test tool",
        "inputSchema": {
          "type": "object",
          "properties": {}
        },
        "description": "test tool"
      }
    ]
  }
}

In prod :

 curl -s "$BASE_URL/_mcp" \
>   -H "Authorization: Bearer $ACCESS_TOKEN" \
>   -H "Mcp-Session-Id: $MCP_SESSION_ID" \
>   -H "Content-Type: application/json" \
>   -d '{
quote>     "jsonrpc": "2.0",
quote>     "method": "tools/list",
quote>     "id": 2
quote>   }' | jq .
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "tools": []
  }
}

mcp.yaml

mcp:
  app: 'apelia'
  version: '1.0.0'
  description: 'MCP server for Apelia.'
  pagination_limit: 50
  instructions: 'MCP server for Apelia application tools and resources.'

  client_transports:
    stdio: false
    http: true

  http:
    path: /_mcp
    session:
      store: file
      directory: '%kernel.cache_dir%/mcp-sessions'
      ttl: 3600
ai:
    platform:
        # Inference Platform configuration
        # see https://github.com/symfony/ai/tree/main/src/platform#platform-bridges

        # openai:
        #    api_key: '%env(OPENAI_API_KEY)%'

    agent:
        # Agent configuration
        # see https://symfony.com/doc/current/ai/bundles/ai-bundle.html

        # default:
        #    platform: 'ai.platform.openai'
        #    model: 'gpt-5-mini'
        #    prompt: |
        #        You are a pirate and you write funny.
        #    tools:
        #        - 'Symfony\AI\Agent\Bridge\Clock\Clock'

    store:
        # Store configuration

        # chromadb:
        #    default:
        #        client: 'client.service.id'
        #        collection: 'my_collection'
  • php 8.3
  • Symfony 7.4
  • "symfony/mcp-bundle": "*", (v0.9.0 installed)
  • "symfony/ai-bundle": "*", (v0.9.0 installed)

What information should i provide to help ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions