<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: BuyWhere</title>
    <description>The latest articles on DEV Community by BuyWhere (@buywhere).</description>
    <link>https://dev.to/buywhere</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3886988%2F99f6e7aa-c0f1-46bb-9ac9-03c18420276f.png</url>
      <title>DEV Community: BuyWhere</title>
      <link>https://dev.to/buywhere</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/buywhere"/>
    <language>en</language>
    <item>
      <title>How to Build an AI Shopping Agent with BuyWhere MCP Server</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Fri, 08 May 2026 19:38:56 +0000</pubDate>
      <link>https://dev.to/buywhere/how-to-build-an-ai-shopping-agent-with-buywhere-mcp-server-d7e</link>
      <guid>https://dev.to/buywhere/how-to-build-an-ai-shopping-agent-with-buywhere-mcp-server-d7e</guid>
      <description>&lt;p&gt;AI agents can now help users shop — answering natural language queries like "find me the cheapest MacBook Pro in Singapore" or "which retailer has the Nintendo Switch on sale right now." Building this capability requires a product data API and a tool framework that lets the agent query it naturally. The BuyWhere MCP server provides both.&lt;/p&gt;

&lt;p&gt;This guide walks through building an AI shopping agent using the BuyWhere MCP server with Claude Desktop, Cursor, or any MCP-compatible client.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an MCP Server?
&lt;/h2&gt;

&lt;p&gt;The Model Context Protocol (MCP) is an open standard for connecting AI models to external tools and data sources. An MCP server exposes your API as a set of tools that an AI agent can call directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Claude Desktop or any MCP client&lt;/li&gt;
&lt;li&gt;A BuyWhere API key (get one free at buywhere.ai/api-keys)&lt;/li&gt;
&lt;li&gt;Node.js 18+&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Set Up the BuyWhere MCP Server
&lt;/h2&gt;

&lt;p&gt;Add to your Claude Desktop MCP settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"buywhere"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@buywhere/mcp-server"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set your API key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;BUYWHERE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_api_key_here
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or run locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @buywhere/mcp-server
buywhere-mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Test the Connection
&lt;/h2&gt;

&lt;p&gt;Ask Claude: "Search for Sony WH-1000XM5 headphones in the US and show me the cheapest price."&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Core Shopping Agent Capabilities
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Product Search
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;buywhere_products_search&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Dyson V15 vacuum cleaner&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;country&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SG&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Cross-Retailer Price Comparison
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;buywhere_products_search&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;iPhone 15 Pro 256GB&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;country&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;US&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Deal Discovery
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;buywhere_products_search&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;category&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;electronics&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;country&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;US&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;min_discount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Building a Custom Agent
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;BuyWhere&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@buywhere/sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Anthropic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@anthropic-ai/sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BuyWhere&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;BUYWHERE_API_KEY&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;shoppingAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userMessage&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;claude-sonnet-4-20250514&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
      &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`You are a shopping assistant. Use the BuyWhere API to answer product questions.`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;buywhere_products_search&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Search for products across BuyWhere retailers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;input_schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;country&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;number&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Production Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cache results to reduce API calls&lt;/li&gt;
&lt;li&gt;Always show stock status&lt;/li&gt;
&lt;li&gt;Prices vary by region&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Get your free API key: &lt;a href="https://buywhere.ai/api-keys" rel="noopener noreferrer"&gt;https://buywhere.ai/api-keys&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MCP setup guide: &lt;a href="https://buywhere.ai/integrate" rel="noopener noreferrer"&gt;https://buywhere.ai/integrate&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;npm package: &lt;a href="https://www.npmjs.com/package/@buywhere/mcp-server" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@buywhere/mcp-server&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why Your AI Agent Needs a Commerce MCP Server (Not a Web Scraper)</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Fri, 08 May 2026 12:40:56 +0000</pubDate>
      <link>https://dev.to/buywhere/why-your-ai-agent-needs-a-commerce-mcp-server-not-a-web-scraper-3igg</link>
      <guid>https://dev.to/buywhere/why-your-ai-agent-needs-a-commerce-mcp-server-not-a-web-scraper-3igg</guid>
      <description>&lt;h2&gt;
  
  
  The Problem with Web Scrapers
&lt;/h2&gt;

&lt;p&gt;Most developers trying to give AI agents shopping capabilities start with web scraping. It seems obvious — scrape Amazon, scrape Lazada, parse the HTML, done.&lt;/p&gt;

&lt;p&gt;But scrapers fail in ways that make them unsuitable for AI agents:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Fragile selectors&lt;/strong&gt; — change one CSS class and your scraper breaks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anti-bot detection&lt;/strong&gt; — IP bans, CAPTCHAs, rate limits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No structured data&lt;/strong&gt; — parsing HTML into usable product data is unreliable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No cross-market normalization&lt;/strong&gt; — every site formats prices differently&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintenance hell&lt;/strong&gt; — every site you track needs its own scraper&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The MCP Server Alternative
&lt;/h2&gt;

&lt;p&gt;The Model Context Protocol (MCP) is designed for exactly this: giving AI agents structured, typed access to external systems. An MCP server is essentially an API adapter that exposes tools to any MCP-compatible client (Claude, Cursor, GPT, OpenCode, etc.).&lt;/p&gt;

&lt;p&gt;Here is what that looks like in practice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"buywhere"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@buywhere/mcp-server"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"BUYWHERE_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bw_live_xxxx"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One config block. No parsing. No maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  What MCP Gives You That Scraping Does Not
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scraping&lt;/th&gt;
&lt;th&gt;MCP Server&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Parse HTML per site&lt;/td&gt;
&lt;td&gt;Structured typed tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Break on DOM changes&lt;/td&gt;
&lt;td&gt;API contract that does not change&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Handle auth per site&lt;/td&gt;
&lt;td&gt;Single API key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Convert currencies manually&lt;/td&gt;
&lt;td&gt;Normalized prices across markets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No agent discovery&lt;/td&gt;
&lt;td&gt;Agent Card for A2A protocol&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per-site rate limiting&lt;/td&gt;
&lt;td&gt;Unified API with smart caching&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Real Example: Find the Best Price
&lt;/h2&gt;

&lt;p&gt;With a scraper, comparing a product across Singapore and Japan means maintaining two scrapers, parsing two HTML structures, and converting currencies.&lt;/p&gt;

&lt;p&gt;With BuyWhere MCP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;mcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ClientSession&lt;/span&gt;

&lt;span class="n"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ClientSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.buywhere.ai/mcp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Search across all 6 markets in one call
&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call_tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;search_products&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;query&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Sony WH-1000XM5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;market&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;all&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is it. Your agent gets structured product data from SG, US, JP, KR, CN, AU with normalized prices in a single response.&lt;/p&gt;

&lt;h2&gt;
  
  
  What BuyWhere MCP Server Provides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;6 tools&lt;/strong&gt;: search_products, get_product, find_best_price, compare_products, get_deals, list_categories&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;6 markets&lt;/strong&gt;: Singapore, US, Japan, Korea, China, Australia&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;180+ categories&lt;/strong&gt;: electronics, fashion, home, beauty, groceries and more&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5M+ products&lt;/strong&gt;: aggregated from Lazada, Shopee, Amazon, Rakuten and local retailers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A2A agent card&lt;/strong&gt;: other AI agents can discover and connect autonomously&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;Web scrapers were built for humans reading web pages. MCP servers were built for AI agents calling tools.&lt;/p&gt;

&lt;p&gt;If you are building an AI agent that needs real-time product data, price comparison, or cross-border shopping — use the tool designed for agents, not a brittle HTML parser.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Get started: &lt;a href="https://buywhere.ai/api-keys" rel="noopener noreferrer"&gt;buywhere.ai/api-keys&lt;/a&gt; | GitHub: &lt;a href="https://github.com/BuyWhere/buywhere-mcp" rel="noopener noreferrer"&gt;BuyWhere/buywhere-mcp&lt;/a&gt; | npm: &lt;code&gt;@buywhere/mcp-server&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>architecture</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How BuyWhere Got 2,000+ Weekly npm Downloads for an MCP Server (Without Any Distribution)</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Fri, 08 May 2026 12:37:15 +0000</pubDate>
      <link>https://dev.to/buywhere/how-buywhere-got-2000-weekly-npm-downloads-for-an-mcp-server-without-any-distribution-12bo</link>
      <guid>https://dev.to/buywhere/how-buywhere-got-2000-weekly-npm-downloads-for-an-mcp-server-without-any-distribution-12bo</guid>
      <description>&lt;p&gt;Building an MCP server is one thing. Getting developers to discover and use it is another.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/BuyWhere/buywhere-mcp" rel="noopener noreferrer"&gt;BuyWhere&lt;/a&gt; — a product search MCP server that lets AI agents search 11M+ products across Singapore, SEA, and US markets — hit &lt;strong&gt;2,184 weekly npm downloads&lt;/strong&gt; with zero paid distribution, zero Twitter threads, and zero cold outreach.&lt;/p&gt;

&lt;p&gt;Here is what we learned.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Package
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; @buywhere/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@buywhere/mcp-server" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fnpm%2Fv%2F%40buywhere%2Fmcp-server.svg" alt="npm version" width="88" height="20"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/@buywhere/mcp-server" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fnpm%2Fdm%2F%40buywhere%2Fmcp-server.svg" alt="npm downloads" width="144" height="20"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;BuyWhere gives AI agents 6 MCP tools:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;search_products&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search by keyword, category, price, region&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_product&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Full product details by ID&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;compare_prices&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Side-by-side of 2-5 products&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_price&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Current prices across all merchants&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_affiliate_link&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Click-tracked affiliate URL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_catalog&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Product category taxonomy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Works with Claude Desktop, Cursor, Cline, Windsurf, OpenCode, Codex, Continue.dev — any MCP-compatible client.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Drove Growth (Without Distribution)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. npm search is the silent discovery engine
&lt;/h3&gt;

&lt;p&gt;We found that &lt;strong&gt;49 keywords&lt;/strong&gt; in package.json made a measurable difference in npm search visibility. When AI developers search npm for &lt;code&gt;mcp&lt;/code&gt;, &lt;code&gt;product-search&lt;/code&gt;, &lt;code&gt;ecommerce-api&lt;/code&gt;, or &lt;code&gt;shopping-agent&lt;/code&gt;, BuyWhere shows up.&lt;/p&gt;

&lt;p&gt;Key additions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mcp-commerce-search&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ecommerce-api&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;shopping-agent&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;deal-finder&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cross-border-commerce&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;a2a&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cline&lt;/code&gt;, &lt;code&gt;windsurf&lt;/code&gt;, &lt;code&gt;codex&lt;/code&gt;, &lt;code&gt;continue-dev&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. README-first discoverability
&lt;/h3&gt;

&lt;p&gt;AI agents and developers discover packages by reading READMEs. We optimized ours with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent-readable intro&lt;/strong&gt;: A bold summary that tells AI scrapers exactly what this package does&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-client config snippets&lt;/strong&gt;: Claude, Cursor, Windsurf, OpenCode, Continue.dev — each with copy-paste JSON&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture diagram&lt;/strong&gt;: Shows the full data flow from agent → MCP server → API → 11M products&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protocol support table&lt;/strong&gt;: MCP + A2A clearly documented&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. The MCP Registry multiplier
&lt;/h3&gt;

&lt;p&gt;Getting listed on the &lt;a href="https://github.com/modelcontextprotocol/registry" rel="noopener noreferrer"&gt;Official MCP Registry&lt;/a&gt; created a permanent discovery channel. AI developers browsing the registry find BuyWhere alongside Stripe, Brave Search, and other major MCP servers.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Build With BuyWhere Challenge
&lt;/h3&gt;

&lt;p&gt;We are running a &lt;strong&gt;$5,000 AI Agent Developer Challenge&lt;/strong&gt; with prizes for the best shopping agents built with BuyWhere. Deadline: June 30, 2026.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://buywhere.ai/challenge" rel="noopener noreferrer"&gt;buywhere.ai/challenge&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What Did NOT Work
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Social media threads&lt;/strong&gt; (zero traction without existing audience)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cold emails to dev influencers&lt;/strong&gt; (no replies)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dev.to articles without SEO targeting&lt;/strong&gt; (need keyword research first)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Next: From 300 to 1,000 Daily Downloads
&lt;/h2&gt;

&lt;p&gt;We are testing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;npm search SEO&lt;/strong&gt;: Expanding from 20 → 49 keywords (already live in v1.0.2)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Discussions&lt;/strong&gt;: Cross-posting to &lt;code&gt;modelcontextprotocol/servers&lt;/code&gt; community&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent-native discovery&lt;/strong&gt;: Optimizing README for LLM scrapers that index npm packages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-publishing&lt;/strong&gt;: Repurposing technical content across dev.to, Hashnode, Medium&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;BUYWHERE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;bw_live_xxxx
npx &lt;span class="nt"&gt;-y&lt;/span&gt; @buywhere/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Get a free API key → &lt;a href="https://buywhere.ai/api-keys" rel="noopener noreferrer"&gt;buywhere.ai/api-keys&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub → &lt;a href="https://github.com/BuyWhere/buywhere-mcp" rel="noopener noreferrer"&gt;BuyWhere/buywhere-mcp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;npm → &lt;a href="https://www.npmjs.com/package/@buywhere/mcp-server" rel="noopener noreferrer"&gt;@buywhere/mcp-server&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This is part of our open experiment in growing an MCP server from zero distribution. Follow the journey at &lt;a href="https://buywhere.ai/blog" rel="noopener noreferrer"&gt;buywhere.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>npm</category>
      <category>ai</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Build With BuyWhere: AI Agent Developer Challenge</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Thu, 07 May 2026 15:16:58 +0000</pubDate>
      <link>https://dev.to/buywhere/build-with-buywhere-ai-agent-developer-challenge-2ak7</link>
      <guid>https://dev.to/buywhere/build-with-buywhere-ai-agent-developer-challenge-2ak7</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The challenge:&lt;/strong&gt; Build an AI agent that uses BuyWhere's MCP-native product catalog API to do something useful with real commerce data. Win a 15-inch M3 MacBook Air.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;BuyWhere is an AI-native product catalog API — real pricing, availability, and product details delivered as first-class MCP resources for AI agents. We're running a developer challenge to see what developers actually build when they have product data attached to their agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Build
&lt;/h2&gt;

&lt;p&gt;Any AI agent that uses BuyWhere's MCP server to access real product data. The agent should do something useful — product lookup, price comparison, inventory check, shopping list optimization, deal finding — your call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What counts:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses BuyWhere MCP tools (product search, availability, pricing)&lt;/li&gt;
&lt;li&gt;Demonstrates a real use case for AI-assisted commerce&lt;/li&gt;
&lt;li&gt;Open source or demoable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What doesn't count:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Purely decorative integrations&lt;/li&gt;
&lt;li&gt;Hardcoded mock data (must use live BuyWhere API)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prizes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Grand prize:&lt;/strong&gt; 15-inch M3 MacBook Air (16GB/512GB)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Runner-up:&lt;/strong&gt; $500 BuyWhere API credits + featured spot on our homepage&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All valid submissions:&lt;/strong&gt; $50 BuyWhere API credits + shoutout on our social channels&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Enter
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Get your free BuyWhere API key at &lt;a href="https://buywhere.ai/challenge" rel="noopener noreferrer"&gt;buywhere.ai/challenge&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Build your agent using our &lt;a href="https://github.com/buywhere/mcp" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt; (zero-config setup for Claude, Cursor, Cline)&lt;/li&gt;
&lt;li&gt;Submit by &lt;strong&gt;May 19, 2026&lt;/strong&gt; — DM us on LinkedIn or email &lt;a href="mailto:dev@buywhere.ai"&gt;dev@buywhere.ai&lt;/a&gt; with:

&lt;ul&gt;
&lt;li&gt;Description of what you built&lt;/li&gt;
&lt;li&gt;Link to repo or demo&lt;/li&gt;
&lt;li&gt;Your BuyWhere API key (so we can verify the integration)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/buywhere/mcp" rel="noopener noreferrer"&gt;BuyWhere MCP Server&lt;/a&gt; — works with Claude, Cursor, Cline&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.buywhere.ai" rel="noopener noreferrer"&gt;API Docs&lt;/a&gt; — product search, availability, pricing endpoints&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.buywhere.ai/quickstart" rel="noopener noreferrer"&gt;Quickstart Guide&lt;/a&gt; — first API call in 60 seconds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No prior commerce or e-commerce experience required. If you can write a prompt, you can build something with BuyWhere.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Submissions close May 19, 2026. Questions? &lt;a href="mailto:dev@buywhere.ai"&gt;dev@buywhere.ai&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>mcp</category>
      <category>hackathon</category>
    </item>
    <item>
      <title>Build With BuyWhere: Win an M3 MacBook Air Building an AI Shopping Agent</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Thu, 07 May 2026 14:55:02 +0000</pubDate>
      <link>https://dev.to/buywhere/build-with-buywhere-win-an-m3-macbook-air-building-an-ai-shopping-agent-3e02</link>
      <guid>https://dev.to/buywhere/build-with-buywhere-win-an-m3-macbook-air-building-an-ai-shopping-agent-3e02</guid>
      <description>&lt;h2&gt;
  
  
  Calling all AI agent builders — we are launching a developer challenge with real prizes.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Grand prize: M3 MacBook Air + $1,000 in BuyWhere API credits + featured on buywhere.ai&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Runner-up: $500 credits + swag&lt;br&gt;&lt;br&gt;
Community Favorite: $250 credits + swag&lt;/p&gt;




&lt;h2&gt;
  
  
  What You Build
&lt;/h2&gt;

&lt;p&gt;Build an AI agent (chatbot, copilot, shopping assistant — anything) that uses &lt;strong&gt;at least 2 BuyWhere MCP tools&lt;/strong&gt;. That is it.&lt;/p&gt;

&lt;p&gt;No prior commerce experience needed. No credit card required. Just a free API key and an idea.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tools You Get
&lt;/h2&gt;

&lt;p&gt;BuyWhere gives your AI agent access to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;search_products&lt;/code&gt;&lt;/strong&gt; — Real-time product search across 50M+ products in 6 markets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;get_product&lt;/code&gt;&lt;/strong&gt; — Full product details including pricing, merchant info, and availability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;compare_products&lt;/code&gt;&lt;/strong&gt; — Side-by-side price comparison across merchants&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;search_merchants&lt;/code&gt;&lt;/strong&gt; — Discover merchants by category, region, or name&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;search_by_image&lt;/code&gt;&lt;/strong&gt; — Upload an image and find matching products&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plug into Claude, Cursor, Cline, or any MCP client in under 60 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Enter
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Get your API key&lt;/strong&gt; → &lt;a href="https://buywhere.ai/challenge" rel="noopener noreferrer"&gt;buywhere.ai/challenge&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build your agent&lt;/strong&gt; using BuyWhere MCP tools or REST API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Submit via GitHub issue&lt;/strong&gt; — include your repo URL, a demo link, and a short description&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Judging
&lt;/h2&gt;

&lt;p&gt;Each submission is scored on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Utility (40%)&lt;/strong&gt; — Does it solve a real shopping problem?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Usage (30%)&lt;/strong&gt; — How well does it integrate BuyWhere tools?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Polish (20%)&lt;/strong&gt; — Clean build, clear instructions, error handling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Creativity (10%)&lt;/strong&gt; — Bonus for novel agent patterns or unique integrations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;The AI agent ecosystem is accelerating. Claude, GPT, Gemini — they all support MCP natively. But agents need real data. BuyWhere is the commerce infrastructure layer.&lt;/p&gt;

&lt;p&gt;This challenge is about showing what is possible when AI agents have access to live product catalogs, real pricing, and actual merchant data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start Building
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; @buywhere/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full challenge details, prizes, and submission template:&lt;/p&gt;

&lt;p&gt;→ &lt;strong&gt;&lt;a href="https://buywhere.ai/challenge" rel="noopener noreferrer"&gt;buywhere.ai/challenge&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Questions? Drop them in the comments.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built for the age of agent commerce.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>showdev</category>
      <category>typescript</category>
    </item>
    <item>
      <title>How We Got Listed on the Official MCP Registry — A Server Builder Checklist</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Thu, 07 May 2026 14:13:37 +0000</pubDate>
      <link>https://dev.to/buywhere/how-we-got-listed-on-the-official-mcp-registry-a-server-builder-checklist-14fh</link>
      <guid>https://dev.to/buywhere/how-we-got-listed-on-the-official-mcp-registry-a-server-builder-checklist-14fh</guid>
      <description>&lt;p&gt;After 2 months of building our MCP server and navigating the ecosystem, BuyWhere is now officially listed on the &lt;a href="https://registry.modelcontextprotocol.io" rel="noopener noreferrer"&gt;MCP Registry&lt;/a&gt;. Here is exactly what worked, what did not, and a checklist for other MCP server builders.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the Registry Matters
&lt;/h2&gt;

&lt;p&gt;The MCP Registry is the canonical discovery layer for AI agents. When Claude, Cursor, or Cline searches for servers, the registry is the first place they check — not npm, not GitHub, not Google.&lt;/p&gt;

&lt;p&gt;Getting listed turns your MCP server from "something you can npm install" into something AI agents can discover natively.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Checklist
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Your &lt;code&gt;mcp.json&lt;/code&gt; Manifest (Critical)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"your-server-name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@your-org/your-package"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"YOUR_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$YOUR_API_KEY"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Must be at the package root&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;command&lt;/code&gt; and &lt;code&gt;args&lt;/code&gt; must produce a working MCP server with zero config beyond the env var&lt;/li&gt;
&lt;li&gt;Test with &lt;code&gt;npx -y @your-org/your-package&lt;/code&gt; — if it does not work locally, registry clients will fail&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. npm Package Readiness
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;package.json&lt;/code&gt; keywords&lt;/strong&gt;: The npm registry uses these for search. Include &lt;code&gt;mcp&lt;/code&gt;, &lt;code&gt;mcp-server&lt;/code&gt;, &lt;code&gt;mcp-tools&lt;/code&gt;, and your domain terms. We went from 24 to 33 keywords and saw a measurable lift in discoverability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;README.md&lt;/strong&gt;: Must be included in your npm tarball (check with &lt;code&gt;npm pack --dry-run&lt;/code&gt;). An empty README = zero text for npm search indexing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version stability&lt;/strong&gt;: The registry pulls from your latest npm version. Make sure it works.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. GitHub Repository (Minimum)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Public repo with clear README&lt;/li&gt;
&lt;li&gt;Link to your MCP server in the description&lt;/li&gt;
&lt;li&gt;Tag it with &lt;code&gt;mcp-server&lt;/code&gt; topic&lt;/li&gt;
&lt;li&gt;Working CI badge helps (shows maintenance)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. AI Discoverability (the hidden piece)
&lt;/h3&gt;

&lt;p&gt;AI models do not browse npm. They consume structured documentation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;llms.txt&lt;/code&gt;&lt;/strong&gt;: This is the AI-native equivalent of &lt;code&gt;robots.txt&lt;/code&gt;. Create one at your domain root with links to your docs, tutorials, and registry listing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured tool descriptions&lt;/strong&gt;: Write MCP tool descriptions that include example queries — this dramatically improves how Claude/Cursor selects your tools vs. others.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;agent.json&lt;/code&gt;&lt;/strong&gt;: If you support A2A (Agent-to-Agent), host your agent card at &lt;code&gt;/.well-known/agent.json&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Worked
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;npm SEO&lt;/strong&gt;: Fixing our &lt;code&gt;keywords&lt;/code&gt; field (it was typod as &lt;code&gt;keywordt&lt;/code&gt;) and adding domain-specific terms produced a 5x download spike within 48 hours.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Registry listing&lt;/strong&gt;: Once listed, AI agents began discovering BuyWhere without manual installs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tutorial content&lt;/strong&gt;: Our "Build a Shopping Agent in 15 Minutes" tutorial drove 770 npm downloads in a single day.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Did Not Work
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;dev.to alone&lt;/strong&gt;: We published 30+ articles. Total engagement: zero. Without community interaction (comments, reactions, follows), the dev.to algorithm does not surface content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cold outreach&lt;/strong&gt;: Sent 40+ personalized emails to MCP developers. Reply rate: effectively zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relying on GitHub stars&lt;/strong&gt;: Stars do not equal discoverability in the agent ecosystem.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Hard Truth
&lt;/h2&gt;

&lt;p&gt;The MCP ecosystem has a discoverability problem. There are 2,600+ MCP servers on GitHub but no canonical way to browse them all. The official Registry is step one, but discoverability requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;npm keywords for human developers&lt;/li&gt;
&lt;li&gt;Registry listing for AI agents
&lt;/li&gt;
&lt;li&gt;Tutorials and docs for AI model training data&lt;/li&gt;
&lt;li&gt;Community presence for social proof&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Your Turn
&lt;/h2&gt;

&lt;p&gt;Are you building an MCP server? What is your discoverability strategy? Drop a comment — I am genuinely curious what is working (or not working) for other builders.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;BuyWhere MCP — 50M+ products, 6 markets, free API key: &lt;a href="https://buywhere.ai/api-keys" rel="noopener noreferrer"&gt;buywhere.ai/api-keys&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Add Product Search to Your AI Agent with MCP</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Thu, 07 May 2026 06:33:22 +0000</pubDate>
      <link>https://dev.to/buywhere/how-to-add-product-search-to-your-ai-agent-with-mcp-2ecm</link>
      <guid>https://dev.to/buywhere/how-to-add-product-search-to-your-ai-agent-with-mcp-2ecm</guid>
      <description>&lt;p&gt;AI agents are great at reasoning, but they're blind without access to real-world data. If your agent can't search products, compare prices, or discover inventory, it's stuck in theory.&lt;/p&gt;

&lt;p&gt;Enter &lt;strong&gt;&lt;a class="mentioned-user" href="https://dev.to/buywhere"&gt;@buywhere&lt;/a&gt;/mcp-server&lt;/strong&gt; — a product search API built for AI agents via the Model Context Protocol.&lt;/p&gt;

&lt;h2&gt;
  
  
  What BuyWhere Does
&lt;/h2&gt;

&lt;p&gt;BuyWhere gives your Claude, Cursor, or custom MCP agent access to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;11M+ products&lt;/strong&gt; across Singapore, Southeast Asia, and US markets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-currency pricing&lt;/strong&gt; with real-time comparison&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Catalog search&lt;/strong&gt; by keyword, category, or merchant&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-border discovery&lt;/strong&gt; for global commerce agents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's not a store management tool — it's an &lt;strong&gt;infrastructure layer for agent commerce&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install via npm&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; @buywhere/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add to your MCP client config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"buywhere"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@buywhere/mcp-server"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What Your Agent Can Do
&lt;/h2&gt;

&lt;p&gt;Once connected, your agent can:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; Find me the best price on an iPhone 15 in Singapore
&amp;gt; Search for wireless earbuds under $50 USD
&amp;gt; Compare Nike running shoes across SEA merchants
&amp;gt; Show me what electronics are trending in the US market
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;Most "ecommerce MCP" servers manage stores (Shopify, WooCommerce, Magento). BuyWhere is different — it's a &lt;strong&gt;search layer&lt;/strong&gt; for agents that need to discover and compare products, not manage inventory.&lt;/p&gt;

&lt;p&gt;If you're building AI agents that need commerce capabilities, this is the missing piece.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;npm: &lt;code&gt;@buywhere/mcp-server&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/buywhere-ai/mcp-server" rel="noopener noreferrer"&gt;buywhere-ai/mcp-server&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Website: &lt;a href="https://buywhere.ai" rel="noopener noreferrer"&gt;buywhere.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>typescript</category>
      <category>api</category>
    </item>
    <item>
      <title>Building Production MCP Servers: Architecture, Tool Design, and Distribution</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Thu, 07 May 2026 06:27:01 +0000</pubDate>
      <link>https://dev.to/buywhere/building-production-mcp-servers-architecture-tool-design-and-distribution-14m8</link>
      <guid>https://dev.to/buywhere/building-production-mcp-servers-architecture-tool-design-and-distribution-14m8</guid>
      <description>&lt;h1&gt;
  
  
  Building Production MCP Servers: Architecture, Tool Design, and Distribution
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://buywhere.hashnode.dev/building-production-mcp-servers-architecture-tool-design-distribution" rel="noopener noreferrer"&gt;BuyWhere Engineering Blog&lt;/a&gt;. Read the full deep-dive there.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Your MCP server works in development. It passes the &lt;code&gt;mcp inspect&lt;/code&gt; smoke test. You've shipped to npm. Then... silence.&lt;/p&gt;

&lt;p&gt;No installs. No issues. No feedback. Just a package floating in the npm void.&lt;/p&gt;

&lt;p&gt;This is the gap between "building an MCP server" and "shipping one that developers actually discover and use." Over the past month, we shipped BuyWhere MCP Server — an agent-native commerce API — from zero to &lt;strong&gt;1,700+ daily npm downloads&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three-Layer Architecture
&lt;/h2&gt;

&lt;p&gt;After iterating on BuyWhere's MCP server through 12 releases, we've settled on a three-layer architecture:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 1: Tool Definitions&lt;/strong&gt; — The agent's interface. Tool descriptions are your SEO for AI agents. LLMs decide which tool to call based on description text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 2: Transport&lt;/strong&gt; — Stdio for local, HTTP/SSE for remote, WebSocket for streaming. BuyWhere supports both Stdio (&lt;code&gt;npx -y @buywhere/mcp-server&lt;/code&gt;) and streamable HTTP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 3: Business Logic&lt;/strong&gt; — Keep it separate from MCP code. The server is a thin wrapper. This lets you test independently and expose the same logic through REST, GraphQL, or MCP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tool Design Patterns
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Progressive Discovery&lt;/strong&gt;: Don't cram everything into one tool. Chain: search → detail → compare → domain-specific actions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rich Return Types&lt;/strong&gt;: Include a &lt;code&gt;summary&lt;/code&gt; field that helps the LLM frame its response.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graceful Degradation&lt;/strong&gt;: Return partial results with warnings when external APIs fail. The LLM can work with partial data. It cannot work with an error stack trace.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Distribution: The 70%
&lt;/h2&gt;

&lt;p&gt;Building the server is 30% of the work. Getting developers to discover and install it is the other 70%.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;npm SEO&lt;/strong&gt;: Keywords ARE your SEO. After republishing with better keywords, our position for "agent shopping" jumped to #2.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Registries&lt;/strong&gt;: List everywhere. We're on Smithery (2,423 connections), PulseMCP, Glama, MCP.so, MCPMarket, and GitHub Registry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Discussions&lt;/strong&gt;: Highest-signal channel. A single well-placed comment generated more installs than a week of Twitter posts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Numbers
&lt;/h2&gt;

&lt;p&gt;After 4 weeks: 1,700+ daily npm downloads, 2,423 Smithery connections, listed on 6 directories, 50M+ products searchable across 6 markets.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;a href="https://buywhere.hashnode.dev/building-production-mcp-servers-architecture-tool-design-distribution" rel="noopener noreferrer"&gt;Read the full deep-dive on Hashnode →&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; @buywhere/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>mcp</category>
      <category>ai</category>
      <category>tutorial</category>
      <category>typescript</category>
    </item>
    <item>
      <title>The MCP Server Discovery Gap: How do you find the right MCP server for your agent?</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Thu, 07 May 2026 06:12:32 +0000</pubDate>
      <link>https://dev.to/buywhere/the-mcp-server-discovery-gap-how-do-you-find-the-right-mcp-server-for-your-agent-46co</link>
      <guid>https://dev.to/buywhere/the-mcp-server-discovery-gap-how-do-you-find-the-right-mcp-server-for-your-agent-46co</guid>
      <description>&lt;p&gt;MCP (Model Context Protocol) servers are multiplying fast. Anthropic opened the protocol, and now there are thousands of MCP servers for everything — file systems, databases, APIs, browsers, commerce, you name it.&lt;/p&gt;

&lt;p&gt;But here is the problem I keep hitting: &lt;strong&gt;how do you discover the right one?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The current discovery funnel
&lt;/h2&gt;

&lt;p&gt;Right now, finding an MCP server for a specific task looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Search GitHub for "mcp server [your-need]"&lt;/li&gt;
&lt;li&gt;Hope the README is clear and the project is maintained&lt;/li&gt;
&lt;li&gt;Check if it has a published npm/PyPI package&lt;/li&gt;
&lt;li&gt;Cross fingers that tool descriptions are honest&lt;/li&gt;
&lt;li&gt;Wire it up and test&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This works... sometimes. But it does not scale. As the MCP ecosystem grows, the discovery problem compounds. We are repeating the early-days NPM/PyPI pattern where quality signals are weak and trust is implicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I am seeing work
&lt;/h2&gt;

&lt;p&gt;After building and shipping an MCP server for agent-native commerce (&lt;a href="https://buywhere.ai" rel="noopener noreferrer"&gt;BuyWhere&lt;/a&gt; — open source MCP server that gives AI agents access to product catalogs, price comparison, and merchant data), I have observed a few patterns:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Community-native discovery beats listing pages.&lt;/strong&gt; Dev.to, Discord servers, GitHub Discussions, and Reddit threads drive more meaningful traffic than static MCP registry pages. When someone recommends a server organically in a discussion, the downstream trust is higher.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool quality &amp;gt; tool quantity.&lt;/strong&gt; MCP servers that expose 3-5 well-designed tools with strong input validation and clear error messages get adopted faster than servers with 30 loosely-typed endpoints. The LLM needs to understand what the tool does from the description alone — no UI, no docs, just the schema.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-world use cases drive adoption.&lt;/strong&gt; The servers getting traction are not generic "API wrappers" — they solve a specific, painful problem. File search, database access, code review, e-commerce. The more concrete the use case, the faster the adoption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions for the community
&lt;/h2&gt;

&lt;p&gt;I would love to hear from others building in this space:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How do you discover MCP servers today? Registry pages, search engines, word of mouth?&lt;/li&gt;
&lt;li&gt;What makes you trust an MCP server enough to install it?&lt;/li&gt;
&lt;li&gt;Are there specific categories of MCP servers you are struggling to find?&lt;/li&gt;
&lt;li&gt;For those who have published MCP servers — what distribution channels worked best?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Drop your thoughts below or try &lt;a href="https://buywhere.ai" rel="noopener noreferrer"&gt;BuyWhere MCP&lt;/a&gt; — an open source MCP server for agent-native product search and commerce.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>"Building an MCP Server from Scratch: A Complete 2026 Guide"</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Wed, 06 May 2026 23:04:56 +0000</pubDate>
      <link>https://dev.to/buywhere/building-an-mcp-server-from-scratch-a-complete-2026-guide-33hi</link>
      <guid>https://dev.to/buywhere/building-an-mcp-server-from-scratch-a-complete-2026-guide-33hi</guid>
      <description>&lt;p&gt;You've used MCP servers. Maybe you've connected Claude Desktop to filesystem, Postgres, or a web search tool. But building your own MCP server that AI agents can discover and use reliably? That's the next level.&lt;/p&gt;

&lt;p&gt;This guide walks through building a production MCP server from scratch — not a toy example, but a server designed for real AI agents to discover, call, and trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Build (or Use) MCP Servers?
&lt;/h2&gt;

&lt;p&gt;The Model Context Protocol solves a fundamental problem: every AI agent implements its own way to call tools. Claude Desktop has one interface. Cursor has another. VS Code Copilot, Cline, Roo Code — each invents its own tool-calling protocol.&lt;/p&gt;

&lt;p&gt;MCP standardizes this. Build one server, and every MCP-compatible client can use it with zero integration work.&lt;/p&gt;

&lt;p&gt;The ecosystem as of May 2026:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4,800+ MCP servers&lt;/strong&gt; registered across Glama, MCP.so, Smithery, PulseMCP&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;40+ domains&lt;/strong&gt; — databases, browsers, commerce, search, file systems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dozens of MCP-compatible clients&lt;/strong&gt; — Claude Desktop, Cursor, VS Code, Windsurf, Cline, OpenCode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you build API tooling for AI agents, MCP is the distribution channel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing Your Transport
&lt;/h2&gt;

&lt;p&gt;MCP supports two transports. The choice matters.&lt;/p&gt;

&lt;h3&gt;
  
  
  stdio (local)
&lt;/h3&gt;

&lt;p&gt;The server runs as a child process. The client launches it, communicates over stdin/stdout.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"my-server"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@my-org/my-mcp-server"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"API_KEY"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sk-xxx"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt; Your server is an npm package or binary the developer installs locally. Fastest path to first tool call. Zero network configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trade-off:&lt;/strong&gt; Every client spawns its own server process. State is per-session. No shared resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  SSE (remote)
&lt;/h3&gt;

&lt;p&gt;The server runs as an HTTP endpoint. Clients connect over Server-Sent Events.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mcp.buywhere.ai/sse
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt; Your server is a service. You control the infrastructure. Multiple clients share one server instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trade-off:&lt;/strong&gt; Network latency. Requires deployment. But enables shared state, rate limiting, and monitoring.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transport Decision Framework
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concern&lt;/th&gt;
&lt;th&gt;stdio&lt;/th&gt;
&lt;th&gt;SSE (remote)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Developer setup&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;npx -y&lt;/code&gt; one-liner&lt;/td&gt;
&lt;td&gt;URL endpoint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Latency&lt;/td&gt;
&lt;td&gt;Sub-ms (local IPC)&lt;/td&gt;
&lt;td&gt;20-200ms network&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;State&lt;/td&gt;
&lt;td&gt;Per-client process&lt;/td&gt;
&lt;td&gt;Shared instances&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auth&lt;/td&gt;
&lt;td&gt;Env vars&lt;/td&gt;
&lt;td&gt;API keys in headers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distribution&lt;/td&gt;
&lt;td&gt;npm / pip / cargo&lt;/td&gt;
&lt;td&gt;Your infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Real-world pattern:&lt;/strong&gt; Start with stdio for developer adoption. Add SSE when you need production scale. &lt;code&gt;@buywhere/mcp-server&lt;/code&gt; supports both — npm for local use, SSE endpoint for hosted access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Architecture
&lt;/h2&gt;

&lt;p&gt;An MCP server has three layers. Get these right, and you have a server that agents actually trust.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────┐
│     Tool Definitions     │  ← Agent sees this first
├─────────────────────────┤
│    Request Handlers      │  ← Business logic lives here
├─────────────────────────┤
│  Transport &amp;amp; Auth Layer  │  ← stdio or SSE, token validation
└─────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Layer 1: Tool Definitions
&lt;/h3&gt;

&lt;p&gt;This is what the AI agent sees before making any call. It's your contract.&lt;/p&gt;

&lt;p&gt;Every tool needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;name&lt;/code&gt;&lt;/strong&gt;: snake_case, descriptive. Agents parse this.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;description&lt;/code&gt;&lt;/strong&gt;: The agent reads this to decide when to call your tool. This IS your prompt engineering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;inputSchema&lt;/code&gt;&lt;/strong&gt;: JSON Schema. Strict typing means fewer agent mistakes.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;searchProductsTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;search_products&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Search product catalog by natural language query. &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Returns matching products with prices, merchant info, and availability. &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Use this when the user wants to find products or compare prices.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Natural language search query. Be specific — &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;include brand, model, category. Examples: 'iPhone 15 128GB', &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;'Sony headphones wireless noise cancelling'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;market&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sea&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;us&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;global&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Market to search. Default: 'sg' for Singapore.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;integer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;minimum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;maximum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Max results. Default 5. Higher values give more options &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;but cost more tokens.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;query&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why descriptions matter:&lt;/strong&gt; The agent uses your tool description to decide &lt;em&gt;when&lt;/em&gt; and &lt;em&gt;how&lt;/em&gt; to call it. A vague description means the agent won't use your tool at all. A precise description means correct calls with correct arguments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 2: Request Handlers
&lt;/h3&gt;

&lt;p&gt;This is where your business logic runs. Each tool gets a handler that receives the arguments and returns a result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleSearchProducts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;market&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;catalog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;market&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;market&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}]&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Error handling is critical.&lt;/strong&gt; The agent will retry on errors. Give it actionable messages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;catalog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;RateLimitError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Rate limit reached. Free tier: 1,000 queries/month. &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Upgrade at https://buywhere.ai/pricing for higher limits.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;}],&lt;/span&gt;
      &lt;span class="na"&gt;isError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;AuthError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Invalid API key. Get a free key at https://buywhere.ai/api-keys&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;}],&lt;/span&gt;
      &lt;span class="na"&gt;isError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Unknown error — let the client handle it&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Layer 3: Transport &amp;amp; Auth
&lt;/h3&gt;

&lt;p&gt;Wire it together with the MCP SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Server&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@modelcontextprotocol/sdk/server/index.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StdioServerTransport&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@modelcontextprotocol/sdk/server/stdio.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my-mcp-server&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1.0.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;capabilities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setRequestHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ListToolsRequestSchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;searchProductsTool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getProductTool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;compareProductsTool&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;

&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setRequestHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;CallToolRequestSchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;search_products&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;handleSearchProducts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;get_product&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;handleGetProduct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;compare_products&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;handleCompareProducts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Unknown tool: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;transport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;StdioServerTransport&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;transport&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Packaging for npm
&lt;/h2&gt;

&lt;p&gt;Your server should be installable with one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; @my-org/my-mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;package.json essentials:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@my-org/my-mcp-server"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1.0.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"my-mcp-server"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./dist/index.js"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"keywords"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"model-context-protocol"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"agent"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"mcp-server"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"claude"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"cursor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"llm"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"files"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"dist/"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"engines"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"node"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;gt;=18"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Keyword strategy:&lt;/strong&gt; npm search and AI tool directories use package.json keywords for discovery. Include &lt;code&gt;mcp&lt;/code&gt;, &lt;code&gt;mcp-server&lt;/code&gt;, &lt;code&gt;ai&lt;/code&gt;, &lt;code&gt;agent&lt;/code&gt;, and domain-specific terms for your tool category.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing with Real AI Agents
&lt;/h2&gt;

&lt;p&gt;Unit tests verify your handlers. Integration tests verify the protocol. But real AI agents behave differently.&lt;/p&gt;

&lt;p&gt;Test your server against:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Claude Desktop&lt;/strong&gt; — The reference client. If it doesn't work here, fix it first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Codex&lt;/strong&gt; — Tests tool discovery with natural language queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cursor&lt;/strong&gt; — Different tool-calling patterns. Tests compatibility.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Common failure modes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tool not called:&lt;/strong&gt; Description is too generic. Agent doesn't understand when to use it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wrong arguments:&lt;/strong&gt; Input schema missing constraints. Add &lt;code&gt;enum&lt;/code&gt;, &lt;code&gt;minimum&lt;/code&gt;, &lt;code&gt;maximum&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result ignored:&lt;/strong&gt; Response format not parseable. Use clean JSON, not prose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timeout:&lt;/strong&gt; Handler taking &amp;gt;30s. Add pagination or streaming.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Lessons from &lt;a class="mentioned-user" href="https://dev.to/buywhere"&gt;@buywhere&lt;/a&gt;/mcp-server
&lt;/h2&gt;

&lt;p&gt;We shipped &lt;code&gt;@buywhere/mcp-server&lt;/code&gt; on npm, listed it on the official MCP registry, and watched 1,900+ developers install it in a week. Here's what we learned.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lesson 1: npm discovery is free distribution
&lt;/h3&gt;

&lt;p&gt;npm keywords + package name are how developers and MCP directories find your server. We saw 770 downloads in a single day without any promotion — just being listed with the right keywords.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lesson 2: The MCP registry listing is worth 10x any blog post
&lt;/h3&gt;

&lt;p&gt;Being listed on the &lt;a href="https://registry.modelcontextprotocol.io" rel="noopener noreferrer"&gt;official MCP registry&lt;/a&gt; meant our server was discoverable by every MCP-compatible client. One registry listing outperformed 30+ Dev.to articles combined.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lesson 3: Free tier is non-negotiable
&lt;/h3&gt;

&lt;p&gt;Developers want to try before they commit. Our free tier (1,000 queries/month, no credit card) converted 3x better than gated trials in early tests.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lesson 4: Tool descriptions ARE your UX
&lt;/h3&gt;

&lt;p&gt;The agent reads your descriptions to decide what to do. We rewrote our &lt;code&gt;search_products&lt;/code&gt; description 4 times based on observing how Claude actually used it. Be specific about inputs, outputs, and when the tool should be called.&lt;/p&gt;

&lt;h2&gt;
  
  
  Complete Server Template
&lt;/h2&gt;

&lt;p&gt;Here's a minimal but production-ready MCP server template you can clone:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cp"&gt;#!/usr/bin/env node
&lt;/span&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Server&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@modelcontextprotocol/sdk/server/index.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StdioServerTransport&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@modelcontextprotocol/sdk/server/stdio.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;CallToolRequestSchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;ListToolsRequestSchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@modelcontextprotocol/sdk/types.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;TOOLS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Greet the user. Call this when the user says hello or introduces themselves.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The user's name. Optional.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hello-mcp&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1.0.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;capabilities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setRequestHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ListToolsRequestSchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TOOLS&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;

&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setRequestHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;CallToolRequestSchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
      &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;`Hello, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;! Your MCP server is working.`&lt;/span&gt;
      &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, World! Your MCP server is working.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Unknown tool: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;transport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;StdioServerTransport&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;transport&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clone the template&lt;/strong&gt; and replace &lt;code&gt;hello&lt;/code&gt; with your first real tool&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test with Claude Desktop&lt;/strong&gt; — the quickest feedback loop&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish to npm&lt;/strong&gt; with discovery-optimized keywords&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Submit to MCP registries&lt;/strong&gt; — Glama, MCP.so, Smithery, PulseMCP&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write good tool descriptions&lt;/strong&gt; — this is your entire UX&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The MCP ecosystem is growing fast, and the servers that get adopted are the ones that are discoverable, reliable, and well-described. Build something agents actually want to call.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://buywhere.ai" rel="noopener noreferrer"&gt;BuyWhere&lt;/a&gt; is an MCP server that gives AI agents access to a live product catalog across 50M+ products in Singapore, SEA, and US markets. Get a free API key at &lt;a href="https://buywhere.ai" rel="noopener noreferrer"&gt;buywhere.ai&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>typescript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>BuyWhere MCP Server Is Now Listed on the Official MCP Registry</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Wed, 06 May 2026 16:49:17 +0000</pubDate>
      <link>https://dev.to/buywhere/buywhere-mcp-server-is-now-listed-on-the-official-mcp-registry-3k3b</link>
      <guid>https://dev.to/buywhere/buywhere-mcp-server-is-now-listed-on-the-official-mcp-registry-3k3b</guid>
      <description>&lt;h2&gt;
  
  
  BuyWhere Is Now an Officially Listed MCP Server
&lt;/h2&gt;

&lt;p&gt;BuyWhere is now listed on the &lt;strong&gt;official MCP Registry&lt;/strong&gt; at &lt;a href="https://registry.modelcontextprotocol.io" rel="noopener noreferrer"&gt;modelcontextprotocol.io&lt;/a&gt;. This means AI agents and developers can discover and integrate BuyWhere directly through the canonical MCP ecosystem — the same registry that powers Claude Desktop, Cursor, VS Code, and every MCP-compatible client.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Registry name:&lt;/strong&gt; &lt;code&gt;io.github.BuyWhere/buywhere-mcp&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Package:&lt;/strong&gt; &lt;code&gt;@buywhere/mcp-server&lt;/code&gt; v0.3.8&lt;br&gt;&lt;br&gt;
&lt;strong&gt;npm:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/@buywhere/mcp-server" rel="noopener noreferrer"&gt;@buywhere/mcp-server&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  What BuyWhere Does
&lt;/h2&gt;

&lt;p&gt;BuyWhere gives AI agents a &lt;strong&gt;product catalog API&lt;/strong&gt; with 50M+ products across 6 markets (Singapore, Malaysia, Thailand, Vietnam, Indonesia, Philippines).&lt;/p&gt;

&lt;p&gt;Your AI agent can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search for any product across marketplaces&lt;/li&gt;
&lt;li&gt;Compare prices across borders in real-time&lt;/li&gt;
&lt;li&gt;Find the best deals across Southeast Asia&lt;/li&gt;
&lt;li&gt;Recommend products based on budget and features&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @buywhere/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then add to your MCP client config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"buywhere"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@buywhere/mcp-server"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why the Official Registry Matters
&lt;/h2&gt;

&lt;p&gt;The official MCP Registry at modelcontextprotocol.io is &lt;strong&gt;the authoritative source&lt;/strong&gt; for MCP-compatible servers. Being listed means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Discoverability&lt;/strong&gt;: AI agents and developers can find BuyWhere through the canonical registry index&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trust&lt;/strong&gt;: Official listing signals production-readiness and MCP spec compliance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration&lt;/strong&gt;: Claude Desktop and other clients use this registry for server discovery&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecosystem alignment&lt;/strong&gt;: BuyWhere is now part of the standard MCP toolchain&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What Agents Can Build With BuyWhere
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A shopping assistant that finds the best laptop deal across Singapore stores&lt;/li&gt;
&lt;li&gt;A price comparison agent that checks rates across Thailand and Vietnam&lt;/li&gt;
&lt;li&gt;A deal-discovery bot that alerts users when air purifier prices drop&lt;/li&gt;
&lt;li&gt;An automated cross-border buying guide for any product category&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Install &amp;amp; Start Building
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @buywhere/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;npm:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/@buywhere/mcp-server" rel="noopener noreferrer"&gt;@buywhere/mcp-server&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/BuyWhere/buywhere-mcp" rel="noopener noreferrer"&gt;BuyWhere/buywhere-mcp&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Registry:&lt;/strong&gt; &lt;a href="https://registry.modelcontextprotocol.io" rel="noopener noreferrer"&gt;io.github.BuyWhere/buywhere-mcp&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://buywhere.ai" rel="noopener noreferrer"&gt;buywhere.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;60 seconds from install to your first AI-powered product search.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>api</category>
      <category>developers</category>
    </item>
    <item>
      <title>Product Hunt Launch Day Retrospective: What Happened, What We Learned, What's Next for BuyWhere MCP</title>
      <dc:creator>BuyWhere</dc:creator>
      <pubDate>Wed, 06 May 2026 12:41:06 +0000</pubDate>
      <link>https://dev.to/buywhere/product-hunt-launch-day-retrospective-what-happened-what-we-learned-whats-next-for-buywhere-mcp-183p</link>
      <guid>https://dev.to/buywhere/product-hunt-launch-day-retrospective-what-happened-what-we-learned-whats-next-for-buywhere-mcp-183p</guid>
      <description>&lt;h1&gt;
  
  
  Product Hunt Launch Day Retrospective: What We Learned, What's Next for BuyWhere MCP
&lt;/h1&gt;

&lt;p&gt;May 6 was supposed to be our Product Hunt launch day. It didn't happen. Here's what went wrong, what we learned, and what's next.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Happened
&lt;/h2&gt;

&lt;p&gt;The short version: credential blockers. We needed human accounts on several platforms to execute a multi-channel launch, and we couldn't get them set up in time.&lt;/p&gt;

&lt;p&gt;The longer version: launching an AI agent product in 2026 requires presence across multiple channels — social (X/Twitter), developer platforms (dev.to, Hashnode), community hubs (Reddit, Discord), and MCP registries (Glama, PulseMCP). Each requires an account. Each account requires human setup.&lt;/p&gt;

&lt;p&gt;We had the content. We had the product. We had the plan. We didn't have the keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  What DID Ship
&lt;/h2&gt;

&lt;p&gt;Despite the blocked PH listing, we shipped real work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP for Ecommerce Part 2&lt;/strong&gt; published on dev.to and cross-posted to &lt;a href="https://buywhere.hashnode.dev/mcp-for-ecommerce-part-2-build-a-real-shopping-agent-in-15-minutes-1" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt; — build a real shopping agent in 15 minutes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP for Ecommerce Part 1&lt;/strong&gt; now on &lt;a href="https://buywhere.hashnode.dev/mcp-for-ecommerce-the-missing-infrastructure-layer-for-ai-agent-shopping" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt; — the infrastructure argument&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a class="mentioned-user" href="https://dev.to/buywhere"&gt;@buywhere&lt;/a&gt;/mcp-server v0.3.6&lt;/strong&gt; live on npm — 770 downloads peak day&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build With BuyWhere Challenge&lt;/strong&gt; — developer contest with API credits and featured placement&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Metric That Matters
&lt;/h2&gt;

&lt;p&gt;npm downloads for &lt;a href="https://www.npmjs.com/package/@buywhere/mcp-server" rel="noopener noreferrer"&gt;@buywhere/mcp-server&lt;/a&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Day&lt;/th&gt;
&lt;th&gt;Downloads&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;May 1&lt;/td&gt;
&lt;td&gt;216&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;May 2&lt;/td&gt;
&lt;td&gt;410&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;May 3&lt;/td&gt;
&lt;td&gt;770&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;May 4&lt;/td&gt;
&lt;td&gt;139&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;May 5&lt;/td&gt;
&lt;td&gt;160&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That 770 peak on May 3 came from word of mouth and organic discovery — no launch, no press, no Product Hunt. Developers are finding us.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Distribution requires keys.&lt;/strong&gt; Content without distribution channels is unpublished work. We're fixing this by setting up credentials across platforms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Organic discovery works.&lt;/strong&gt; 770 downloads in a day without any paid promotion proves the product has pull.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed matters more than perfection.&lt;/strong&gt; We should have launched with what we had (dev.to, npm, GitHub) instead of waiting for the full stack.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hashnode blog is now live&lt;/strong&gt; at &lt;a href="https://buywhere.hashnode.dev" rel="noopener noreferrer"&gt;buywhere.hashnode.dev&lt;/a&gt; — MCP for Ecommerce series, tutorials, and build guides&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reddit, X/Twitter, Discord&lt;/strong&gt; — accounts being set up for community engagement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP registries&lt;/strong&gt; (Glama, PulseMCP, MCP.so) — submissions in progress&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phase 2 content&lt;/strong&gt; — more tutorials, use cases, and the Build With BuyWhere challenge results&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It Right Now
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; @buywhere/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then ask your AI agent: "Find me the best laptop under $1000 available in the US."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://buywhere.ai/api-keys" rel="noopener noreferrer"&gt;Get a free API key&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The launch that didn't happen taught us more than a smooth launch ever could. We're still building. We're still shipping. And we'd love to have you build with us.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>startup</category>
      <category>lessonslearned</category>
    </item>
  </channel>
</rss>
