You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Streamline installation with single-line curl command
- Remove unnecessary chmod and directory operations
- Condense authentication methods into compact sections
- Simplify language-specific examples
- Add AI assistant prompt tip to publish-server.md
- Update action versions and make tests/builds optional
This makes the guide more succinct and easier to follow while maintaining all essential information.
:house: Remote-Dev: homespace
@@ -12,16 +12,14 @@ By the end of this tutorial, you'll have:
12
12
13
13
## Prerequisites
14
14
15
-
-Already published your server manually (complete [Publishing Tutorial](publish-server.md) first)
15
+
-Understand general publishing requirements like package verification (see the [publishing guide](publish-server.md))
16
16
- GitHub repository with your MCP server code
17
-
- Basic understanding of CI/CD concepts
18
-
- 20-30 minutes
19
17
20
18
## GitHub Actions Setup
21
19
22
20
### Step 1: Create Workflow File
23
21
24
-
Create `.github/workflows/publish-mcp.yml` in your repository:
22
+
Create `.github/workflows/publish-mcp.yml`. Here's an example for NPM-based packages, but the MCP registry publishing steps are the same for all package types:
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_linux_amd64.tar.gz" | tar xz mcp-publisher
73
64
74
65
- name: Login to MCP Registry
75
66
run: ./mcp-publisher login github-oidc
@@ -80,12 +71,9 @@ jobs:
80
71
81
72
### Step 2: Configure Secrets
82
73
83
-
For npm publishing, add your NPM token to repository secrets:
74
+
You don't need any secrets for publishing to the MCP Registry using GitHub OIDC.
84
75
85
-
1. Go to repository Settings → Secrets and variables → Actions
86
-
2. Add `NPM_TOKEN` with your npm access token
87
-
88
-
**Note:** GitHub OIDC authentication requires no additional secrets for MCP Registry publishing.
76
+
However you might need to add secrets for your package registry. For example the workflow above needs a `NPM_TOKEN` (which you can add in Settings → Secrets and variables → Actions).
89
77
90
78
### Step 3: Tag and Release
91
79
@@ -96,28 +84,17 @@ git tag v1.0.0
96
84
git push origin v1.0.0
97
85
```
98
86
99
-
The workflow will:
100
-
1. Run tests
101
-
2. Build your package
102
-
3. Publish to npm
103
-
4. Automatically authenticate with the MCP Registry
104
-
5. Publish updated server.json
87
+
The workflow runs tests, builds your package, publishes to npm, and publishes to the MCP Registry.
105
88
106
-
## Authentication Methods by CI Platform
89
+
## Authentication Methods
107
90
108
-
### GitHub Actions - OIDC (Recommended)
91
+
### GitHub Actions OIDC (Recommended)
109
92
110
93
```yaml
111
94
- name: Login to MCP Registry
112
95
run: mcp-publisher login github-oidc
113
96
```
114
-
115
-
**Advantages:**
116
-
- No secrets to manage
117
-
- Automatically scoped to your repository
118
-
- Most secure option
119
-
120
-
### GitHub Actions - Personal Access Token
97
+
### GitHub Personal Access Token
121
98
122
99
```yaml
123
100
- name: Login to MCP Registry
@@ -128,7 +105,7 @@ The workflow will:
128
105
129
106
Add `MCP_GITHUB_TOKEN` secret with a GitHub PAT that has repo access.
130
107
131
-
### DNS Authentication (Any CI)
108
+
### DNS Authentication
132
109
133
110
For custom domain namespaces (`com.yourcompany/*`):
134
111
@@ -143,154 +120,59 @@ Add your Ed25519 private key as `MCP_PRIVATE_KEY` secret.
**"Publisher binary not found"** - Ensure you download the correct binary for your CI platform (linux/mac/windows).
279
-
280
-
**"Authentication failed"** - For GitHub OIDC, verify `id-token: write` permission is set. For other methods, check secret configuration.
281
-
282
-
**"Package validation failed"** - Ensure your package was published successfully before MCP Registry publishing runs.
283
-
284
-
**"Version already exists"** - Each server.json version must be unique. Consider using build numbers: `1.0.0-build.123`.
285
-
286
-
## What You've Accomplished
287
-
288
-
You now have automated MCP server publishing that:
289
-
- Triggers on version tags
290
-
- Runs tests before publishing
291
-
- Publishes to package registry first
292
-
- Automatically publishes to MCP Registry
293
-
- Handles authentication securely
294
-
- Provides failure notifications
295
-
296
-
Your MCP server publishing is now fully automated - just tag a release and everything happens automatically!
177
+
- **"Authentication failed"**: Ensure `id-token: write` permission is set for OIDC, or check secrets
178
+
- **"Package validation failed"**: Verify your package published to your registry (NPM, PyPi etc.) successfully first, and that you have done the necessary validation steps in the [Publishing Tutorial](publish-server.md)
Copy file name to clipboardExpand all lines: docs/guides/publishing/publish-server.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,12 @@
2
2
3
3
Complete guide to publishing an MCP server to the registry.
4
4
5
+
> [!TIP]
6
+
> Using an agentic AI coding assistant? Just use this prompt:
7
+
> ```
8
+
> Read https://raw.githubusercontent.com/modelcontextprotocol/registry/refs/heads/main/docs/guides/publishing/publish-server.md and https://raw.githubusercontent.com/modelcontextprotocol/registry/refs/heads/main/docs/guides/publishing/github-actions.md. Evaluate the best way to publish this server to the registry (prefer automated CI flows over manual flows where possible), and implement that. If possible, validate the server.json against the $schema before telling the user you are done, using a proper json schema library or tool available on the user's machine. If you get stuck, guide the user through the parts of the publishing process they need to do (e.g. logging into the publisher CLI if doing manual pubishing).
0 commit comments