Skip to content

[ENHANCEMENT] Auto-infer streamable-http type for MCP servers with URL configuration #9118

@PaperBoardOfficial

Description

@PaperBoardOfficial

Problem (one or two sentences)

Users must explicitly specify "type": "streamable-http" for every MCP server that uses a URL, creating unnecessary verbosity and potential confusion when migrating configurations from other editors like Cursor.

Context (who is affected and when)

Developers configuring MCP servers in Roo Code who are familiar with Cursor's simpler configuration format encounter this friction. This affects anyone setting up HTTP-based MCP servers like GitHub Copilot, LangChain docs, or other streamable HTTP services. The explicit type requirement is especially noticeable when managing multiple MCP servers.

Desired behavior (conceptual, not technical)

When an MCP server configuration includes a url property without a type specified, Roo Code should automatically infer the type as streamable-http. Conversely, when only command and args are present, it should infer the appropriate command-based type. This matches Cursor's behavior and reduces configuration boilerplate.

Example
Current behavior in Roo Code (requires explicit type):

{
  "mcpServers": {
    "docs-langchain": {
      "type": "streamable-http",
      "url": "https://docs.langchain.com/mcp",
      "alwaysAllow": ["SearchDocsByLangChain"]
    },
    "github": {
      "type": "streamable-http",
      "url": "https://api.githubcopilot.com/mcp",
      "headers": {
        "Authorization": "Bearer GITHUB_PAT"
      }
    },
    "repomix": {
      "command": "npx",
      "args": ["-y", "repomix", "--mcp"]
    }
  }
}

Desired behavior (same as Cursor - automatic type inference):

{
  "mcpServers": {
    "docs-langchain": {
      "url": "https://docs.langchain.com/mcp",
      "alwaysAllow": ["SearchDocsByLangChain"]
    },
    "github": {
      "url": "https://api.githubcopilot.com/mcp",
      "headers": {
        "Authorization": "Bearer GITHUB_PAT"
      }
    },
    "repomix": {
      "command": "npx",
      "args": ["-y", "repomix", "--mcp"]
    }
  }
}

Constraints / preferences (optional)

  • Maintain backward compatibility: existing configurations with explicit type should continue working unchanged
  • The inference logic should be clear and predictable (URL = streamable-http, command = command-based)
  • Consider performance: inference should not add noticeable overhead during configuration parsing

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear context and impact

Roo Code Task Links (optional)

No response

Acceptance criteria (optional)

  • MCP server configs with url but no type work correctly as streamable-http
  • Existing configs with explicit type continue functioning
  • Configuration parsing remains fast (<50ms difference)
  • Documentation updated to reflect that type is optional when URL is present
  • Error messages guide users if both url and command are mistakenly specified

Proposed approach (optional)

Add a configuration parser that checks for the presence of url or command properties and sets the appropriate type before server initialization. The inference order could be: explicit type > url presence (streamable-http) > command presence (stdio/command).

Trade-offs / risks (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions