Skip to main content
Glama

get-proxy-config

Retrieve the current proxy configuration to manage network settings for the CCXT MCP Server, ensuring efficient cryptocurrency exchange integration.

Instructions

Get the current proxy configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'get-proxy-config' MCP tool on the server, including inline handler implementation that reads proxy configuration from environment variables and returns it as formatted text content, intentionally omitting the password for security.
    server.tool("get-proxy-config", "Get the current proxy configuration", {}, async () => { const useProxy = process.env.USE_PROXY === 'true'; const proxyUrl = process.env.PROXY_URL || ''; const proxyUsername = process.env.PROXY_USERNAME || ''; // Don't return the password for security reasons return { content: [{ type: "text", text: JSON.stringify({ enabled: useProxy, url: proxyUrl, username: proxyUsername, isConfigured: useProxy && !!proxyUrl }, null, 2) }] }; } );
  • The inline asynchronous handler function for the 'get-proxy-config' tool. It extracts proxy settings from process.env (USE_PROXY, PROXY_URL, PROXY_USERNAME), omits PROXY_PASSWORD for security, and returns an MCP-formatted response with the configuration as JSON text.
    async () => { const useProxy = process.env.USE_PROXY === 'true'; const proxyUrl = process.env.PROXY_URL || ''; const proxyUsername = process.env.PROXY_USERNAME || ''; // Don't return the password for security reasons return { content: [{ type: "text", text: JSON.stringify({ enabled: useProxy, url: proxyUrl, username: proxyUsername, isConfigured: useProxy && !!proxyUrl }, null, 2) }] }; }
  • Supporting helper function 'getProxyConfig' imported in config.ts and used in other proxy-related tools and exchange initialization. Provides full proxy configuration including password, unlike the tool handler which omits it.
    export function getProxyConfig(): { url: string; username?: string; password?: string } | null { const useProxy = process.env.USE_PROXY === 'true'; if (!useProxy) return null; const url = process.env.PROXY_URL; if (!url) { log(LogLevel.WARNING, 'USE_PROXY is true but PROXY_URL is not set'); return null; } const username = process.env.PROXY_USERNAME || undefined; const password = process.env.PROXY_PASSWORD || undefined; return { url, username, password }; }

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/doggybee/mcp-server-ccxt'

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