Skip to main content
Glama

freshbooks_authenticate

Initiate OAuth2 authentication for FreshBooks to securely access accounting features. Generates a browser URL for authorization and automatically saves tokens.

Instructions

Start FreshBooks OAuth2 authentication. Returns a URL to open in your browser. After authorizing, tokens are saved automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implementation of the freshbooks_authenticate tool which starts the OAuth2 flow by getting an auth URL and launching a local callback server.
    @mcp.tool()
    def freshbooks_authenticate() -> str:
        """Start FreshBooks OAuth2 authentication. Returns a URL to open in your browser. After authorizing, tokens are saved automatically."""
        config = auth.get_config()
        url = auth.get_auth_url(config)
        port = int(config["redirect_uri"].split(":")[-1].split("/")[0])
    
        def _run_server():
            auth.start_callback_server(config, port)
    
        thread = threading.Thread(target=_run_server, daemon=True)
        thread.start()
    
        return (
            f"Open this URL in your browser to authorize:\n\n{url}\n\n"
            f"Waiting for callback on localhost:{port}..."
        )

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/AlexlaGuardia/MCP-Freshbooks'

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