Sign inSign up

tvup/mcp-http-bridge

By tvup

•Updated 11 months ago

HTTP bridge for Laravel MCP servers - converts stdio to HTTP for LobeChat and other MCP clients

Image
Developer tools
0

1.4K

tvup/mcp-http-bridge repository overview

⁠Repository Overview

# MCP HTTP Bridge for Laravel

HTTP bridge that converts stdio-based MCP (Model Context Protocol) servers to HTTP endpoints, enabling Laravel MCP servers to work with LobeChat and other HTTP-based MCP clients.

## šŸš€ Quick Start

```yaml
mcp-http-bridge:
    image: tvup/mcp-http-bridge:latest
    ports:
        - "3000:3000"
    volumes:
        - /var/run/docker.sock:/var/run/docker.sock
    environment:
        - TARGET_SERVICE=laravel-mcp

Connect your MCP client to http://localhost:3000

⁠✨ Features

  • Auto-discovery - Finds target containers using Docker Compose labels
  • Zero config - Works out of the box with sensible defaults
  • Streaming - Real-time response streaming via chunked transfer
  • Lightweight - Alpine-based image (~50MB)
  • Universal - Works with any MCP stdio server

ā šŸ”§ Configuration

VariableDefaultDescription
TARGET_SERVICElaravel.testDocker Compose service name
MCP_COMMANDphp /var/www/html/artisan boost:mcpCommand to execute
PORT3000Internal listening port

ā šŸ“– Use Cases

  • Connect Laravel MCP servers to LobeChat
  • Enable HTTP access for stdio-based MCP tools
  • Bridge legacy MCP servers to modern HTTP clients
  • Development and testing of MCP integrations

ā šŸ—ļø Architecture

[MCP Client] --HTTP POST--> [Bridge] --docker exec--> [MCP Server Container]
                              ↓                              ↓
                    Auto-detects via labels          Runs stdio command

ā šŸ”’ Security

āš ļø Requires Docker socket access - use only in trusted environments

ā šŸ“š Documentation

ā šŸ¤ Compatible With

  • Laravel Boost MCP
  • LobeChat
  • Claude Desktop
  • Any MCP stdio server
  • Docker Compose environments

ā šŸ“¦ What's Included

  • Node.js HTTP server
  • Docker CLI for container communication
  • Automatic container discovery logic
  • JSON-RPC request/response handling

ā šŸ› Troubleshooting

Container not found?

  • Ensure both services are on the same Docker network
  • Verify TARGET_SERVICE matches your service name

Permission denied?

  • Check Docker socket is mounted: /var/run/docker.sock:/var/run/docker.sock

Connection refused?

  • Verify bridge is running: docker ps | grep mcp-http-bridge
  • Check port is exposed: 3000:3000

ā šŸ“„ License

MIT

ā šŸ·ļø Tags

mcp laravel http-bridge docker lobechat model-context-protocol

Tag summary

Content type

Image

Digest

sha256:6962374ee…

Size

64.5 MB

Last updated

11 months ago

docker pull tvup/mcp-http-bridge