Validate and Deploy Your MCP Server
Before publishing your server on AgenticMarket, run the built-in validation audit to catch misconfigurations, missing metadata, and security issues.
Pre-publish validation
bashnpm run validate
This runs agenticmarket validate which checks:
| Check | What it verifies |
|---|---|
| server.json | .mcp/server.json exists and matches the MCP registry schema |
| Name format | MCP name follows io.github.username/project convention |
| Endpoints | At least one tool is registered |
| Security | MCP_SECRET is configured and not empty |
| Package | package.json has required fields (name, version, description) |
| Build | TypeScript compiles without errors |
JSON output (CI mode)
For automated pipelines, use the --json flag:
bashnpx agenticmarket validate --json
Returns structured JSON with pass/fail status for each check:
json{ "valid": true, "checks": { "serverJson": { "pass": true }, "security": { "pass": true }, "endpoints": { "pass": true, "tools": ["get_weather", "get_forecast"] }, "build": { "pass": true } } }
Deploy
You can deploy to any platform that runs Node.js. The scaffolded project includes config files based on your choice during agenticmarket create.
Cloudflare Workers
If you selected Cloudflare during scaffolding, your project includes a wrangler.toml:
bashnpm run build npx wrangler deploy
Set your environment variables in the Cloudflare dashboard or with wrangler secret put.
Docker (Railway, Render, Fly.io)
If you selected Docker, your project includes a Dockerfile:
bashdocker build -t my-server . docker run -p 3000:3000 --env-file .env my-server
For Railway or Render, push your repo and the platform auto-detects the Dockerfile.
Any Node.js host
bashnpm run build npm start
This builds your TypeScript to dist/ and runs it with Node.js. Works on any VPS, container, or PaaS.
Required environment variables in production
| Variable | Required | Description |
|---|---|---|
MCP_SECRET | Yes | Server blocks all requests without this in production |
MCP_SECRET_HEADER | No | Defaults to x-mcp-secret |
NODE_ENV | Yes | Set to production |
PORT | No | Defaults to 3000 |
CORS_ORIGINS | No | Comma-separated allowed origins |
RATE_LIMIT_MAX | No | Defaults to 100 requests per window |
RATE_LIMIT_WINDOW_MS | No | Defaults to 60000 (1 minute) |
For API wrapper projects:
| Variable | Required | Description |
|---|---|---|
API_BASE_URL | Yes | The upstream REST API base URL |
API_KEY | Depends | Your API key for the upstream service |
API_AUTH_HEADER | No | Defaults to x-api-key |
API_TIMEOUT_MS | No | Defaults to 10000 (10 seconds) |
Publish on AgenticMarket
Once your server is deployed and responding to MCP requests:
- Run
npm run validateto confirm everything passes - Run
npm run releaseto bump your version - Submit at agenticmarket.dev/dashboard/submit
- Your server is reviewed within 24 hours
- On approval, users can install it with
agenticmarket install username/server-name
You earn 80% of every call routed through AgenticMarket. The first 100 approved creators earn 90% for 12 months under the Founding Creator Program.
Next steps
- Publishing server guide — metadata, pricing, and review process
- Monetization — earnings, payouts, and pricing strategy
- CLI overview — full command reference
AgenticMarket