Skip to content

Conversation

@Fadil369
Copy link

This PR adds a new Custom MCP Gateway example and CI workflow.

Highlights:

  • New example at custom-mcp/ with a Docker MCP Gateway wired for:
    • duckduckgo, github-official, brave, wikipedia-mcp
    • postgres with SQL query tool (uses database-url secret from postgres_url file)
  • Secrets wiring via .mcp.env and postgres_url; updated README with instructions
  • Taskfile targets (up, down, build, clean) for developer convenience
  • CI: Markdown and YAML lint workflow

Notes:

Copilot AI review requested due to automatic review settings December 11, 2025 16:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive Custom MCP Gateway example demonstrating how to configure and run a Docker MCP Gateway with multiple MCP servers, along with CI infrastructure for code quality checks.

  • Introduces a new custom-mcp/ example with Docker Compose configuration for MCP Gateway
  • Implements secrets management via .mcp.env and postgres_url files with example templates
  • Adds CI workflow for Markdown and YAML linting across the repository

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
custom-mcp/mcp.env.example Template file showing required environment variables and secrets for MCP servers
custom-mcp/compose.yaml Docker Compose configuration for MCP Gateway with multiple servers (duckduckgo, github-official, brave, wikipedia-mcp, postgres)
custom-mcp/Taskfile.yaml Task definitions for managing the stack (up, down, build, clean)
custom-mcp/README.md Documentation explaining setup, usage, and configuration of the custom MCP Gateway
README.md Updates main repository table to include the new custom MCP Gateway example
.gitignore Adds patterns to exclude secret files (.mcp.env, postgres_url) from version control
.github/workflows/ci.yml New CI workflow for automated Markdown and YAML linting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

2. cp mcp.env.example .mcp.env
3. Fill in required secrets (e.g., GITHUB_TOKEN for `github-official`).

Run
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section header should use a level 2 markdown heading (##) for proper document structure.

Suggested change
Run
## Run

Copilot uses AI. Check for mistakes.
postgres://user:password@host:5432/dbname
- This is mounted as a secret named `database-url` and used by the gateway.

Notes
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section header should use a level 2 markdown heading (##) for proper document structure.

Suggested change
Notes
## Notes

Copilot uses AI. Check for mistakes.
# secrets can be provided multiple times and referenced per server
- --secrets=docker-desktop:/run/secrets/mcp_secret
# For Postgres DSN
- --secrets=/run/secrets/database-url
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secrets path format is inconsistent. Line 19 uses 'docker-desktop:/run/secrets/mcp_secret' with a prefix notation, while line 21 uses '/run/secrets/database-url' without a prefix. Consider using a consistent format for both secrets to improve maintainability and clarity.

Suggested change
- --secrets=/run/secrets/database-url
- --secrets=docker-desktop:/run/secrets/database-url

Copilot uses AI. Check for mistakes.
secrets:
mcp_secret:
file: ./.mcp.env
database-url:
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The database-url secret references './postgres_url' file which doesn't exist in the repository and isn't created by default. This will cause the compose stack to fail to start unless the user manually creates this file. Consider either making this secret optional, documenting the requirement more prominently in the compose file, or providing an example postgres_url.example file similar to the mcp.env.example pattern.

Suggested change
database-url:
database-url:
# IMPORTANT: You must create the './postgres_url' file containing your Postgres DSN.
# See 'postgres_url.example' for a template/example.

Copilot uses AI. Check for mistakes.
| [ADK](https://github.com/google/adk-python) Sock Store Agent | Multi-Agent | qwen3 | MongoDb, Brave, Curl, | [./adk-sock-shop](./adk-sock-shop/) | [compose.yaml](./adk-sock-shop/compose.yaml) |
| [Langchaingo](https://github.com/tmc/langchaingo) DuckDuckGo Search | Single Agent | gemma3 | duckduckgo | [./langchaingo](./langchaingo) | [compose.yaml](./langchaingo/compose.yaml) |
| [MinionS](https://github.com/HazyResearch/minions) Cost-Efficient Local-Remote Collaboration | Local-Remote Protocol | qwen3(local), gpt-4o(remote) | | [./minions](./minions) | [docker-compose.minions.yml](https://github.com/HazyResearch/minions/blob/main/apps/minions-docker/docker-compose.minions.yml) |
| Custom MCP Gateway (this repo) | Gateway + Tools | none | duckduckgo, github-official (extensible) | [./custom-mcp](./custom-mcp) | [compose.yaml](./custom-mcp/compose.yaml) |
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MCPs column lists "duckduckgo, github-official (extensible)" but the actual compose.yaml includes additional servers: brave, wikipedia-mcp, and postgres. Consider updating this to be more accurate, such as "duckduckgo, github-official, brave, wikipedia-mcp, postgres (extensible)" or "duckduckgo, github-official, brave, and more (extensible)".

Suggested change
| Custom MCP Gateway (this repo) | Gateway + Tools | none | duckduckgo, github-official (extensible) | [./custom-mcp](./custom-mcp) | [compose.yaml](./custom-mcp/compose.yaml) |
| Custom MCP Gateway (this repo) | Gateway + Tools | none | duckduckgo, github-official, brave, wikipedia-mcp, postgres (extensible) | [./custom-mcp](./custom-mcp) | [compose.yaml](./custom-mcp/compose.yaml) |

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +30
# Postgres server and SQL tool (requires database-url secret file)
- --servers=postgres
- --tools=query
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The postgres server is enabled by default but requires the database-url secret file to exist. Since this file doesn't exist by default and may not be needed by all users, consider adding a comment here noting that users can remove or comment out the postgres server and related secret references (lines 29-30, 33, 46-47) if they don't need postgres functionality.

Copilot uses AI. Check for mistakes.

This example wires a Docker MCP Gateway with a flexible set of MCP servers and secrets loaded from a `.mcp.env` file.

Prerequisites
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section headers in this README file should use proper markdown heading levels. "Prerequisites", "Setup", "Run", "Modify servers", "Included servers & secrets", and "Notes" should be marked as level 2 headings (##) for better document structure and accessibility.

Copilot uses AI. Check for mistakes.
- The gateway will listen on port 8811. A health endpoint is available at:
http://localhost:8811/health

Modify servers
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section header should use a level 2 markdown heading (##) for proper document structure.

Suggested change
Modify servers
## Modify servers

Copilot uses AI. Check for mistakes.
- Edit compose.yaml and add or remove `--servers=...` entries on the mcp-gateway service.
- If a server needs credentials, add them to `.mcp.env` and reference via `--secrets=...` if required.

Included servers & secrets
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section header should use a level 2 markdown heading (##) for proper document structure.

Suggested change
Included servers & secrets
## Included servers & secrets

Copilot uses AI. Check for mistakes.
- Docker Desktop 4.43+ or Docker Engine with Compose v2.38.1+
- Optional: Docker Model Runner if you plan to use local models

Setup
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section header should use a level 2 markdown heading (##) for proper document structure.

Copilot uses AI. Check for mistakes.
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