{"slug": "how-i-registered-an-mcp-server-for-3760-retailers-and-what-i-learned", "title": "How I registered an MCP server for 3,760 retailers — and what I learned", "summary": "Process of registering the \"CLI Market\" server on the official MCP Registry, which involved creating a `mcp.json` file, proving ownership by embedding a specific HTML comment in the PyPI package's README, and passing schema validation. The author notes that the registry validates ownership and schema compliance, and shares lessons learned, such as reading the API spec first and scripting the authentication flow to avoid errors. The server now provides 12 tools that allow AI agents to search, compare, and purchase from 3,760 retailers across 67 countries.", "body_md": "Yesterday CLI Market was a PyPI package.\nThis week it's an official MCP Registry server:\nHere's what it took to get listed, what the registry validation looks like, and why MCP is the missing layer between e-commerce and AI agents.\n**\n**\nThe Model Context Protocol Registry at registry.modelcontextprotocol.io is the canonical\ndirectory of MCP servers. Getting listed isn't just about having a working server — the registry validates ownership, checks schema compliance, and verifies that the package actually exists.\n*Step 1: The mcp.json\nfile\n*\nEvery MCP server needs a mcp.json at the repo root. Ours:\n{\n\"$schema\": \"https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json\"\n,\n\"name\": \"io.github.Treevu-ai/cli-market\",\n\"title\": \"CLI Market\",\n\"version\": \"1.0.1\",\n\"description\": \"12 MCP tools for search, compare, purchase across 3,760 retailers in 67 c\nountries\",\n\"repository\": {\n\"url\": \"https://github.com/Treevu-ai/cli-market-world\",\n\"source\": \"github\"\n},\n\"packages\": [{\n\"registryType\": \"pypi\",\n\"identifier\": \"cli-market\",\n\"version\": \"1.0.17\",\n\"transport\": { \"type\": \"stdio\" }\n}]\n}\nKey decisions:\n*Step 2: Proving ownership\n*\nThe registry doesn't trust that cli-market on PyPI belongs to Treevu-ai on GitHub. It validates by scanning the PyPI package README for a specific HTML comment:\n<!-- mcp-name: io.github.Treevu-ai/cli-market -->\nThis line must appear in the README that renders on PyPI. The registry fetches the package, parses the README, and checks that the annotation matches the server name. If it doesn't match — rejected.\nWe added this to our README, bumped the version to 1.0.17, and uploaded to PyPI. The registry validated it in under a second.\n*Step 3: Schema validation\n*\nThe publish endpoint runs the full ServerJSON schema validator. Every field is checked:\ndescription max 100 characters, name must match ^[a-zA-Z0-9.-]+/[a-zA-Z0-9._-]+$,\npackages[].identifier must resolve in the registry, packages[].transport.type must be stdio/\nstreamable-http/sse.\nOne thing that tripped us up: the schema changed between mcp.json (the repo-side format) and ServerJSON (the registry API format). In the repo, you declare command, args, type. In the registry API, those go inside packages[].transport and packages[] requires registryType + identifier + transport. Getting this right took a few rounds.\n*Step 4: Authentication\n*\nThe registry uses GitHub OAuth. We exchanged a GitHub token for a registry JWT:\nPOST /v0.1/auth/github-at → { registry_token: \"eyJ...\" }\nThen published:\nPOST /v0.1/publish → { server: {...}, _meta: { status: \"active\" } }\nThe token expires, so for updates you re-authenticate. The whole flow is scriptable in under 10 lines of bash.\nThe 12 tools: architecture\nAll 12 tools sit on top of a unified VTEX connector that normalizes 3,760 retailer APIs into a single JSON schema.\n_Four tools deserve special attention:\n_\nThe composition pattern — Tools are atomic enough to compose, composite enough to not drown the agent. 12 tools. Not 1 mega-tool. Not 100 individual REST endpoints.\n───\nWhat I'd do differently\nRead the OpenAPI spec first. The publish endpoint schema is documented at /docs. I guessed from the mcp.json format and hit 5 validation errors before getting it right.\nSet up the PyPI annotation early. The mcp-name comment is the ownership proof. Add it to your README before you publish to the registry.\nScript the auth flow. GitHub token → registry JWT → publish. Three curl calls. Wrap them in a Makefile target and forget about it.\n───\nCLI Market is on the registry.\nThe agent can now search, compare, and buy across 3,760 retailers in 67 countries — all via structured tool calls with zero scraping.\npip install cli-market\nio.github.Treevu-ai/cli-market\ngithub.com/Treevu-ai/cli-market-world\nRicardo Cuba\nFounder & Product Lead | CLI Market\nCEO Sinapsis Innovadora\nTrujillo, Perú", "url": "https://wpnews.pro/news/how-i-registered-an-mcp-server-for-3760-retailers-and-what-i-learned", "canonical_source": "https://dev.to/ricardo_cuba/how-i-registered-an-mcp-server-for-3760-retailers-and-what-i-learned-4npm", "published_at": "2026-05-20 00:08:56+00:00", "updated_at": "2026-05-20 00:32:05.557844+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "open-source"], "entities": ["CLI Market", "PyPI", "MCP Registry", "Treevu-ai", "GitHub", "Model Context Protocol"], "alternates": {"html": "https://wpnews.pro/news/how-i-registered-an-mcp-server-for-3760-retailers-and-what-i-learned", "markdown": "https://wpnews.pro/news/how-i-registered-an-mcp-server-for-3760-retailers-and-what-i-learned.md", "text": "https://wpnews.pro/news/how-i-registered-an-mcp-server-for-3760-retailers-and-what-i-learned.txt", "jsonld": "https://wpnews.pro/news/how-i-registered-an-mcp-server-for-3760-retailers-and-what-i-learned.jsonld"}}