Skip to main content
Glama

Schwab Model Context Protocol Server

by jkoelker
test_cli_auth.py1.14 kB
from __future__ import annotations from typing import Any from click.testing import CliRunner from schwab_mcp import cli def test_auth_command_uses_max_token_age(monkeypatch, tmp_path): captured: dict[str, Any] = {} class DummyManager: def __init__(self, path: str) -> None: self.path = path captured["token_path"] = path def fake_easy_client(**kwargs): captured["easy_client_kwargs"] = kwargs return object() monkeypatch.setattr(cli.tokens, "Manager", DummyManager) monkeypatch.setattr(cli.schwab_auth, "easy_client", fake_easy_client) runner = CliRunner() token_file = tmp_path / "token.yaml" result = runner.invoke( cli.cli, [ "auth", "--token-path", str(token_file), "--client-id", "cid", "--client-secret", "secret", ], catch_exceptions=False, ) assert result.exit_code == 0 assert captured["token_path"] == str(token_file) assert captured["easy_client_kwargs"]["max_token_age"] == cli.TOKEN_MAX_AGE_SECONDS

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/jkoelker/schwab-mcp'

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