<?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: doctorSIM</title>
    <description>The latest articles on DEV Community by doctorSIM (@doctorsim).</description>
    <link>https://dev.to/doctorsim</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%2F4239203%2F842f0639-7d93-4b82-a99e-924c78a59337.png</url>
      <title>DEV Community: doctorSIM</title>
      <link>https://dev.to/doctorsim</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/doctorsim"/>
    <language>en</language>
    <item>
      <title>How an AI assistant can buy a travel eSIM: a look at doctorSIM's public MCP server</title>
      <dc:creator>doctorSIM</dc:creator>
      <pubDate>Wed, 11 Nov 2026 13:41:27 +0000</pubDate>
      <link>https://dev.to/doctorsim/how-an-ai-assistant-can-buy-a-travel-esim-a-look-at-doctorsims-public-mcp-server-6e3</link>
      <guid>https://dev.to/doctorsim/how-an-ai-assistant-can-buy-a-travel-esim-a-look-at-doctorsims-public-mcp-server-6e3</guid>
      <description>&lt;p&gt;If you have built an agent that plans trips, the last step is usually where it stalls. The assistant can pick a destination and compare options, then it has to hand the user a link and hope. We run doctorSIM, an online store for travel eSIMs, prepaid top-ups and digital gift cards, and we publish a remote MCP server so an assistant can go further: read the live catalog, check a phone number, and create an order. This post walks through what the server does and how the calls fit together.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the server is
&lt;/h2&gt;

&lt;p&gt;The endpoint is &lt;code&gt;https://api.doctorsim.com/mcp&lt;/code&gt;. It speaks MCP over Streamable HTTP, so any client that supports remote servers can connect without a local process. For guest checkout it needs no API key and no headers. OAuth 2.0 exists for PRO accounts that want to pay from prepaid credit, but you can ignore it for the flow below.&lt;/p&gt;

&lt;p&gt;The server exposes 23 tools. They cover eSIM destinations and plans, carrier lookup, operator rates, gift card brands, orders and, for linked accounts, balance and webhooks. Prices are never stored in the model's memory or in your prompt: the assistant reads them from the catalog in the same conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Buying a travel eSIM
&lt;/h2&gt;

&lt;p&gt;The eSIM flow needs no phone number. It goes in five calls:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;get_esim_destinations&lt;/code&gt; lists the countries and regions we cover. A country is an ISO-2 code such as &lt;code&gt;es&lt;/code&gt; or &lt;code&gt;it&lt;/code&gt;; regions use slugs like &lt;code&gt;eu&lt;/code&gt; and &lt;code&gt;ww&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_esim_plans&lt;/code&gt; takes a &lt;code&gt;country_iso&lt;/code&gt; and returns the plans for it. The match is strict, so a query for &lt;code&gt;es&lt;/code&gt; gives Spain plans only. If the trip crosses several countries, query the region slug too and compare.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;create_order&lt;/code&gt; takes the &lt;code&gt;catalog_id&lt;/code&gt; and &lt;code&gt;price_token&lt;/code&gt; copied from the plan the user picked. Both values come from the previous result and are never typed by the model from memory.&lt;/li&gt;
&lt;li&gt;The result includes a &lt;code&gt;payment_link&lt;/code&gt;. The assistant shows it to the user.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_order_status&lt;/code&gt; takes that link and reports progress. Once the order is fulfilled, the result carries the fields needed to install the eSIM.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Between steps 2 and 3 the assistant should repeat the choice to the user: destination, plan and currency. Creating an order is the one step worth a pause.&lt;/p&gt;

&lt;h2&gt;
  
  
  Topping up a prepaid phone
&lt;/h2&gt;

&lt;p&gt;The top-up flow starts from a phone number in E.164 format, the &lt;code&gt;+&lt;/code&gt; followed by country code and number.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;lookup_carrier&lt;/code&gt; takes the number and returns the operator and the country.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_operator_rates&lt;/code&gt; takes the operator id and lists what can be bought. The optional &lt;code&gt;q&lt;/code&gt; parameter searches product descriptions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;create_order&lt;/code&gt; takes the &lt;code&gt;price_token&lt;/code&gt; of the chosen product plus the &lt;code&gt;phone&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A wrong digit sends credit to a stranger, so the assistant should read the number back before the last call. If the carrier lookup fails, &lt;code&gt;get_countries&lt;/code&gt; and &lt;code&gt;get_operators&lt;/code&gt; let the user pick the operator by hand. When a service has several types, &lt;code&gt;get_operator_service_types&lt;/code&gt; shows which operator id applies to which type.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why payment goes through a link
&lt;/h2&gt;

&lt;p&gt;We could have let the assistant take card details. We did not, on purpose. A guest order returns a link on doctorsim.com, the user opens it, enters an email and pays on our checkout. The product is sent to that email after payment.&lt;/p&gt;

&lt;p&gt;That keeps card data out of the chat, the model's context and your logs, and the user gets a normal checkout. The link expires after six hours; if the user comes back later, create the order again from the same selection.&lt;/p&gt;

&lt;p&gt;One practical rule follows from this. For guest orders, the assistant should not promise a QR code in the conversation. It arrives by email. The status call is there so the assistant can answer "did it go through?" without guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  A client configuration
&lt;/h2&gt;

&lt;p&gt;Most MCP clients accept a block like this one. Field names differ a little between clients, so check your client's documentation for the exact key:&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="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"doctorsim"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://api.doctorsim.com/mcp"&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;Leave headers empty. In clients that ask for an OAuth client ID and secret, leave both blank for guest use.&lt;/p&gt;

&lt;p&gt;Then try a prompt such as "I'm going to Japan for ten days, find me an eSIM with plenty of data". A well-behaved assistant will call &lt;code&gt;get_esim_destinations&lt;/code&gt;, then &lt;code&gt;get_esim_plans&lt;/code&gt;, show a short list and wait for your choice before creating anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things to get right in your agent
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Copy &lt;code&gt;catalog_id&lt;/code&gt;, &lt;code&gt;price_token&lt;/code&gt; and operator ids from tool results. Do not let the model produce them.&lt;/li&gt;
&lt;li&gt;Show the user the current price from the result and say it is the current price.&lt;/li&gt;
&lt;li&gt;If a tool returns an error, read the &lt;code&gt;Next:&lt;/code&gt; hint in the message and follow it.&lt;/li&gt;
&lt;li&gt;Do not create an order twice. If a result has no order id, check the order list or the status call first.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where to read more
&lt;/h2&gt;

&lt;p&gt;The agent documentation is at &lt;a href="https://www.doctorsim.com/en/developers-agents.html" rel="noopener noreferrer"&gt;https://www.doctorsim.com/en/developers-agents.html&lt;/a&gt; and the MCP guide is at &lt;a href="https://www.doctorsim.com/api-docs/mcp.html" rel="noopener noreferrer"&gt;https://www.doctorsim.com/api-docs/mcp.html&lt;/a&gt;. If you want to see the customer side of the product, the eSIM catalog is at &lt;a href="https://www.doctorsim.com/en/esim/" rel="noopener noreferrer"&gt;https://www.doctorsim.com/en/esim/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If your client hits a case we did not describe here, tell us through the contact page.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>esim</category>
      <category>api</category>
    </item>
  </channel>
</rss>
