Skip to content

Commit 4b63119

Browse files
committed
feat: add admin operations documentation and scripts for server management
🏠 Remote-Dev: homespace
1 parent 654cad4 commit 4b63119

File tree

4 files changed

+152
-0
lines changed

4 files changed

+152
-0
lines changed

docs/admin-operations.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Admin Operations
2+
3+
This is a brief guide for admins and moderators managing content on the registry. All actions should be taken in line with the [moderation guidelines](./moderation-guidelines.md).
4+
5+
## Prerequisites
6+
7+
- Admin account with @modelcontextprotocol.io email
8+
- If you are a maintainer and would like an account, ask in the Discord
9+
- `gcloud` CLI installed and configured
10+
- `curl` and `jq` installed
11+
12+
## Authentication
13+
14+
```bash
15+
# Run this, then run the export command it outputs
16+
./tools/admin/auth.sh
17+
```
18+
19+
## Edit a Server
20+
21+
Step 1: Download Server
22+
23+
```bash
24+
export SERVER_ID="<server-uuid>"
25+
curl -s "https://registry.modelcontextprotocol.io/v0/servers/${SERVER_ID}" > server.json
26+
```
27+
28+
Step 2: Open `server.json` and make changes. You cannot change the server name.
29+
30+
Step 3: Push Changes
31+
32+
```bash
33+
curl -X PUT "https://registry.modelcontextprotocol.io/v0/servers/${SERVER_ID}" \
34+
-H "Authorization: Bearer ${REGISTRY_TOKEN}" \
35+
-H "Content-Type: application/json" \
36+
-d "{\"server\": $(cat server.json)}"
37+
```
38+
39+
## Takedown a Server
40+
41+
```bash
42+
export SERVER_ID="<server-uuid>"
43+
./tools/admin/takedown.sh
44+
```
45+
46+
This soft deletes the server. If you need to delete the content of a server (usually only where legally necessary), use the edit workflow above to scrub it all.

docs/moderation-guidelines.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Moderation Guidelines
2+
3+
Guidelines for server publishers on the Official MCP Registry.
4+
5+
## TL;DR
6+
7+
We're quite permissive! We only remove illegal content, malware, spam and completely broken servers.
8+
9+
We don't make guarantees about our moderation, and subregistries should take our data "as is", assuming minimal to no moderation.
10+
11+
## Scope
12+
13+
These guidelines apply to the **Official MCP Registry** at `registry.modelcontextprotocol.io`.
14+
15+
Subregistries may have their own moderation policies. If you have questions about content on a specific subregistry, please contact them directly.
16+
17+
## Disclaimer
18+
19+
We have limited active moderation capabilities, and this is a community supported projects. We largely rely on upstream package registries (like NPM, PyPi, and Docker) or downstream subregistries (like the GitHub MCP Registry) to do more in-depth moderation.
20+
21+
This means there may be content in the registry that should be removed under these guidelines, which we haven't yet removed. You should treat registry data accordingly.
22+
23+
## What We Remove
24+
25+
We'll remove servers that contain:
26+
27+
- Illegal content, which includes obscene content, copyright violations, and hacking tools
28+
- Malware, regardless of intentions
29+
- Spam, especially mass-created servers that disrupt the registry. Examples:
30+
- The same server being submitted multiple times under different names.
31+
- The server doesn't do anything but provide a fixed response with some marketing copy.
32+
- The server description is stuffed with marketing copy, and its implementation is unrelated to its name or description.
33+
- Non-functioning servers
34+
35+
## What We Don't Remove
36+
37+
Generally, we believe in keeping the registry open and pushing moderation to subregistries. We therefore **won't** remove servers that are:
38+
39+
- Low quality or buggy servers
40+
- Servers with security vulnerabilities
41+
- Do the same thing as other servers
42+
- Provide or contain adult content
43+
44+
## How Removal Works
45+
46+
When we remove a server:
47+
48+
- It's set to "deleted" status but remains accessible via the API
49+
- This allows subregistries to remove it from their indexes
50+
- In extreme cases, we may overwrite or erase details of a server, e.g. where the metadata itself is unlawful
51+
52+
## Appeals
53+
54+
Think we made a mistake? Open an issue on our [GitHub repository](https://github.com/modelcontextprotocol/registry) with:
55+
- The ID and name of your server
56+
- Why you believe it doesn't meet the criteria for removal above
57+
58+
## Changes to this policy
59+
60+
We're still learning how to best run the MCP registry! As such, we might end up changing this policy in the future.

tools/admin/auth.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
# Simple OIDC authentication helper using gcloud
3+
4+
REGISTRY_URL="${REGISTRY_URL:-https://registry.modelcontextprotocol.io}"
5+
6+
if ! gcloud projects list &> /dev/null; then
7+
gcloud auth login >&2
8+
fi
9+
10+
# Get Google Cloud identity token
11+
OIDC_TOKEN=$(gcloud auth print-identity-token)
12+
13+
# Exchange for registry token
14+
RESPONSE=$(curl -s -X POST "${REGISTRY_URL}/v0/auth/oidc" \
15+
-H "Content-Type: application/json" \
16+
-d "{\"oidc_token\": \"${OIDC_TOKEN}\"}")
17+
18+
# Check if successful
19+
REGISTRY_TOKEN=$(echo "$RESPONSE" | jq -r '.registry_token // empty')
20+
21+
if [ -z "$REGISTRY_TOKEN" ]; then
22+
echo "Error: Authentication failed" >&2
23+
echo "$RESPONSE" | jq '.' >&2
24+
exit 1
25+
fi
26+
27+
# Output the export command
28+
echo "# Successfully authenticated! Now run this to use your token:" >&2
29+
echo "export REGISTRY_TOKEN='${REGISTRY_TOKEN}'"

tools/admin/takedown.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Simple takedown script
3+
4+
REGISTRY_URL="${REGISTRY_URL:-https://registry.modelcontextprotocol.io}"
5+
6+
if [ -z "$SERVER_ID" ] || [ -z "$REGISTRY_TOKEN" ]; then
7+
echo "Usage: REGISTRY_TOKEN=<token> SERVER_ID=<server-uuid> $0"
8+
exit 1
9+
fi
10+
11+
# Get current server and update status to deleted
12+
curl -s "${REGISTRY_URL}/v0/servers/${SERVER_ID}" | \
13+
jq '.status = "deleted" | {server: .}' | \
14+
curl -X PUT "${REGISTRY_URL}/v0/servers/${SERVER_ID}" \
15+
-H "Authorization: Bearer ${REGISTRY_TOKEN}" \
16+
-H "Content-Type: application/json" \
17+
-d @-

0 commit comments

Comments
 (0)