Skip to main content
Glama

proxy_set_upstream

Configure a global upstream proxy for all outgoing traffic to route through SOCKS, HTTP, HTTPS, or PAC protocols, with options to bypass specific hosts.

Instructions

Set a global upstream proxy for all outgoing traffic. Supports socks4://, socks5://, http://, https://, and pac+http:// URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxy_urlYesUpstream proxy URL (e.g., socks5://user:pass@host:port)
no_proxyNoHostnames to bypass the upstream proxy

Implementation Reference

  • The handler function for the `proxy_set_upstream` tool. It calls `proxyManager.setGlobalUpstream` to apply the proxy configuration.
    async ({ proxy_url, no_proxy }) => {
      try {
        await proxyManager.setGlobalUpstream({ proxyUrl: proxy_url, noProxy: no_proxy });
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              status: "success",
              message: `Global upstream set to ${proxy_url}`,
              noProxy: no_proxy || [],
            }),
          }],
        };
      } catch (e) {
        return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: String(e) }) }] };
      }
    },
  • The tool registration definition for `proxy_set_upstream`, including its description and input schema using Zod.
    "proxy_set_upstream",
    "Set a global upstream proxy for all outgoing traffic. Supports socks4://, socks5://, http://, https://, and pac+http:// URLs.",
    {
      proxy_url: z.string().describe("Upstream proxy URL (e.g., socks5://user:pass@host:port)"),
      no_proxy: z.array(z.string()).optional().describe("Hostnames to bypass the upstream proxy"),
    },
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yfe404/proxy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server