docs-build-publish.md
Publish your MCP server to Smithery for distribution, analytics, and configuration UI.
Local (MCPB Bundle)
Bring your own hosting — Smithery Gateway proxies to your upstream server.
No client registration needed. Smithery handles client registration automatically via Client ID Metadata Documents.
Need a framework or hosting? Build MCP servers with xmcp or host them on Gram — both work with Smithery’s URL publishing.
Smithery scans your server to extract metadata (tools, prompts, resources) for your server page.
Static Server Card (manual metadata)
If automatic scanning can’t complete (auth wall, required configuration, or other issues), you can provide server metadata manually via a static server card at /.well-known/mcp/server-card.json:
{
"serverInfo": {
"name": "Your Server Name",
"version": "1.0.0"
},
"authentication": {
"required": true,
"schemes": ["oauth2"]
},
"tools": [
{
"name": "search",
"description": "Search for information",
"inputSchema": {
"type": "object",
"properties": {
"query": { "type": "string" }
},
"required": ["query"]
}
}
],
"resources": [],
"prompts": []
}
Fields:
serverInfo (required): Server name and versionauthentication (optional): Auth requirements and supported schemestools, resources, prompts (optional): Capability definitions per MCP specThe schema follows types from @modelcontextprotocol/sdk/types.js. See SEP-1649 for the spec proposal.
CLI (Advanced)
You can also publish a URL-based server via CLI with a custom config schema:
smithery mcp publish "https://your-server.com/mcp" -n @your-org/your-server
To specify a config schema, pass it as a JSON string:
smithery mcp publish "https://your-server.com/mcp" -n @your-org/your-server --config-schema '{"type":"object","properties":{"apiKey":{"type":"string"}}}'
See Session Configuration for JSON Schema format with x-from extension.
For local stdio servers — Smithery distributes a pre-built MCPB bundle that clients download and run locally.
.mcpb bundleFor MCPB authoring guidance, see Anthropic’s Build a desktop extension with MCPB guide and the MCPB specification.
server.mcpb — the MCPB bundle distributed to clientsAPI
Smithery accepts multipart bundle uploads for stdio releases. See Publish a server.
CLI (Advanced)
Publish a bundle with:
smithery mcp publish ./server.mcpb -n your-org/your-server
If your deployment fails with “Initialization failed with status 403” , it means your server rejected Smithery’s scan request. Common causes:
Smithery sends requests with User-Agent SmitheryBot/1.0 (+https://smithery.ai). These requests originate from Cloudflare Workers, which some WAF configurations block by default.
If your server requires OAuth, make sure it returns 401 Unauthorized (not 403 Forbidden) for unauthenticated requests. Smithery uses the 401 response to detect OAuth support per RFC 9728.
Cloudflare (Free plan / Bot Fight Mode)
Bot Fight Mode on the free plan cannot be bypassed with WAF custom rules. Your options:
Cloudflare (Pro+ / Super Bot Fight Mode)
Create a WAF skip rule to bypass bot protection for Smithery:
(http.user_agent contains "SmitheryBot")Other CDN / WAF providers
Add an allow rule for requests matching User-Agent SmitheryBot/1.0. The exact steps vary by provider — consult your CDN/WAF documentation for configuring User-Agent-based allow rules.
Bypass scanning entirely by serving a /.well-known/mcp/server-card.json endpoint on your server. See Static Server Card above.
Once your server is published, open the server’s Settings → Verification page to complete the automatic official-vendor verification checklist.
Was this page helpful?
YesNo
⌘I