<?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: Coupossum.com</title>
    <description>The latest articles on DEV Community by Coupossum.com (@coupossum).</description>
    <link>https://dev.to/coupossum</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4248881%2F54e9baba-5a00-4ac4-a158-0d35f2479e67.png</url>
      <title>DEV Community: Coupossum.com</title>
      <link>https://dev.to/coupossum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/coupossum"/>
    <language>en</language>
    <item>
      <title>I built a coupon search for AI assistants and Telegram: an MCP server, a bot, and posts that delete themselves</title>
      <dc:creator>Coupossum.com</dc:creator>
      <pubDate>Tue, 17 Nov 2026 06:45:50 +0000</pubDate>
      <link>https://dev.to/coupossum/i-built-a-coupon-search-for-ai-assistants-and-telegram-an-mcp-server-a-bot-and-posts-that-delete-5c5</link>
      <guid>https://dev.to/coupossum/i-built-a-coupon-search-for-ai-assistants-and-telegram-an-mcp-server-a-bot-and-posts-that-delete-5c5</guid>
      <description>&lt;p&gt;Coupon sites have a reputation problem: half the codes are expired, the other half were never real. I wanted to build one that only shows what a store's affiliate program actually published, with end dates, and then make that data usable where people already are: in their AI assistant and in Telegram.&lt;/p&gt;

&lt;p&gt;The result is &lt;a href="https://coupossum.com" rel="noopener noreferrer"&gt;Coupossum&lt;/a&gt;: a website, a public MCP server, a Telegram channel and a Telegram bot, all answering from the same PostgreSQL database. Right now that's about 35,000 codes and deals from about 5,000 stores, refreshed every two hours.&lt;/p&gt;

&lt;p&gt;This post covers the parts that turned out to be interesting:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One database, four front ends&lt;/li&gt;
&lt;li&gt;An MCP server that AI directories accept&lt;/li&gt;
&lt;li&gt;Telegram posts that disappear when the offer ends&lt;/li&gt;
&lt;li&gt;A Telegram bot without an AI model&lt;/li&gt;
&lt;li&gt;Links that are never opened by a machine&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. One database, four front ends
&lt;/h2&gt;

&lt;p&gt;The data comes from &lt;a href="https://feedico.io" rel="noopener noreferrer"&gt;Feedico&lt;/a&gt;'s Partner API, which aggregates coupons and products from affiliate networks. Coupossum is my own product built on that data, not an official Feedico service. &lt;/p&gt;

&lt;p&gt;A sync job pulls coupons every two hours, stores daily, products daily. Everything shown publicly goes through one file of read queries, so the visibility rules exist exactly once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;COUPON_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`
  c.is_active AND m.is_eligible AND NOT c.is_duplicate
  AND (c.ends_at IS NULL OR c.ends_at &amp;gt; now())
  AND (c.starts_at IS NULL OR c.starts_at &amp;lt;= now())
  AND (c.link_status IS NULL OR c.link_status NOT IN ${BAD_LINK})
  AND c.is_offer`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note &lt;code&gt;ends_at &amp;gt; now()&lt;/code&gt; is checked at query time, not at sync time. An offer that ends at 14:00 disappears at 14:00, not at the next sync.&lt;/p&gt;

&lt;p&gt;The website, the MCP server and the Telegram bot all import these queries. When I fix a ranking or filter bug, it's fixed everywhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; Node 22, Fastify 5, PostgreSQL, the official MCP TypeScript SDK, &lt;code&gt;node:test&lt;/code&gt; with PGlite (Postgres in WebAssembly) so the tests run against a real Postgres without Docker. pm2 and cron on a small VPS.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. An MCP server that AI directories accept
&lt;/h2&gt;

&lt;p&gt;The MCP server is public: &lt;code&gt;https://coupossum.com/mcp&lt;/code&gt;, Streamable HTTP, no authentication, read-only. Four 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_coupons&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Codes and deals by keyword and/or store, optionally by country&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_store_offers&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;One store's current offers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;search_stores&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stores by name or domain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;search_products&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Products on sale, with max price and currency&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Add it to Claude, ChatGPT, Cursor or VS Code as a remote MCP server and ask "any codes for Belleek?" or "running shoes under 80 euros on sale".&lt;/p&gt;

&lt;p&gt;A few things I learned getting it into directories (Anthropic's connector directory, the &lt;a href="https://registry.modelcontextprotocol.io" rel="noopener noreferrer"&gt;official MCP Registry&lt;/a&gt; as &lt;code&gt;com.coupossum/coupossum&lt;/code&gt;, Glama, LobeHub):&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool descriptions must describe, not instruct.&lt;/strong&gt; My first version had rules like "always show both links" inside the tool descriptions. Anthropic's directory policy doesn't allow that: tool descriptions are for what a tool does. The rules moved into the server's &lt;code&gt;instructions&lt;/code&gt;, which every client receives on connect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&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;McpServer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'coupossum'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'0.2.5'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;websiteUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;SITE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;origin&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="n"&gt;instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;INSTRUCTIONS&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;Annotations matter.&lt;/strong&gt; Every tool is marked &lt;code&gt;readOnlyHint: true&lt;/code&gt;, &lt;code&gt;destructiveHint: false&lt;/code&gt;, &lt;code&gt;idempotentHint: true&lt;/code&gt; and &lt;code&gt;openWorldHint: false&lt;/code&gt;, with a human-readable title. Reviewers and clients both use them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cap and say so.&lt;/strong&gt; Every tool returns at most 10 results and tells the model when there are more, with a link to the full list. That keeps answers short and stops a model from paging through the whole database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rate limit in memory only.&lt;/strong&gt; A fixed window per IP, kept in a &lt;code&gt;Map&lt;/code&gt; for a few minutes and never written anywhere. Search terms are logged for statistics, IPs are not.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Telegram posts that disappear when the offer ends
&lt;/h2&gt;

&lt;p&gt;The Telegram channel &lt;a href="https://t.me/coupossum" rel="noopener noreferrer"&gt;@coupossum&lt;/a&gt; posts one offer an hour during the day. Each post is a generated image plus a caption:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F69d2k3ngttqotulrhmeq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F69d2k3ngttqotulrhmeq.png" alt=" " width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The images come from &lt;code&gt;@napi-rs/canvas&lt;/code&gt; with the Inter font bundled from &lt;code&gt;@fontsource/inter&lt;/code&gt;, so the server doesn't depend on system fonts. Store names are text only: no logos, no product photos.&lt;/p&gt;

&lt;p&gt;The interesting part isn't posting. It's &lt;strong&gt;un-posting&lt;/strong&gt;. A deals channel full of expired codes is exactly the reputation problem I wanted to avoid, so every post is stored with its message id, and every hour the job checks which posted offers are no longer visible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;endedPosts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chat&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;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;tg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deleteMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;setStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'deleted'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;continue&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="n"&gt;err&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="nf"&gt;notFound&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&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;await&lt;/span&gt; &lt;span class="nf"&gt;setStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'gone'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;continue&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="c1"&gt;// Telegram may refuse: replace the post instead&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;tg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;editPhoto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;endedImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;endedCaption&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;store_name&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;await&lt;/span&gt; &lt;span class="nf"&gt;setStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'ended'&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;Why the fallback? The Bot API docs say a message "can only be deleted if it was sent less than 48 hours ago", and in the same list that a channel admin with the delete right "can delete any message there". It's not clear which wins for old channel posts, and most offers run longer than 48 hours. Editing has no such limit for a bot's own messages, so if deletion fails, the post becomes an "offer ended" card without the code. I'm running a test post past the 48-hour mark to find out which path Telegram actually takes.&lt;/p&gt;

&lt;p&gt;This is also why Telegram is the first social channel and not Pinterest or WhatsApp. On Pinterest, deleting pins through the API needs an approved developer app, and free schedulers like Buffer can't delete published pins. WhatsApp Channels have no official API at all. A channel only gets added once its expired posts can be removed automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. A Telegram bot without an AI model
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://t.me/coupossum_bot" rel="noopener noreferrer"&gt;@coupossum_bot&lt;/a&gt; answers in private chats: send "homary" and you get that store's current codes; send "shoes 20% off" and you get a keyword search. It also works inline: type &lt;code&gt;@coupossum_bot nike&lt;/code&gt; in any chat and pick an offer to share.&lt;/p&gt;

&lt;p&gt;No LLM involved. A store name match is checked first, then a plain keyword search over the same queries as the website. It's instant, free to run, and it can't hallucinate a code.&lt;/p&gt;

&lt;p&gt;The bot runs on a webhook inside the existing Fastify app, not a separate process. Telegram sends a secret token header with each request, which I derive from the bot token so there's no second secret to manage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;webhookSecret&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="nf"&gt;createHmac&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'sha256'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'coupossum-telegram-webhook'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'base64url'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/telegram/webhook'&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="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reply&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="n"&gt;got&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'x-telegram-bot-api-secret-token'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s1"&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;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;got&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;timingSafeEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;got&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;expected&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="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;code&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;403&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'forbidden'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// handle the update, always answer 200 so Telegram doesn't retry our own errors&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;Nothing about Telegram users is stored. Search terms are logged without user or chat ids; user ids live in memory for a minute for the rate limit.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Links that are never opened by a machine
&lt;/h2&gt;

&lt;p&gt;Every store link is an affiliate link, and affiliate networks treat automated clicks as invalid traffic. That shaped more of the design than I expected:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Website:&lt;/strong&gt; store links point to &lt;code&gt;/go/&amp;lt;token&amp;gt;&lt;/code&gt; on my own domain (disallowed in robots.txt), and the actual partner URL is opened by JavaScript on a real click. I added this after a crawler that ignores robots.txt started following plain affiliate links.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP:&lt;/strong&gt; the server instructions tell assistants to show links and never open them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telegram:&lt;/strong&gt; the bot and channel only ever link to the offer's page on coupossum.com, and link previews are switched off, so Telegram's servers never fetch a link on their own.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you build anything on affiliate data, design for "a human clicked this" from day one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Website: &lt;a href="https://coupossum.com" rel="noopener noreferrer"&gt;coupossum.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MCP server: &lt;code&gt;https://coupossum.com/mcp&lt;/code&gt; (&lt;a href="https://coupossum.com/ai" rel="noopener noreferrer"&gt;setup guide&lt;/a&gt;) or if you're using Claude you can add it from the directory &lt;a href="https://claude.ai/directory/coupossum" rel="noopener noreferrer"&gt;https://claude.ai/directory/coupossum&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Telegram: &lt;a href="https://t.me/coupossum" rel="noopener noreferrer"&gt;@coupossum&lt;/a&gt; (channel) and &lt;a href="https://t.me/coupossum_bot" rel="noopener noreferrer"&gt;@coupossum_bot&lt;/a&gt; (search)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'd love feedback on the MCP tool design in particular: what would you want a shopping tool to return that it doesn't?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: Coupossum's store links are affiliate links; if you buy through one, I may earn a commission at no extra cost to you. Coupossum is independent: the stores don't run or endorse it. Offers come from the Feedico partner network; Coupossum is not an official Feedico product.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>telegram</category>
      <category>node</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
