←Back

Building WhoisThere: A Lightweight Go MCP Server for Domain Availability Checking

I recently released a small but powerful open-source tool named WhoisThere

There were three main motivations behind building WhoisThere:

  • I kept asking LLMs (like Claude, chat GPT, Gemini or others) for domain name ideas. They suggested creative names; only for me to check a domain registrar and find out the domains were already registered
  • I wanted to continue working with Go
  • I was curious about building an MCP server

What Is WhoisThere?

WhoisThere is an MCP-server (HTTP) written in Go that exposes two “tools”:

  1. DomainAvailable — checks whether a specific domain (including TLD) is available for registration.
  2. AvailableDomainTLDFinder — given a domain stem (for example, “whoisthere“), it checks across a curated list of TLDs (popular, country-code, and newer TLDs) and returns which full domains are available.

These tools let clients (for example, LLM agents) programmatically query domain availability in a structured way. Rather than relying on informal prompts, LLMs can call your MCP server, ask “Is example.com available?”, and get a concrete boolean or list response.

Technical Architecture

Citation

Here are some of the key technical decisions and implementations that made WhoisThere work:

  • The service is written in Go, which gives you great concurrency, compilation to a single binary, and efficient performance. This was important because I wanted to make it as lightweight as possible in order to run on resource constrained hardware
  • For WHOIS lookups, I used the Go library likexian/whois to fetch raw WHOIS data
  • To interpret the raw WHOIS response, I used likexian/whois-parser, which provides a structured parsed representation of domain registration data
  • My logic for determining if a domain is available is layered:
    1. I check raw WHOIS text for common “not found” patterns (e.g., “no match for”, “not found”, “domain not found”),
    2. I parse the WHOIS response and check status flags like expired, pendingdelete, or redemptionperiod,
    3. If there’s an expiration date in the parsed data, I compare it to the current time to see if the domain’s registration has lapsed.
  • I maintain lists of TLDs that I will check for the TLD-finder tool:
    • Popular TLDs: com, net, org, io, dev, app, co, etc.
    • Country-code TLDs: us, uk, ca, de, jp, and more.
    • Newer TLDs: ai, xyz, blog, shop, online, and others.

Because WHOIS lookups are done concurrently (in Go routines), the server can handle multiple checks in parallel fairly efficiently.

Building the MCP Server

To expose these domain-checking tools, I used the Go MCP SDK

Creating an MCP server was pretty straight forward:

Go

	server := mcp.NewServer(
		&mcp.Implementation{Name: "whoisthere", Version: "v1.0.0"},
		&mcp.ServerOptions{
			HasTools: true,
		},
	)

	mcp.AddTool(
		server,
		&mcp.Tool{Name: "DomainAvailable", Description: "Check if a domain is available"},
		CheckDomainAvailability,
	)
	mcp.AddTool(
		server,
		&mcp.Tool{
			Name:        "AvailableDomainTLDFinder",
			Description: "Given a string without a TLD, find all available TLDs for a potential domain",
		},
		CheckAvailableDomainTLD,
	)

	handler := mcp.NewStreamableHTTPHandler(func(req *http.Request) *mcp.Server {
		return server
	}, nil)

Transport-wise, I opted for HTTP (rather than STDIO or other transports). This makes it easy to call from LLM agents, local clients, or even web front ends.

Deployment & Usage

I built WhoisThere to be lightweight:

  • It compiles into a single Go binary for all architectures.
  • I currently run it on my proxmox homelab to serve my LLM toolchain (LM Studio / Claude Desktop/ N8N).
  • No heavy external dependencies: unlike a full database-backed web service, it’s just Go + WHOIS libs.

Lessons Learned & Challenges

Working on WhoisThere was a rich learning experience. Here are some of the highlights:

Learning Go

  • Go’s concurrency model made handling parallel WHOIS lookups straightforward and reliable.
  • Parsing and error handling in Go forced me to think carefully about edge cases (e.g., what happens when WHOIS data is malformed or missing).
  • The syntax reminded me of both Python/javascript (for readability) and C++ (for performance), which felt familiar and comfortable.

Learning MCP

  • Using the official Go MCP SDK helped me understand how to define “tools” with strongly typed input/output schemas
  • I gained a better grasp of how an LLM can call external “tools” via MCP, which is increasingly useful in agent-based architectures.
  • Handling the HTTP transport and tool registration felt very easy with a simple mcp.NewStreamableHTTPHandler paired with http.ListenAndServe(config.Host, handler)

Technical Challenges

  • WHOIS responses are notoriously inconsistent. Different registrars and TLDs have different formats, so catching “domain not found” reliably meant combining raw-text pattern matching and structured parsing
  • Error handling: if parsing fails, or the WHOIS client errors, I currently return an error via MCP

Technical Challenges

WhoisThere may be a small tool, but it’s been a meaningful side project: a practical tool, a learning exercise, and a foundation for future experimentation with both LLMs and MCP tooling.

If you’re interested in trying it out, contributing, or just seeing how it works: check out the GitHub repo. I’d also love to hear feedback, ideas for improvement, or real-world use cases you think could make it even more useful.

Leave a Reply

Your email address will not be published. Required fields are marked *