Live data from Hacker News

Making MCP cheaper via CLI

kanyilmaz.me

111–120 of 127 posts

Re: Making MCP cheaper via CLI

#111
The best things about AI hypergrowth is the opportunities to discover of meta-frameworks and workflows. This is something Anthropic kills at (MCPs, Skills, Claude Code terminal agents).

These are discoveries of workflows. Some of them work some of them don’t. The ones that really click, they explode in popularity like OpenClaw.

Re: Making MCP cheaper via CLI

#112
post #54
post #23

There is some important context missing from the article. First, MCP tools are sent on every request. If you look at the notion MCP the search tool description is basically a mini tutorial. This is going right into the context window. Given that in most cases MCP tool loading is all or nothing (unless you pre-select the tools by some other means) MCP in general will bloat your context significantly. I think I counted…

So basically the best way to use MCP is not to use it at all and just call the APIs directly or through a CLI. If those dont exist then wrapping the MCP into a CLI is the second best thing. Makes you wonder whats the point of MCP

The guy who created fastmcp, he mentioned that you should use mcp to design how an llm should interact with the API, and give it tools that are geared towards solving problems, not just to interact with the API. Very interesting talk on the topic on YouTube. I still think it's a bloated solution.

Re: Making MCP cheaper via CLI

#113
post #99

Earlier quoted context omitted.

There are very few stateful MCP Servers out there, and the standard is moving towards stateless by default. What is really making MCP stand out is: - oauth integration - generalistic IA assistants adoption. If you want to be inside ChatGPT or Claude, you can't provide a CLI.

> What is really making MCP stand out is: > - oauth integration I don't see a reason a cli can't provide oauth integration flow. Every single language has an oauth client. > - generalistic IA assistants adoption. If you want to be inside ChatGPT or Claude, you can't provide a CLI. This is actually a valid point. I solved it by using a sane agent harness that doesn't have artificial restrictions, but I understand that…

Oauth with mcp is more than just traditional oauth. It allows dynamic client registration among other things, so any mcp client can connect to any mcp server without the developers on either side having to issue client ids, secrets, etc. Obviously a cli could use DCR as well, but afaik nobody really does that, and again, your cli doesn't run in claude or chatgpt.

Re: Making MCP cheaper via CLI

#114

I started adding cli's for a few things last week. Initially just for myself but it didn't take me long to figure out that codex / claude code / etc. are pretty good at figuring out cli's as well. And creating them. If you have APIs, generating a usable cli for them is pretty straightforward. With lots of nice features, documentation, bash/zsh autocomplete support and other bells and whistles. Doing that manually is…

Yeah that was my strategy yesterday and it worked. I ditched an MCP server and had Claude write its own CLI for the API

Re: Making MCP cheaper via CLI

#115
post #23

There is some important context missing from the article. First, MCP tools are sent on every request. If you look at the notion MCP the search tool description is basically a mini tutorial. This is going right into the context window. Given that in most cases MCP tool loading is all or nothing (unless you pre-select the tools by some other means) MCP in general will bloat your context significantly. I think I counted…

You’ve described a naive MCP implementation but it really doesn’t work that way IRL.

I have an MCP server with ~120 functions and probably 500k tokens worth of help and documentation that models download.

But not all at once, that would be crazy. A good MCP tool is hierarchical, with a very short intro, links to well-structured docs that the model can request small pieces of, groups of functions with `—-help` params that explain how to use each one, and agent-friendly hints for grouping often-sequential calls together.

It’s a similar optimization to what you’re talking about with CLI; I’d argue that transport doesn’t really matter.

There are bad MCP serves that dump 150k tokens of instructions at init, but that’s a bad implementation, not intrinsic to the interface.

Re: Making MCP cheaper via CLI

#116
post #99

Earlier quoted context omitted.

Exactly. You shouldn't use MCPs unless there is some statefulness / state / session they need to maintain between calls. In all other cases, CLI or API calls are superior.

There are very few stateful MCP Servers out there, and the standard is moving towards stateless by default. What is really making MCP stand out is: - oauth integration - generalistic IA assistants adoption. If you want to be inside ChatGPT or Claude, you can't provide a CLI.

Stateful at the application layer, not the transport layer. There are tons of stateful apps that run on UDP. You can build state on top of stateless comms.

Re: Making MCP cheaper via CLI

#117
post #54
post #23

There is some important context missing from the article. First, MCP tools are sent on every request. If you look at the notion MCP the search tool description is basically a mini tutorial. This is going right into the context window. Given that in most cases MCP tool loading is all or nothing (unless you pre-select the tools by some other means) MCP in general will bloat your context significantly. I think I counted…

So basically the best way to use MCP is not to use it at all and just call the APIs directly or through a CLI. If those dont exist then wrapping the MCP into a CLI is the second best thing. Makes you wonder whats the point of MCP

> Makes you wonder whats the point of MCP

I only use them for stuff that needs to run in-process, like a QT MCP that gives agents access to the element hierarchy for debugging and interacting with the GUI (like giving it access to Chrome inspector but for QT).

Re: Making MCP cheaper via CLI

#118
post #23

There is some important context missing from the article. First, MCP tools are sent on every request. If you look at the notion MCP the search tool description is basically a mini tutorial. This is going right into the context window. Given that in most cases MCP tool loading is all or nothing (unless you pre-select the tools by some other means) MCP in general will bloat your context significantly. I think I counted…

> Given that in most cases MCP tool loading is all or nothing (unless you pre-select the tools by some other means)

Which applications that support MCP don't let you select the individual tools in a server?

Re: Making MCP cheaper via CLI

#119
post #111

The best things about AI hypergrowth is the opportunities to discover of meta-frameworks and workflows. This is something Anthropic kills at (MCPs, Skills, Claude Code terminal agents). These are discoveries of workflows. Some of them work some of them don’t. The ones that really click, they explode in popularity like OpenClaw.

How does MCP differ from Skills?

Re: Making MCP cheaper via CLI

#120
I keep reading these unfair comparisons mixing many different problems into a naive story in favour of clis. First of all no one should still consider connecting mcps directly to agents, this is completely outdated, you connect mcps and tools to a single gateway that has an api, handles federation, auditing, prolicies and much more. A good gateway exposes a tiny minimal context with just instructions how to query what is available and has a configurable "eager" flag for the things that should be put eagerly into the context for certain agent profiles. Secondly many many mcp servers are outdated as they were build for way dumber models than what we have today and will have overly heavy context and descriptions that slow down and degrade the current frontier models. If you compare a cli to a state of the art agent gateway setup with adjustments for the current models, you will find that the only advantage for clis is operational complexity.
Post reply on HN