etrade_authenticate
Complete E*TRADE OAuth authentication using the verification code received after authorizing the application to access market data and trading functionality.
Instructions
Complete E*TRADE OAuth authentication with verification code.
Args: verifier: The verification code received after authorizing the application
Returns: Success message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verifier | Yes |
Implementation Reference
- etrade_mcp/server.py:85-107 (handler)The handler function for the 'etrade_authenticate' tool. It is registered via the @mcp.tool() decorator. The function signature and docstring define the input schema (verifier: str). It completes the OAuth flow using the previously obtained request token and verifier, creates a MarketClient session, and returns a success message.@mcp.tool() def etrade_authenticate(verifier: str) -> str: """ Complete E*TRADE OAuth authentication with verification code. Args: verifier: The verification code received after authorizing the application Returns: Success message """ global _market_client, _request_token, _request_token_secret if not _request_token or not _request_token_secret: raise ValueError( "No request token found. Please call etrade_get_auth_url first." ) auth = get_auth() session = auth.get_session(_request_token, _request_token_secret, verifier) _market_client = MarketClient(session, auth.base_url) return f"Successfully authenticated! Using {auth.environment} environment at {auth.base_url}"