Skip to content

[FR] Options to reduce MCP token usage #506

Description

@kkirss

Problem

I'm using Task Genius MCP with Claude Code, and the token overhead is eating my context budget.

Tool definition take ~13.6k tokens. The responses also include spaces and newlines between fields.

Solution

Tool filtering – Make it possible to choose which tools are enabled.

Could be as simple as an enabledTools array in settings, filtering what getTools() returns.

Compact JSON – The server uses JSON.stringify(result, null, 2). An option for minified output would be great.

Field selection – Most of my queries don't need all of the fields. Something like query_tasks({ fields: [...] }) or a per-tool config would be useful.

Activity

  1. Quorafind commented on Nov 29, 2025

    @Quorafind
    Collaborator

    Soon. I am also using claude code with task genius

  2. Quorafind commented on Dec 1, 2025

    @Quorafind
    Collaborator

    Fixed, you can try again with 9.12.3 and see if issue remains

  3. kkirss commented on Dec 1, 2025

    @kkirss
    Author

    You added fields parameter to allow filtering fields. This is great, thanks :)

    Stripping the whitespace would also be good. The JSON is descriptive enough for LLMs.

    It seems you added 2 tools for dynamic discovery of tools. But all the other tools are still included in the context window. So the context usage actually increased with this.

  4. yifanyifan897645 commented on Mar 30, 2026

    @yifanyifan897645

    The irony of adding discovery tools increasing total context usage is a common trap. If you want to measure the actual token impact of each tool definition before and after changes, mcp-checkup can give exact numbers per tool and grade overall efficiency:

    npx mcp-checkup

    It would flag a net-negative "optimization" immediately. For compact output, stripping null, 2 formatting from JSON.stringify in tool responses is also low-hanging fruit (~15-20% token reduction).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions