on-internet
← Community

How to handle token limit when processing large JSON response with MCP client-server?

Stack Overflow ·

I'm building a natural language search in my web application using a custom MCP (Model Context Protocol) client-server architecture. Here’s the setup: MCP Server: To execute backend method to return structured JSON MCP Client: Node.js app that sends this JSON along with a natural language prompt to the Claude 3.5 Sonnet LLM via API. Frontend: ReactJS LLM: Claude 3.5 Sonnet For smaller JSON payloads, the setup works fine — the LLM responds with a clean, natural language output. But as the JSON grows, I start running into token limit issues. Error as belows: 529: {"type":"error","error":{"type":

Comments

Sign in or sign up to comment and upvote.

No comments yet.