Skip to content

Commit 8fd18dd

Browse files
authored
Merge pull request #340 from docker/remote_contribution_guide
2 parents abc600e + a7cdfbf commit 8fd18dd

File tree

6 files changed

+485
-1
lines changed

6 files changed

+485
-1
lines changed

CONTRIBUTING.md

Lines changed: 157 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@
33
Thank you for your interest in contributing to the official Docker MCP Registry.
44
This document outlines how to contribute to this project.
55

6+
## 📦 Types of MCP Servers
7+
8+
There are two types of MCP servers you can add to the registry:
9+
10+
### 🏠 Local Servers (Containerized)
11+
Local servers run in Docker containers on your machine. They:
12+
- Require a Dockerfile in the source repository
13+
- Are built and hosted as Docker images
14+
- Run locally with full container isolation
15+
- Can benefit from Docker-built images with enhanced security features (signatures, provenance, SBOMs, automatic updates)
16+
17+
### 🌐 Remote Servers (Hosted)
18+
Remote servers are hosted externally and accessed via HTTP(S). They:
19+
- Don't require a Dockerfile (already deployed somewhere)
20+
- Use `streamable-http` or `sse` transport protocols
21+
- Often require OAuth authentication
22+
- Have dynamic tool discovery
23+
24+
**If you're adding a remote server,** skip to the [Adding a Remote MCP Server](#adding-a-remote-mcp-server) section below.
25+
626
## Prerequisites
727

828
- Go v1.24+
@@ -20,7 +40,7 @@ This document outlines how to contribute to this project.
2040
- Every pull request requires a review from the Docker team before merging.
2141
- Once approved, all of your commits will be squashed into a single commit with your PR title.
2242

23-
## 📋 Step-by-Step Guide
43+
## 🏠 Adding a Local MCP Server
2444

2545
### 1️⃣ Fork this repository
2646

@@ -180,6 +200,142 @@ Upon approval your entry will be processed and it will be available in 24 hours
180200
- [Docker Desktop's MCP Toolkit](https://www.docker.com/products/docker-desktop/)
181201
- [Docker Hub `mcp` namespace](https://hub.docker.com/u/mcp) (for MCP servers built by Docker)
182202

203+
---
204+
205+
## 🌐 Adding a Remote MCP Server
206+
207+
Remote MCP servers are already hosted externally and don't require Docker image building. They communicate via HTTP(S) protocols.
208+
209+
### Prerequisites for Remote Servers
210+
211+
- A publicly accessible MCP server endpoint (e.g., `https://mcp.example.com/mcp`)
212+
- Knowledge of the transport protocol (`streamable-http` or `sse`)
213+
- A documentation URL for your server
214+
- OAuth configuration details (if authentication is required)
215+
216+
### 1️⃣ Fork this repository
217+
218+
Fork the repository to your own GitHub account and clone it locally.
219+
220+
#### 2️⃣ Create your remote server entry using `task remote-wizard`
221+
222+
The easiest way to create a remote server configuration is using the wizard:
223+
224+
```bash
225+
task remote-wizard
226+
```
227+
228+
The wizard will guide you through:
229+
1. **Basic Information**: Server name and category
230+
2. **Server Details**: Title, description, icon URL, and documentation URL
231+
3. **Remote Configuration**: Transport type (streamable-http or sse) and server URL
232+
4. **OAuth Configuration**: Simple yes/no question
233+
234+
If OAuth is enabled, the wizard automatically generates:
235+
- **Provider**: Uses your server name (e.g., `linear`)
236+
- **Secret**: `{server-name}.personal_access_token` (e.g., `linear.personal_access_token`)
237+
- **Environment Variable**: `{SERVER_NAME}_PERSONAL_ACCESS_TOKEN` (e.g., `LINEAR_PERSONAL_ACCESS_TOKEN`)
238+
239+
This will create a directory under `servers/` with three files:
240+
- `server.yaml` - Server configuration
241+
- `tools.json` - Empty array (for dynamic tool discovery)
242+
- `readme.md` - Documentation link
243+
244+
#### 3️⃣ Review the generated files
245+
246+
The wizard has created all necessary files for you. The `tools.json` file is always an empty array `[]` for remote servers because they use dynamic tool discovery. The `readme.md` file contains your documentation link.
247+
248+
#### 4️⃣ Example remote server structure
249+
250+
Your remote server directory should look like this:
251+
252+
```
253+
servers/my-remote-server/
254+
├── server.yaml # Server configuration
255+
├── tools.json # Always [] for remote servers
256+
└── readme.md # Documentation link (required)
257+
```
258+
259+
Example `server.yaml` for a remote server **with OAuth** (like `servers/linear`):
260+
261+
```yaml
262+
name: linear
263+
type: remote
264+
dynamic:
265+
tools: true
266+
meta:
267+
category: productivity
268+
tags:
269+
- productivity
270+
- project-management
271+
- remote
272+
about:
273+
title: Linear
274+
description: Track issues and plan sprints
275+
icon: https://www.google.com/s2/favicons?domain=linear.app&sz=64
276+
remote:
277+
transport_type: streamable-http
278+
url: https://mcp.linear.app/mcp
279+
oauth:
280+
- provider: linear
281+
secret: linear.personal_access_token
282+
env: LINEAR_PERSONAL_ACCESS_TOKEN
283+
```
284+
285+
Example `server.yaml` for a remote server **without OAuth** (like `servers/cloudflare-docs`):
286+
287+
```yaml
288+
name: cloudflare-docs
289+
type: remote
290+
meta:
291+
category: documentation
292+
tags:
293+
- documentation
294+
- cloudflare
295+
- remote
296+
about:
297+
title: Cloudflare Docs
298+
description: Access the latest documentation on Cloudflare products
299+
icon: https://www.cloudflare.com/favicon.ico
300+
remote:
301+
transport_type: sse
302+
url: https://docs.mcp.cloudflare.com/sse
303+
```
304+
305+
**Note:** Remote servers without OAuth don't need the `oauth` field or `dynamic.tools` field in their configuration.
306+
307+
#### 5️⃣ Test your remote server locally
308+
309+
You can test your remote server configuration by importing it into Docker Desktop:
310+
311+
```bash
312+
task catalog -- my-remote-server
313+
docker mcp catalog import $PWD/catalogs/my-remote-server/catalog.yaml
314+
docker mcp server enable my-remote-server
315+
```
316+
317+
For OAuth-enabled servers, authorize the server:
318+
319+
```bash
320+
docker mcp oauth authorize my-remote-server
321+
```
322+
323+
Now you can start the gateway with `docker mcp gateway run` and test tool calls to the remote server.
324+
325+
When done testing, reset the catalog:
326+
327+
```bash
328+
docker mcp catalog reset
329+
```
330+
331+
#### 6️⃣ Open a pull request
332+
333+
Create a pull request with your remote server files. Make sure to:
334+
- Include all required files (`server.yaml`, `tools.json`, and `readme.md`)
335+
- Verify that your server URL is publicly accessible
336+
- Test OAuth configuration if applicable
337+
- Ensure the documentation URL in `readme.md` is valid
338+
183339
## 📜 Code of Conduct
184340

185341
This project follows a Code of Conduct. Please review it in

Taskfile.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ tasks:
1717
desc: Run the wizard
1818
cmd: go run ./cmd/wizard {{.CLI_ARGS}}
1919

20+
remote-wizard:
21+
desc: Run the remote server wizard
22+
cmd: go run ./cmd/remote-wizard {{.CLI_ARGS}}
23+
2024
validate:
2125
desc: Validate a server
2226
cmd: go run ./cmd/validate {{.CLI_ARGS}}

0 commit comments

Comments
 (0)