Skip to main content
Glama

Schwab Model Context Protocol Server

by jkoelker
__init__.py1.49 kB
from __future__ import annotations import logging from collections.abc import Callable from typing import Any from mcp.server.fastmcp import FastMCP from schwab.client import AsyncClient from schwab_mcp.tools import account as _account from schwab_mcp.tools import history as _history from schwab_mcp.tools import options as _options from schwab_mcp.tools import orders as _orders from schwab_mcp.tools import quotes as _quotes from schwab_mcp.tools import tools as _tools from schwab_mcp.tools import technical as _technical from schwab_mcp.tools import transactions as _txns logger = logging.getLogger(__name__) _TOOL_MODULES = ( _tools, _account, _history, _options, _orders, _quotes, _txns, ) def register_tools( server: FastMCP, client: AsyncClient, *, allow_write: bool, enable_technical: bool = True, result_transform: Callable[[Any], Any] | None = None, ) -> None: """Register all Schwab tools with the provided FastMCP server.""" _ = client modules = _TOOL_MODULES if enable_technical: modules = modules + (_technical,) for module in modules: register_module = getattr(module, "register", None) if register_module is None: raise AttributeError(f"Tool module {module.__name__} missing register()") register_module( server, allow_write=allow_write, result_transform=result_transform, ) __all__ = ["register_tools"]

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