material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

mcp tool useMuiDocs returning too many tokens for Claude Code

Open Anaxagoras-bc opened this issue 3 months ago • 3 comments

Steps to reproduce

Steps:

  1. install claude code
  2. install mcp server
  3. ask it to search material-ui documentation

Current behavior

● mui-mcp - useMuiDocs (MCP)(urlList: ["https://llms.mui.com/material-ui/7.2.0/llms.txt"])
  ⎿  Error: MCP tool "useMuiDocs" response (25712 tokens) exceeds maximum allowed tokens (25000). Please use pagination, filtering, or limit parameters to reduce the response size.

I've tried prompting claude-code to use pagination, filtering, or limits all with no success.

Expected behavior

No response

Context

No response

Your environment

No response

Search keywords: mcp, claude code

Anaxagoras-bc avatar Aug 17 '25 18:08 Anaxagoras-bc

Does it work better with https://context7.com/mui/material-ui? (I'm don't really know why we have our own MCP vs. pushing people to Context7).

oliviertassinari avatar Aug 17 '25 22:08 oliviertassinari

This seems extremely inefficient and wasteful.. a request for 2 components returned 325,419 tokens! Claude warns when it's higher than 10k.

{
  "urls": [
    "https://mui.com/material-ui/react-dialog/",
    "https://mui.com/material-ui/react-modal/"
  ]
}

Returns: MCP tool "fetchDocs" response (325419 tokens) exceeds maximum allowed tokens (25000). Please use pagination, filtering, or limit parameters to reduce the response size.

jgentes avatar Oct 19 '25 22:10 jgentes

I created a simple MUI MCP that works well - you can 1-click install your own to Cloudflare or use the one I created: https://github.com/jgentes/mui-mcp-cloudflare

Deploy to Cloudflare Workers

jgentes avatar Oct 19 '25 23:10 jgentes