Skip to main content
Glama
rhettlong

USCardForum MCP Server

by rhettlong

login

Authenticate to USCardForum for accessing user-specific features like notifications, bookmarks, and subscriptions using your forum credentials and optional 2FA code.

Instructions

Authenticate with USCardForum credentials. Args: username: Your forum username password: Your forum password second_factor_token: 2FA code if you have 2FA enabled (optional) IMPORTANT: Only use this if you need authenticated features like: - Reading notifications - Bookmarking posts - Subscribing to topics Most read operations work without authentication. Returns a LoginResult with: - success: Whether login succeeded - username: Logged-in username - error: Error message if failed - requires_2fa: Whether 2FA is required The session remains authenticated for subsequent calls. Security note: Credentials are used only for this session and are not persisted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesYour forum username
passwordYesYour forum password
second_factor_tokenNo2FA code if you have 2FA enabled

Implementation Reference

  • The MCP tool handler function for 'login', which takes username, password, and optional 2FA token, calls the underlying client.login(), and returns a LoginResult.
    @mcp.tool() def login( username: Annotated[ str, Field(description="Your forum username"), ], password: Annotated[ str, Field(description="Your forum password"), ], second_factor_token: Annotated[ str | None, Field(default=None, description="2FA code if you have 2FA enabled"), ] = None, ) -> LoginResult: """ Authenticate with USCardForum credentials. Args: username: Your forum username password: Your forum password second_factor_token: 2FA code if you have 2FA enabled (optional) IMPORTANT: Only use this if you need authenticated features like: - Reading notifications - Bookmarking posts - Subscribing to topics Most read operations work without authentication. Returns a LoginResult with: - success: Whether login succeeded - username: Logged-in username - error: Error message if failed - requires_2fa: Whether 2FA is required The session remains authenticated for subsequent calls. Security note: Credentials are used only for this session and are not persisted. """ return get_client().login( username, password, second_factor_token=second_factor_token )
  • Pydantic model defining the output schema of the login tool response, with fields for success status, username, error message, and 2FA requirement.
    class LoginResult(BaseModel): """Result of a login attempt.""" success: bool = Field(..., description="Whether login succeeded") username: str | None = Field(None, description="Logged-in username") error: str | None = Field(None, description="Error message if failed") requires_2fa: bool = Field(False, description="Whether 2FA is required") class Config: extra = "ignore" @classmethod def from_api_response( cls, data: dict[str, Any], username: str ) -> "LoginResult": """Parse from raw API response.""" if "error" in data: return cls(success=False, error=data["error"]) if data.get("second_factor_required"): return cls(success=False, requires_2fa=True, username=username) return cls(success=True, username=username)
  • Registration of the login tool by importing it from server_tools.auth into the server_tools package __init__, making it available for further import into the MCP server entrypoint.
    from .auth import ( login, get_current_session, get_notifications, bookmark_post, subscribe_topic, )
  • Explicit import of the login tool (line 38) along with all other tools into the MCP server entrypoint, which triggers @mcp.tool() registration with the FastMCP server.
    from uscardforum.server_tools import ( analyze_user, bookmark_post, compare_cards, find_data_points, get_all_topic_posts, get_categories, get_current_session, get_hot_topics, get_new_topics, get_notifications, get_top_topics, get_topic_info, get_topic_posts, get_user_actions, get_user_badges, get_user_followers, get_user_following, get_user_reactions, get_user_replies, get_user_summary, get_user_topics, list_users_with_badge, login, research_topic, resource_categories, resource_hot_topics, resource_new_topics, search_forum, subscribe_topic, )
  • Supporting client.login() method delegated to by the MCP tool handler, providing the core authentication logic via AuthAPI.
    def login( self, username: str, password: str, second_factor_token: str | None = None, remember_me: bool = True, ) -> LoginResult: """Login to the forum. Args: username: Forum username password: Forum password second_factor_token: Optional 2FA token remember_me: Remember session (default: True) Returns: Login result with success status """ return self._auth.login( username, password, second_factor_token=second_factor_token, remember_me=remember_me )

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/rhettlong/uscardforum-mcp'

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