Skip to content

Conversation

@jritsema
Copy link

Description

For the fetch MCP server, allows overriding of the default max_length argument using a MAX_LENGTH environment variable.

Server Details

  • Server: fetch
  • Changes to: tools

Motivation and Context

The default max_length of 5000 is sometimes too low and requires too many HTTP requests. It would be nice to be able to increase this value on a case by case basis.

How Has This Been Tested?

I tested this change with Amazon Q CLI.

Breaking Changes

No.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

- Updated server implementation to utilize `MAX_LENGTH` environment variable
- Improved README.md with detailed customization instructions for `max_length`
Copy link

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Would love this addition!

@olaservo olaservo added server-fetch Reference implementation for the Fetch MCP server - src/fetch enhancement New feature or request labels Jun 17, 2025
@olaservo
Copy link
Member

@claude would you recommend merging this pull request?

@claude
Copy link
Contributor

claude bot commented Aug 17, 2025

Claude encountered an error —— View job

Failed with exit code 128

I'll analyze this and get back to you.

@jritsema
Copy link
Author

would you consider merging?

@domdomegg
Copy link
Member

Thanks for the PR, and apologies for the long delay reviewing it. I think we want to reduce the number of possible configuration options for servers to reduce complexity, especially where there are alternative approaches to solving the same problem (e.g. setting your agent's system prompt to always set a particular max_length).

If this hard blocks some workflows, I'd be open to hearing more and reconsidering this. In the mean time you can workaround by running a fork locally.

@domdomegg domdomegg closed this Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request server-fetch Reference implementation for the Fetch MCP server - src/fetch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants