Skip to content

Conversation

@shiquda
Copy link
Contributor

@shiquda shiquda commented Mar 12, 2025

Description

Server Details

  • Server: fetch
  • Changes to: requests

Motivation and Context

In certain network environments (e.g. in China), direct access to the target URL may be restricted. By allowing users to specify a proxy server, it can help the mcp-server-fetch service bypass these restrictions and function normally.

How Has This Been Tested?

I am in China and cannot directly access wikipedia.org. I use @modelcontextprotocol/inspector for testing, starting the mcp-server-fetch service with the --proxy-url parameter to specify the proxy URL and send requests containing the URL. The service can successfully retrieve the URL content. Without this parameter, it shows a request timeout.

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

Copy link

@longhaiqwe longhaiqwe left a comment

Choose a reason for hiding this comment

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

LGTM

@olaservo olaservo added server-fetch Reference implementation for the Fetch MCP server - src/fetch enhancement New feature or request labels Mar 27, 2025
shiquda and others added 2 commits March 30, 2025 22:33
- AsyncClient.__init__() got an unexpected keyword argument 'proxies'
@olaservo olaservo merged commit e181222 into modelcontextprotocol:main Mar 30, 2025
25 checks passed
@olaservo
Copy link
Member

Created #1146 as a followup.

PazerOP referenced this pull request in PazerOP/mcp-template Jul 15, 2025
feat(fetch): add support for using proxy for requests
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