get_auth_headers_info
Retrieve authentication header details for QuantConnect API access while protecting sensitive credentials. This tool provides header information needed for secure API requests.
Instructions
Get information about authentication headers (without exposing sensitive data).
Returns: Dictionary containing header information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler function implementing the get_auth_headers_info MCP tool. It retrieves authentication header metadata (field names, presence indicators) without exposing sensitive token values, using the shared auth instance.@mcp.tool() async def get_auth_headers_info() -> Dict[str, Any]: """ Get information about authentication headers (without exposing sensitive data). Returns: Dictionary containing header information """ try: auth = get_auth_instance() if auth is None: return {"status": "error", "error": "Authentication not configured"} # Get headers (but don't expose the actual values) headers = auth.get_headers() return { "status": "success", "header_fields": list(headers.keys()), "has_authorization": "Authorization" in headers, "has_timestamp": "Timestamp" in headers, "timestamp_format": "Unix timestamp", "auth_method": "Basic Authentication with SHA-256 hashed token", } except Exception as e: return { "status": "error", "error": str(e), "message": "Failed to get authentication header information", }
- quantconnect_mcp/main.py:47-47 (registration)Invocation of register_auth_tools which defines and registers the get_auth_headers_info tool (along with other auth tools) to the MCP server instance.register_auth_tools(mcp)