Skip to content

Commit 1ece882

Browse files
committed
Add MCP registry publishing configuration (server.json, package.json updates, documentation)
1 parent 8b49a68 commit 1ece882

File tree

8,953 files changed

+38863
-1442337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,953 files changed

+38863
-1442337
lines changed

CICD_PIPELINE_EXPLAINED.md

Lines changed: 433 additions & 0 deletions
Large diffs are not rendered by default.

MCP_REGISTRY_PUBLISHING.md

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# Publishing fo-semantic-mcp to MCP Registry
2+
3+
This guide explains how to publish this MCP server to the official Model Context Protocol registry.
4+
5+
> 💡 **Want to understand how the automation works?** See [CICD_PIPELINE_EXPLAINED.md](CICD_PIPELINE_EXPLAINED.md) for a complete walkthrough from code commit to registry update, including where the pipeline is hosted and how authentication works.
6+
7+
## ✅ What's Already Done
8+
9+
The automated publishing infrastructure is now set up:
10+
11+
1. **`package.json`** - Added `mcpName` field for package validation
12+
2. **`server.json`** - Created and validated against MCP registry schema
13+
3. **`.github/workflows/publish-mcp.yml`** - GitHub Actions workflow for automated publishing
14+
15+
## 📋 Prerequisites
16+
17+
Before you can publish, you need:
18+
19+
1. **npm Account** - Create one at https://www.npmjs.com/signup
20+
2. **npm Package Published** - The package must be on npm first
21+
3. **GitHub Repository** - Already set up at https://github.com/xplusplusai/fo-semantic-mcp
22+
23+
## 🚀 Publishing Steps
24+
25+
### Step 1: Publish to npm (First Time Only)
26+
27+
The package **must** be published to npm before the MCP registry can validate it.
28+
29+
```bash
30+
# Login to npm
31+
npm login
32+
33+
# Publish the package
34+
cd fo-semantic-mcp-release
35+
npm publish
36+
```
37+
38+
**Important Notes:**
39+
- You only need to do this once manually
40+
- Future releases will be automated via GitHub Actions
41+
- The MCP registry validates that your npm package contains the `mcpName` field
42+
43+
### Step 2: Add npm Token to GitHub Secrets
44+
45+
For automated publishing to work, you need to add your npm token to GitHub:
46+
47+
1. **Generate npm Token:**
48+
```bash
49+
npm token create
50+
```
51+
Choose "Publish" when prompted.
52+
53+
2. **Add to GitHub Secrets:**
54+
- Go to: https://github.com/xplusplusai/fo-semantic-mcp/settings/secrets/actions
55+
- Click "New repository secret"
56+
- Name: `NPM_TOKEN`
57+
- Value: Paste the token from step 1
58+
- Click "Add secret"
59+
60+
### Step 3: Create a Version Tag
61+
62+
Once npm is set up, publish new versions by creating git tags:
63+
64+
```bash
65+
cd fo-semantic-mcp-release
66+
67+
# Update version in package.json and server.json first
68+
# Then commit and create a tag
69+
70+
git add .
71+
git commit -m "Release v2.0.0"
72+
git tag v2.0.0
73+
git push origin main
74+
git push origin v2.0.0
75+
```
76+
77+
The GitHub Actions workflow will automatically:
78+
1. ✅ Run tests (if present)
79+
2. ✅ Build the package
80+
3. ✅ Publish to npm
81+
4. ✅ Authenticate with MCP registry via GitHub OIDC
82+
5. ✅ Publish to MCP registry
83+
84+
### Step 4: Verify Publication
85+
86+
After the workflow completes, verify your server appears in the registry:
87+
88+
```bash
89+
curl "https://registry.modelcontextprotocol.io/v0/servers?search=io.github.xplusplusai/fo-semantic-mcp"
90+
```
91+
92+
You should see your server metadata in the JSON response.
93+
94+
## 🔄 Publishing Future Versions
95+
96+
For subsequent releases, the process is simple:
97+
98+
1. **Update version numbers:**
99+
- `package.json`: Update `"version": "2.0.1"`
100+
- `server.json`: Update `"version": "2.0.1"` AND `packages[0].version: "2.0.1"`
101+
102+
2. **Create and push tag:**
103+
```bash
104+
git add package.json server.json
105+
git commit -m "Release v2.0.1"
106+
git tag v2.0.1
107+
git push origin main
108+
git push origin v2.0.1
109+
```
110+
111+
3. **Done!** GitHub Actions handles the rest.
112+
113+
## 📝 Server Configuration Details
114+
115+
### server.json
116+
117+
```json
118+
{
119+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
120+
"name": "io.github.xplusplusai/fo-semantic-mcp",
121+
"title": "FO Semantic MCP",
122+
"description": "Semantic search over 50,000+ Dynamics 365 F&O artifacts: tables, forms, classes, and more.",
123+
"version": "2.0.0",
124+
"packages": [
125+
{
126+
"registryType": "npm",
127+
"identifier": "fo-semantic-mcp",
128+
"version": "2.0.0",
129+
"transport": {
130+
"type": "stdio"
131+
}
132+
}
133+
]
134+
}
135+
```
136+
137+
**Key Fields:**
138+
- **name**: `io.github.xplusplusai/fo-semantic-mcp` - Uses GitHub namespace for automatic OIDC auth
139+
- **description**: Max 100 characters
140+
- **packages**: References the npm package identifier
141+
142+
### package.json
143+
144+
```json
145+
{
146+
"name": "fo-semantic-mcp",
147+
"mcpName": "io.github.xplusplusai/fo-semantic-mcp",
148+
...
149+
}
150+
```
151+
152+
The `mcpName` field is **required** for MCP registry validation. It must match the `name` field in `server.json`.
153+
154+
## 🔧 Troubleshooting
155+
156+
**"Package validation failed"**
157+
- Ensure the package is published to npm first
158+
- Verify `mcpName` in package.json matches `name` in server.json
159+
- Check that the npm package is publicly accessible
160+
161+
**"Authentication failed"**
162+
- Verify the GitHub Actions workflow has `id-token: write` permission (already configured)
163+
- Check that you're pushing to the correct repository
164+
165+
**"Namespace not authorized"**
166+
- The `io.github.xplusplusai/*` namespace requires the repository to be owned by `xplusplusai`
167+
- OIDC authentication is automatic for matching GitHub usernames
168+
169+
**npm publish fails**
170+
- Verify you're logged in: `npm whoami`
171+
- Check package name isn't already taken
172+
- Ensure you have publish permissions
173+
174+
## 📚 Additional Resources
175+
176+
- [MCP Publishing Guide](https://github.com/modelcontextprotocol/registry/blob/main/docs/guides/publishing/publish-server.md)
177+
- [GitHub Actions Guide](https://github.com/modelcontextprotocol/registry/blob/main/docs/guides/publishing/github-actions.md)
178+
- [MCP Registry](https://registry.modelcontextprotocol.io)
179+
180+
## 🎯 Quick Reference Commands
181+
182+
```bash
183+
# Publish to npm (first time)
184+
npm login
185+
npm publish
186+
187+
# Release new version
188+
# 1. Update version in package.json and server.json
189+
# 2. Then:
190+
git add package.json server.json
191+
git commit -m "Release v2.0.1"
192+
git tag v2.0.1
193+
git push origin main
194+
git push origin v2.0.1
195+
196+
# Verify in registry
197+
curl "https://registry.modelcontextprotocol.io/v0/servers?search=io.github.xplusplusai/fo-semantic-mcp"
198+
```
199+
200+
---
201+
202+
**Ready to publish?** Start with Step 1 above to publish to npm, then follow the automated workflow for all future releases!

node_modules/.bin/acorn

Lines changed: 0 additions & 16 deletions
This file was deleted.

node_modules/.bin/acorn.cmd

Lines changed: 0 additions & 17 deletions
This file was deleted.

node_modules/.bin/acorn.ps1

Lines changed: 0 additions & 28 deletions
This file was deleted.

node_modules/.bin/ajv

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/ajv.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/ajv.ps1

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/baseline-browser-mapping

Lines changed: 0 additions & 16 deletions
This file was deleted.

node_modules/.bin/baseline-browser-mapping.cmd

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)