apisix-mcp-bridge-example

This is using apisix mcp-bridge with docker based stdio mcp server.

GitHub Stars

0

User Rating

Not Rated

Forks

0

Issues

0

Views

1

Favorites

0

README
APISIX MCP Bridge Plugin Example

This repository demonstrates how to use the APISIX MCP Bridge plugin to integrate Model Context Protocol (MCP) servers with APISIX. The setup includes building a custom APISIX Docker image with Docker client capabilities and creating a Bitbucket MCP server that communicates via stdio.

Overview

The MCP Bridge plugin allows APISIX to act as a proxy for MCP servers, enabling seamless integration between MCP clients (like VS Code) and MCP servers through HTTP/SSE endpoints.

Components
  • Custom APISIX Image: Enhanced with Docker client for running containerized MCP servers
  • Bitbucket MCP Server: Containerized MCP server for Atlassian Bitbucket integration
  • MCP Bridge Plugin: APISIX plugin that bridges HTTP/SSE to stdio MCP communication
Prerequisites
  • Docker and Docker Compose
  • VS Code with MCP extension (for client testing)
  • Atlassian Bitbucket credentials (username and app password)
Configuration
Environment Variables

Edit .env with your Bitbucket credentials:

ATLASSIAN_SITE_NAME="https://api.bitbucket.org"
ATLASSIAN_BITBUCKET_USERNAME="your_username"
ATLASSIAN_BITBUCKET_APP_PASSWORD="your_app_password"
Building Images
Build APISIX Image

The custom APISIX image includes Docker client for running containerized MCP servers:

docker-compose build apisix
Build Bitbucket MCP Server Image
docker-compose build mcp-bitbucket
Build All Images with Docker Compose
docker-compose build
Running the Server
Start All Services
docker-compose up -d

This will start:

  • APISIX on port 80 with MCP Bridge plugin
  • Whoami service for testing
Verify Services

Check that APISIX is running:

curl http://localhost/whoami

Test MCP Bridge endpoint:

curl http://localhost/mcp-bitbucket/
VS Code MCP Client Configuration
Using Server-Sent Events (SSE)

Configure VS Code MCP client to connect to the APISIX MCP Bridge endpoint:

  1. Install the MCP extension in VS Code
  2. Add the following configuration to your VS Code settings or MCP client config:
{
  "servers": {
    "mcp-bitbucket": {
      "type": "sse",
      "url": "http://localhost/mcp-bitbucket"
    }
  }
}
Cleanup

Stop and remove all services:

docker-compose down

Remove built images:

docker rmi arulrajnet/apisix:dev arulrajnet/mcp-bitbucket:v1.39.7
License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Arulraj V
Arul
Follow @arulrajnet on X GitHub @arulrajnet LinkedIn @arulrajnet

Author Information
Arul

• Architect • DevOps • Full Stack Developer • Aspiring Entrepreneur • Dad • working @iotium_inc acquired by @view_inc_

Neeve Inc.,Chennai

40

Followers

72

Repositories

27

Gists

5

Total Contributions

Top Contributors

Threads