Skip to content

MCP HTTP endpoint from Azure Data API Builder cannot connect (missing endpoint / SSE mismatch) #446

Description

@ionutafloarei

LocalAGI is unable to connect to an MCP server exposed by Azure Data API Builder (DAB) over HTTP.
The connection fails during initialization with the error:

missing endpoint: first event is """, want "endpoint"

This appears to be related to a transport mismatch between LocalAGI’s MCP client and DAB’s MCP HTTP implementation.

DAB exposes MCP at /mcp using streamable HTTP MCP, while LocalAGI’s remote MCP client appears to expect SSE-style MCP communication.

As a result, the handshake fails and the MCP server cannot be initialized.

Environment

LocalAGI version:

LocalAGI (latest docker image from mudler/localagi)

DAB version:

Microsoft.DataApiBuilder 1.7.90

Docker environment:

Docker Desktop
Linux container

Model used by LocalAGI:

gemma-3-12b-it
DAB Configuration

{
  "$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.7.86/dab.draft.schema.json",
  "data-source": {
    "database-type": "mssql",
    "connection-string": "@env('MSSQL_CONNECTION_STRING')"
  },
  "runtime": {
    "rest": {
      "enabled": true,
      "path": "/api"
    },
    "graphql": {
      "enabled": true,
      "path": "/graphql",
      "allow-introspection": true
    },
    "mcp": {
      "enabled": true,
      "path": "/mcp"
    },
    "host": {
      "mode": "development"
    }
  },
  "entities": {}
}

DAB started using:

ASPNETCORE_URLS=http://0.0.0.0:5010 dab start --config /mcp/sqlmcpserver/dab-config.json

Endpoint available at:

http://127.0.0.1:5010/mcp

LocalAGI Configuration

Agent → MCP Servers

URL: http://127.0.0.1:5010/mcp
API Key: (empty)
Steps to Reproduce

Start LocalAGI container

Start Azure Data API Builder with MCP enabled

ASPNETCORE_URLS=http://0.0.0.0:5010 dab start --config dab-config.json

Verify MCP endpoint exists

http://127.0.0.1:5010/mcp

Configure LocalAGI agent MCP server with:

http://127.0.0.1:5010/mcp

Start the agent

Observed Behavior

LocalAGI fails to connect to the MCP server.

Logs:

ERROR Failed to connect to MCP server
server={URL:http://127.0.0.1:5010/mcp Token:}
error="missing endpoint: first event is "\", want "endpoint""

The agent starts but no MCP actions are registered.

Expected Behavior

LocalAGI should successfully complete the MCP handshake and populate available actions from the MCP server.

Additional Context

We also tested running DAB using MCP STDIO mode:

dab start --config dab-config.json --mcp-stdio role:anonymous

However this fails with LocalAGI because DAB prints informational logs to stdout, which breaks the MCP STDIO protocol stream expected by LocalAGI.

This suggests the only viable integration path should be remote MCP over HTTP, but the handshake currently fails due to transport differences.

Possible Cause

Azure Data API Builder implements MCP using streamable HTTP, while LocalAGI appears to expect SSE-based MCP transport for remote servers.

If LocalAGI currently only supports SSE-style MCP endpoints, this could explain the handshake failure.

Question

Does LocalAGI currently support streamable HTTP MCP endpoints, or only SSE-based MCP endpoints?

If the latter, is there a recommended way to integrate MCP servers that use streamable HTTP?

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