Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

Zero Dependencies, 250KB, 486 Tests: What I Learned Building an MCP Client

Zero Dependencies, 250KB, 486 Tests: What I Learned Building an MCP Client This is not a product pitch. It's an engineering diary. If you want the pitch, the README is here . This is about the cost of zero. The setup Six weeks ago I started building mcptoon — a CLI tool that sits between AI agents (Claude Code, Cursor, Codex) and MCP servers. The problem it solves: MCP tool schemas get injected…

This article is not a product pitch, but rather an engineering diary detailing the author's experience building an MCP client CLI tool. The tool, named mcptoon, acts as a bridge between AI agents and MCP servers, preventing the injection of tool schemas into the context window.

One of the primary design decisions made for mcptoon was adhering to a zero-dependency approach. This decision was prompted by the uv security incident, where a transitive dependency in a popular Python tool led to a supply chain vulnerability affecting thousands of projects. The author, recognizing the lack of auditing for these dependencies, decided to forgo third-party imports in their own project, relying solely on Python's standard library.

Hand-rolling various components, such as an HTTP client, CLI parsing, and validation, proved to be time-consuming. For instance, creating an HTTP POST request required writing out the request details manually, resulting in verbose code. Similarly, CLI argument parsing and JSON validation needed to be implemented from scratch, leading to extensive amounts of code.

Despite the increased development time, the author found that parsing Server-Sent Events (SSE) was a worthwhile endeavor, as it provided deeper insights into the protocol. However, other aspects, such as CLI argument parsing and terminal formatting, were deemed unnecessary for the project's goals, given the verbosity of the custom solutions compared to the benefits of using third-party libraries.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Thursday 20 August →