Skip to content

Commit 21080ac

Browse files
committed
chore: add details to contributing and supporting scripts
Signed-off-by: Ivan Pedrazas <ivan.pedrazas@docker.com>
1 parent 65de7af commit 21080ac

2 files changed

Lines changed: 130 additions & 4 deletions

File tree

CONTRIBUTING.md

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,78 @@
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-
## Getting Started
6+
## Pull request process
7+
8+
- All commits must include a Signed-off-by trailer at the end of each commit message to indicate that the contributor agrees to the Developer Certificate of Origin.
9+
- Fork the repository to your own GitHub account and clone it locally.
10+
- Make your changes. To add a new MCP Server, create a new folder under `servers` with the name of your server and add a `server.yaml` inside.
11+
- Correctly format your commit messages, see Commit message guidelines below.
12+
- Open a PR by ensuring the title and its description reflect the content of the PR.
13+
- Ensure that CI passes, if it fails, fix the failures.
14+
- Every pull request requires a review from the Docker team before merging.
15+
- Once approved, all of your commits will be squashed into a single commit with your PR title.
716

8-
Create an Issue in this repository using the `mcp-submission` [template](https://github.com/docker/mcp-registry/issues/new/choose).
17+
## Getting Started
918

1019
You will need to provide:
1120

1221
- A valid name for your MCP
13-
- The GitHub URL of your project
22+
- The GitHub URL of your project. The project needs to have a valid Dockerfile.
1423
- A brief description of your MCP Server.
1524

16-
The issue will start a manual process where your MCP Server will be reviewed, validated and, if macthes all the conditions, added to the repository and once all the tests pass, added to the registry.
25+
Let's assume we have a new MCP Server to access my org's database. The MCP is called `My-ORGDB-MCP` and the GitHub repo is located at: https://github.com/myorg/my-orgdb-mcp We have created a bash script to simplify the creation process.
26+
27+
```
28+
./scripts/new-server.sh My-ORGDB-MCP databases https://github.com/myorg/my-orgdb-mcp
29+
```
30+
31+
This will create a directory under `servers` as follows: `./servers/my-orgdb-mcp` and inside you will find a `server.yaml` file with your MCP definition.
32+
33+
```
34+
server:
35+
name: test01
36+
image: mcp/test01
37+
type: server
38+
meta:
39+
category: test
40+
tags:
41+
- test
42+
highlighted: false
43+
about:
44+
title: test01
45+
icon: https://avatars.githubusercontent.com/u/182288589?s=200&v=4
46+
source:
47+
project: https://github.com/docker/mcp-registry
48+
branch: main
49+
# config:
50+
# description: TODO
51+
# secrets:
52+
# - name: test01.secret_name
53+
# env: TEST01
54+
# example: TODO
55+
# env:
56+
# - name: ENV_VAR_NAME
57+
# example: TODO
58+
# value: '{{test01.env_var_name}}'
59+
# parameters:
60+
# type: object
61+
# properties:
62+
# param_name:
63+
# type: string
64+
# required:
65+
# - param_name
66+
```
67+
68+
If you want to use a Docker image built by your organisation, you can pass it to the script as follows:
69+
70+
```
71+
IMAGE_NAME=myorg/myimage ./scripts/new-server.sh My-ORGDB-MCP databases https://github.com/myorg/my-orgdb-mcp
72+
```
73+
74+
As you can see, the configuration block has been commented out. If you need to pass environmental variables or secrets, please uncomment the
75+
necessary lines.
76+
77+
## Testing your MCP Server
1778

1879
## Code of Conduct
1980

scripts/new-server.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
6+
NEW_SERVER_NAME=$(echo "$1" | tr '[:upper:]' '[:lower:]')
7+
NEW_SERVER_NAME_UPPER=$(echo "$1" | tr '[:lower:]' '[:upper:]')
8+
9+
PATH_TO_SERVER="./servers/$NEW_SERVER_NAME"
10+
CATEGORY=$(echo "$2" | tr '[:upper:]' '[:lower:]')
11+
12+
# IF IMAGE_NAME IS NOT PROVIDED, USE THE DEFAULT ONE
13+
IMAGE_NAME=${IMAGE_NAME:-"mcp/$NEW_SERVER_NAME"}
14+
15+
16+
if [[ -f "$NEW_SERVER_NAME" ]]; then
17+
echo "❌ File already exists: $NEW_SERVER_NAME"
18+
exit 1
19+
fi
20+
21+
echo "Creating new server: $NEW_SERVER_NAME"
22+
23+
mkdir -p "$PATH_TO_SERVER"
24+
25+
echo "Server created successfully"
26+
27+
echo "Creating server.yaml"
28+
29+
echo "server:
30+
name: $NEW_SERVER_NAME
31+
image: $IMAGE_NAME
32+
type: server
33+
meta:
34+
category: $CATEGORY
35+
tags:
36+
- $CATEGORY
37+
highlighted: false
38+
about:
39+
title: $NEW_SERVER_NAME
40+
icon: https://avatars.githubusercontent.com/u/182288589?s=200&v=4
41+
source:
42+
project: $3
43+
branch: main
44+
# config:
45+
# description: "TODO"
46+
# secrets:
47+
# - name: $NEW_SERVER_NAME.secret_name
48+
# env: $NEW_SERVER_NAME_UPPER
49+
# example: "TODO"
50+
# env:
51+
# - name: ENV_VAR_NAME
52+
# example: "TODO"
53+
# value: '{{$NEW_SERVER_NAME.env_var_name}}'
54+
# parameters:
55+
# type: object
56+
# properties:
57+
# param_name:
58+
# type: string
59+
# required:
60+
# - param_name
61+
62+
" > "$PATH_TO_SERVER/server.yaml"
63+
64+
echo "$NEW_SERVER_NAME created successfully"
65+

0 commit comments

Comments
 (0)