MCP Doesn't Need 30 Tools: It Needs Code
6 days ago
- #agentic-coding
- #CLI-tools
- #MCP
- Code performs better than MCP (Model Context Protocol) for some tasks, especially when command line tools are available.
- Challenges with CLI tools include platform-dependency, version-dependency, and undocumented features, leading to failures on first use.
- Non-ASCII string inputs and control characters can cause issues with shell tools, similar to problems in programming languages like C.
- Agentic coding tools struggle with maintaining stateful sessions, such as when using tmux for remote-controlling an LLDB session.
- MCP servers can expose a single tool that accepts programming code as inputs, providing a stateful alternative to CLI tools.
- pexpect-mcp is an example of an MCP server that exposes a Python interpreter, allowing stateful execution of Python code with pexpect.
- Using Python as the command language for MCP allows agents to write reusable scripts, reducing the need for multiple tool calls.
- Playwright's MCP can be replaced with an MCP that exposes the Playwright API via JavaScript, simplifying tool usage from ~30 definitions to 1.
- Security concerns with agentic coding tools are significant, as protections are inherently difficult to enforce and may be circumvented.
- The approach of using programming languages as the interface for MCP tools shows promise but requires further refinement for optimal performance.