Your MCP Server Speaks HTTP. Your LLM Doesn’t.

📰 Medium · LLM

Learn why LLMs struggle with status codes and how to improve error handling in MCP servers using a sentence-based protocol

intermediate Published 5 May 2026
Action Steps
  1. Review your MCP server's error handling mechanism to identify potential issues
  2. Implement a sentence-based protocol to return descriptive error messages instead of status codes
  3. Use natural language processing techniques to generate human-readable error messages
  4. Test and refine your error handling mechanism to reduce retry storms and improve overall system efficiency
  5. Consider using existing libraries or frameworks to simplify the implementation of sentence-based error handling
Who Needs to Know This

Developers and engineers working with LLMs and MCP servers can benefit from this knowledge to improve error handling and reduce retry storms

Key Insight

💡 LLMs are not designed to understand status codes, and using sentence-based protocols can improve error handling and reduce costs

Share This
💡 Improve error handling in MCP servers by using sentence-based protocols instead of status codes #LLM #MCP #ErrorHandling

Key Takeaways

Learn why LLMs struggle with status codes and how to improve error handling in MCP servers using a sentence-based protocol

Full Article

Title: Your MCP Server Speaks HTTP. Your LLM Doesn’t.

URL Source: https://levelup.gitconnected.com/your-mcp-server-speaks-http-your-llm-doesnt-b256742175bd?source=rss------llm-5

Published Time: 2026-05-05T20:34:21Z

Markdown Content:
# Your MCP Server Speaks HTTP. Your LLM Doesn’t. | by Michalis Dobekidis | May, 2026 | Medium

[Sitemap](https://levelup.gitconnected.com/sitemap/sitemap.xml)

[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)

Sign up

[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmdobekidis.medium.com%2Fyour-mcp-server-speaks-http-your-llm-doesnt-b256742175bd&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)

Get app

[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)

[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)

Sign up

[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmdobekidis.medium.com%2Fyour-mcp-server-speaks-http-your-llm-doesnt-b256742175bd&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

![Image 1](https://miro.medium.com/v2/resize:fill:32:32/1*dmbNkD5D-u45r44go_cf0g.png)

# Your MCP Server Speaks HTTP. Your LLM Doesn’t.

[![Image 2: Michalis Dobekidis](https://miro.medium.com/v2/resize:fill:32:32/0*2voUSsmBblr_MjUr.)](https://levelup.gitconnected.com/?source=post_page---byline--b256742175bd---------------------------------------)

[Michalis Dobekidis](https://levelup.gitconnected.com/?source=post_page---byline--b256742175bd---------------------------------------)

6 min read

·

Just now

[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2Fb256742175bd&operation=register&redirect=https%3A%2F%2Fmdobekidis.medium.com%2Fyour-mcp-server-speaks-http-your-llm-doesnt-b256742175bd&user=Michalis+Dobekidis&userId=62d021dc10cd&source=---header_actions--b256742175bd---------------------clap_footer------------------)

--

[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2Fb256742175bd&operation=register&redirect=https%3A%2F%2Fmdobekidis.medium.com%2Fyour-mcp-server-speaks-http-your-llm-doesnt-b256742175bd&source=---header_actions--b256742175bd---------------------bookmark_footer------------------)

[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3Db256742175bd&operation=register&redirect=https%3A%2F%2Fmdobekidis.medium.com%2Fyour-mcp-server-speaks-http-your-llm-doesnt-b256742175bd&source=---header_actions--b256742175bd---------------------post_audio_button------------------)

Share

_Why MCP tools should return sentences, not status codes, and a small protocol for getting it right._

Press enter or click to view image in full size

![Image 3](https://miro.medium.com/v2/resize:fit:1000/1*6XoVdVjgWPeQpKMZTl4clA.jpeg)

LLMs are terrible with status codes, humans too

## Why the war on status codes?

Most MCP servers I’ve reviewed (including some I’ve written) treat error handling as an afterthought: catch the upstream API failure, forward the status code, maybe stuff a JSON blob into the response, and move on.

The thinking goes that the LLM is smart, and it’ll figure out what `401`, `422`, or `ECONNRESET` means. In practice, it doesn't, and the cost is real, in time and in tokens/money.

A bare error code triggers retry storms as the model tries the same call with cosmetic variations, leading to hallucinated parameters as the model “guesses” what was wrong, makes the model question whether the
Read full article → ← Back to Reads

Related Videos

5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
How To Use Claude Code With Ollama (Free Local AI Setup)
How To Use Claude Code With Ollama (Free Local AI Setup)
Ksk Royal
USE GLM 5.2 for FREE in OpenCode (CloudFlare Workers AI Tutorial)
USE GLM 5.2 for FREE in OpenCode (CloudFlare Workers AI Tutorial)
Ksk Royal
Kimi K3: Stop Paying $20 — Get It For Just $5 🤯
Kimi K3: Stop Paying $20 — Get It For Just $5 🤯
Ksk Royal
GLM 5.2 Just Shocked Me 🤯 - Best Open Source AI MODEL ?
GLM 5.2 Just Shocked Me 🤯 - Best Open Source AI MODEL ?
Ksk Royal
EigenTrace Large Language Model RLHF Analyzer Live Stream on Current Events
EigenTrace Large Language Model RLHF Analyzer Live Stream on Current Events
A.I.N.N. - Live News and EigenTrace LLM Analysis