Clara-Backend
    Clara-Backend
    • Get Started
    • Quickstart (Rest API)
    • Quickstart (MCP Server)
    • Auth
      • Register
        POST
      • Google OAuth
        POST
      • Login
        POST
      • Logout
        DELETE
      • Change Password
        PATCH
      • Send OTP
        POST
      • Activate
        POST
      • Enable 2FA
        POST
      • Disable 2FA
        DELETE
    • User
      • View
        GET
      • Update
        PATCH
    • API Key
      • View
        GET
      • Reset
        POST
    • Transaction
      • View All
        GET
      • View
        GET
    • Task
      • View All
        GET
      • View
        GET
    • Agent
      • Supported Attachments
        GET
      • Analysis
        POST
    • Stripe
      • Rate
        GET
      • Portal
        POST
      • Buy
        POST
    • Misc
      • Health
      • Version

    Quickstart (MCP Server)

    3.1 Installation#

    1.
    Clone the repository:
    2.
    Install dependencies:
    3.
    Set up environment variables:
    Copy .env.example to .env
    Fill in your credentials:
    USER_ID=your_user_id
    API_KEY_TOKEN=your_api_key_token
    PORT=8000
    Note: You can either set USER_ID and API_KEY_TOKEN in the .env file, or pass them from your AI agent via headers:
    Authorization: Bearer <api_key_token>
    User-Id: <user_id>
    4.
    Run the MCP server:
    The server will start on the port specified in your .env file (default: 8000).

    3.2 Authorization#

    You can authenticate using:
    • a Basic Auth
    • a User Token (generated via Basic Auth),
    • an API Key Token, or
    • a Public API Key.
    To use the MCP, you'll need a User Id and an API Key Token, if you haven't added them to .env file you must include them in the headers.
    Just paste your API key into the header as:
    | Header | Value |
    | --- | --- | --- | --- |
    | Authorization | Bearer API_KEY_TOKEN |
    | User-Id | USER_ID |
    Once that’s set, you’re ready to make authenticated requests to any Clara tool.

    3.3 Available Tools#

    The MCP server exposes the following Clara API endpoints as tools:
    user.view
    transaction.view_all
    transaction.view
    task.view_all
    task.view
    agent.supported_attachments
    agent.analysis
    stripe.rate
    stripe.portal
    stripe.buy
    misc.health
    misc.version

    3.4 Rate Limits#

    API rate limits apply per API key. Clara allows up to 10 requests per second.
    If you go over this limit, or exceed your plan’s usage limits, the API will return an HTTP 429 - Too Many Requests response.
    Keeping your usage within the limit ensures smooth and reliable performance for everyone.
    Modified at 2025-11-29 03:49:52
    Previous
    Quickstart (Rest API)
    Next
    Auth
    Built with