Directus integrated MCP: how to reduce token usage?

Thanks for the bump Rijk. Indeed I am in the deep end of this. :melting_face:

Great topic and great question @Jehu ! And one that I personally wrestled with a lot with during the latest MCP Release.

Spoke a little bit about it here, but we’re definitely aware of the heavier token usage. It was a conscious decision we made when shipping that latest release with the MCP.

In the tradeoff between higher token costs vs (reasonably) reliable results – we chose better results.

If you look at things like creating / managing schema in Directus, you have not only the underlying SQL schema we have to account for but also the metadata for the UI (interfaces, displays, etc)

It’s a lot of complex data with a lot of possible combinations that unfortunately has to be highly accurate or bad things will happen :anxious_face_with_sweat:.

The only way to inform the LLM of that structure is to give it specific detailed examples which have a high token cost.

All that said - we’re actively working on ways to reduce the token usage while ensuring we still get the level of reliability we expect.

We’ve got a few promising concepts that I think will solve the problem, but we’re not willing to ship until we can prove the results are 100% as good or better.

For a quick fix today, would definitely recommend disabling the tools you’re not using or don’t plan to use in that session. So if you’re not working with files and folders or flows and operations – just disable those tools for the session so they don’t eat into your context window.

Long term though - we got you :smiley::raised_fist:.