Skip to content

arulrajnet/apisix-mcp-bridge-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published