Skip to content

fix(mcp): support streamable HTTP alias, request-response mode and integration tests#2811

Draft
afjcjsbx wants to merge 6 commits intosipeed:mainfrom
afjcjsbx:fix/mcp-streamable-http-support
Draft

fix(mcp): support streamable HTTP alias, request-response mode and integration tests#2811
afjcjsbx wants to merge 6 commits intosipeed:mainfrom
afjcjsbx:fix/mcp-streamable-http-support

Conversation

@afjcjsbx
Copy link
Copy Markdown
Collaborator

@afjcjsbx afjcjsbx commented May 7, 2026

📝 Description

This PR introduces two distinct and major improvements to the project: a generalized Docker-backed integration testing framework, and enhancements/refactoring for the MCP transport configuration.

1. General Docker-Backed Integration Test Framework

  • Introduced a flexible, auto-discovering integration test framework under the integration/ directory.
  • This allows developers to easily add integration tests of any kind by simply creating a new suite folder containing a suite.env and docker-compose.yml (no CI workflow edits required).
  • Added the integration job to GitHub Actions (build.yml and pr.yml) to automatically run these suites.
  • Added a make integration-test command for local execution.
  • Includes the first suite (mcp-streamable) as a reference implementation.

2. MCP Transport Refactoring & streamable-http

  • Officially supported streamable-http as an explicit alias for the http transport type.
  • Centralized and deduplicated transport inference/normalization logic into pkg/config/mcp_transport.go (NormalizeMCPTransportType and EffectiveMCPTransportType).
  • Fixed compatibility issues in manager.go by cleanly disabling the standalone SSE GET listener for http/streamable-http transports, accommodating servers that only support streamable POST request-response modes.

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

📚 Technical Context (Skip for Docs)

  • Reference URL: N/A
  • Reasoning:
    • Integration Framework: As PicoClaw grows, relying solely on unit tests with mocks is no longer sufficient for testing complex network interactions or external dependencies. We needed a robust, generalized environment where we could spin up real services (via Docker Compose) and run Go tests against them seamlessly both locally and in CI.
    • MCP Transport: The previous transport logic was scattered, leading to confusion between standard SSE (which uses a standalone GET listener) and streamable HTTP. Standardizing the streamable-http alias and centralizing the parsing logic makes the codebase cleaner, the CLI more intuitive, and ensures maximum compatibility with different MCP server implementations.

🧪 Test Environment

  • Hardware:
  • OS:
  • Model/Provider: N/A
  • Channels: N/A

📸 Evidence (Optional)

Click to view Logs/Screenshots

The new integration framework automatically discovering and spinning up the mcp-streamable-server container, running the Go tests against it to verify the new transport logic, and gracefully tearing down.

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

@afjcjsbx afjcjsbx marked this pull request as draft May 7, 2026 17:39
@afjcjsbx afjcjsbx changed the title fix(mcp): support streamable HTTP alias and request-response mode fix(mcp): support streamable HTTP alias, request-response mode and integration tests May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant