KosmoKrator

data

Brex MCP, CLI, and Lua Integration for AI Agents

Brex integration docs for AI agents: MCP gateway setup, Brex CLI commands, Lua API reference, credentials, and function schemas.

Brex for agents

Credentials can be configured manually in web or CLI hosts.

Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.

Agent Surfaces

Machine-Readable Metadata

Function Catalog

FunctionTypeParametersDescription
brex.brex_accounting_create_integration Write write 0 Create a new accounting integration. The behavior depends on the existing active integration: - If no active integration exists: Creates and returns new integration - If active ...
brex.brex_accounting_disconnect_integration Write write 0 Disconnect an active accounting integration. - If integration is ACTIVE: Disconnects and returns success - If integration ID doesn't exist: Returns 404 error - If integration is...
brex.brex_accounting_reactivate_integration Write write 0 Reactivate a disconnected accounting integration. - If integration is DISABLED: Reactivates and returns success - If integration ID doesn't exist: Returns 404 error - If an acti...
brex.brex_accounting_get_accounting_record Read read 0 Retrieve a single accounting record by its unique identifier
brex.brex_accounting_query_accounting_records Read read 0 Query accounting records by IDs or with filters for polling. When building integrations with Brex accounting workflow, use filter-based polling as a fallback mechanism. Suggeste...
brex.brex_accounting_report_accounting_export_results Write write 0 Report export success or failure for accounting records.
brex.brex_budgets_list_budget_programs Read read 0 Lists Budget Programs belonging to this account
brex.brex_budgets_get_budget_program_by_id Read read 0 Retrieves a Budget Program by ID
brex.brex_budgets_list_budgets Read read 0 Lists Spend Limits belonging to this account
brex.brex_budgets_create_budget Write write 0 Creates a Spend Limit
brex.brex_budgets_get_budget_by_id Read read 0 Retrieves a Spend Limit by ID
brex.brex_budgets_update_budget Write write 0 Updates a Spend Limit
brex.brex_budgets_archive_budget Write write 0 Archives a Spend Limit, making it unusable for future expenses and removing it from the UI
brex.brex_budgets_list_spend_budgets Read read 0 Retrieves a list of Budgets
brex.brex_budgets_create_spend_budget Write write 0 Creates a Budget
brex.brex_budgets_get_spend_budget_by_id Read read 0 Retrieves a Budget by ID
brex.brex_budgets_update_spend_budget Write write 0 Updates a Budget
brex.brex_budgets_archive_spend_budget Write write 0 Archives a Budget, making any Spend Limits beneath it unusable for future expenses and removing it from the UI
brex.brex_budgets_list_spend_limits Read read 0 Retrieves a list of Spend Limits
brex.brex_budgets_create_spend_limit Write write 0 Creates a Spend Limit
brex.brex_budgets_get_spend_limit_by_id Read read 0 Retrieves a Spend Limit by ID
brex.brex_budgets_update_spend_limit Write write 0 Updates a Spend Limit
brex.brex_budgets_archive_spend_limit Write write 0 Archives a Spend Limit, making it unusable for future expenses and removing it from the UI
brex.brex_expenses_list_expenses Read read 0 List expenses under the same account. Admin and bookkeeper have access to any expense, and regular users can only access their own.
brex.brex_expenses_list_expenses_1 Read read 0 This endpoint is deprecated. Use the "List expenses" (`GET /v1/expenses`) endpoint instead.
brex.brex_expenses_receipt_match Write write 0 The `uri` will be a pre-signed S3 URL allowing you to upload the receipt securely. This URL can only be used for a `PUT` operation and expires 30 minutes after its creation. Onc...
brex.brex_expenses_get_card_expense Read read 0 This endpoint is deprecated. Use the "Get an expense" (`GET /v1/expenses/{id}`) endpoint instead.
brex.brex_expenses_update_expense Write write 0 Update an expense. Admin and bookkeeper have access to any expense, and regular users can only access their own.
brex.brex_expenses_receipt_upload Write write 0 The `uri` will be a pre-signed S3 URL allowing you to upload the receipt securely. This URL can only be used for a `PUT` operation and expires 30 minutes after its creation. Onc...
brex.brex_expenses_get_expense Read read 0 Get an expense by its ID.
brex.brex_fields_list_fields Read read 0 List custom fields under the same account
brex.brex_fields_create_field Write write 0 Create a custom field
brex.brex_fields_list_field_values Read read 0 List values under the same custom field
brex.brex_fields_update_field_values Write write 0 Update custom field values (up to 1000 values at once) for a specific field
brex.brex_fields_create_field_values Write write 0 Create custom field values (up to 1000 values at once) for a specific field
brex.brex_fields_delete_field_values Write write 0 Delete custom field values (up to 1000 values at once) for a specific field
brex.brex_fields_get_field_value_by_id Read read 0 Get a field value by field ID and field value ID
brex.brex_fields_get_field_by_id Read read 0 Get a custom field by Brex ID
brex.brex_fields_update_field Write write 0 Update a field by ID
brex.brex_fields_delete_field Write write 0 Delete a custom field by Brex ID
brex.brex_onboarding_list_referrals Read read 0 Returns referrals created. *Note*: This doesn't include referrals that have expired.
brex.brex_onboarding_create_referral_request Write write 0 This creates new referrals. The response will contain an identifier and a unique personalized link to an application flow. Many fields are optional and when they're provided the...
brex.brex_onboarding_get_referral Read read 0 Returns a referral object by ID if it exists.
brex.brex_onboarding_create_document Write write 0 The `uri` will be a presigned S3 URL allowing you to upload the referral doc securely. This URL can only be used for a `PUT` operation and expires 30 minutes after its creation....
brex.brex_onboarding_process_delayed_eindocument Write write 0 Processes a delayed EIN document after it has been uploaded. This endpoint should be called after successfully uploading an IRS EIN Confirmation document (CP-575, CP-575 fax she...
brex.brex_payments_create_incoming_transfer Write write 0 This endpoint creates a new incoming transfer. You may use use any eligible bank account connection to fund (ACH Debit) any active Brex business account. **Reminder**: You may n...
brex.brex_payments_list_linked_accounts Read read 0 This endpoint lists all bank connections that are eligible to make ACH transfers to Brex business account
brex.brex_payments_list_transfers Read read 0 This endpoint lists existing transfers for an account. Currently, the API can only return transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATION...
brex.brex_payments_create_transfer Write write 0 This endpoint creates a new transfer. Currently, the API can only create transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATIONAL_WIRES **Transa...
brex.brex_payments_get_transfers_by_id Read read 0 This endpoint gets a transfer by ID. Currently, the API can only return transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATIONAL_WIRE
brex.brex_payments_list_vendors Read read 0 This endpoint lists all existing vendors for an account. Takes an optional parameter to match by vendor name.
brex.brex_payments_create_vendor Write write 0 This endpoint creates a new vendor.
brex.brex_payments_get_vendor_by_id Read read 0 This endpoint gets a vendor by ID.
brex.brex_payments_update_vendor Write write 0 Updates an existing vendor by ID.
brex.brex_payments_delete_vendor Write write 0 This endpoint deletes a vendor by ID.
brex.brex_team_list_cards_by_user_id Read read 0 Lists all cards by a `user_id`. Only cards with `limit_type = CARD` have `spend_controls`
brex.brex_team_create_card Write write 0 Creates a new card. The `spend_controls` field is required when `limit_type` = `CARD`. The `mailing_address` field is required for physical cards and is the shipping address use...
brex.brex_team_get_card_by_id Read read 0 Retrieves a card by ID. Only cards with `limit_type = CARD` have `spend_controls`
brex.brex_team_update_card Write write 0 Update an existing vendor card
brex.brex_team_lock_card Write write 0 Locks an existing, unlocked card. And the card owner will receive a notification about it.
brex.brex_team_get_card_number Read read 0 Retrieves card number, CVV, and expiration date of a card by ID.
brex.brex_team_email_card_number Write write 0 Creates a secure email to send card number, CVV, and expiration date of a card by ID to the specified email. This endpoint is currently gated. If you would like to request acces...
brex.brex_team_terminate_card Write write 0 Terminates an existing card. The card owner will receive a notification about it.
brex.brex_team_unlock_card Write write 0 Unlocks an existing card.
brex.brex_team_get_company Read read 0 This endpoint returns the company associated with the OAuth2 access token.
brex.brex_team_list_departments Read read 0 This endpoint lists all departments.
brex.brex_team_create_department Write write 0 This endpoint creates a new department
brex.brex_team_get_department_by_id Read read 0 This endpoint gets a department by ID.
brex.brex_team_list_legal_entities Read read 0 List legal entities for the account.
brex.brex_team_get_legal_entity Read read 0 Get a legal entity by its ID.
brex.brex_team_list_locations Read read 0 This endpoint lists all locations.
brex.brex_team_create_location Write write 0 This endpoint creates a new location.
brex.brex_team_get_location_by_id Read read 0 This endpoint gets a location by ID.
brex.brex_team_list_titles Read read 0 This endpoint lists all titles.
brex.brex_team_create_title Write write 0 This endpoint creates a new title
brex.brex_team_get_title_by_id Read read 0 This endpoint gets a title by ID.
brex.brex_team_list_users Read read 0 This endpoint lists all users. To find a user id by email, you can filter using the `email` query parameter.
brex.brex_team_create_user Write write 0 This endpoint invites a new user as an employee. To update user's role, check out [this article](https://support.brex.com/how-do-i-change-another-user-s-role/).
brex.brex_team_get_me Read read 0 This endpoint returns the user associated with the OAuth2 access token.
brex.brex_team_get_user_by_id Read read 0 This endpoint gets a user by ID.
brex.brex_team_update_user Write write 0 This endpoint updates a user. Any parameters not provided will be left unchanged.
brex.brex_team_get_user_limit Read read 0 This endpoint gets the monthly limit for the user including the monthly available limit.
brex.brex_team_set_user_limit Write write 0 This endpoint sets the monthly limit for a user. The limit amount must be non-negative. To unset the monthly limit of the user, just set `monthly_limit` to null.
brex.brex_transactions_list_card_accounts Read read 0 This endpoint lists all accounts of card type.
brex.brex_transactions_list_primary_card_statements Read read 0 This endpoint lists all finalized statements for the primary card account.
brex.brex_transactions_list_accounts Read read 0 This endpoint lists all the existing cash accounts with their status.
brex.brex_transactions_get_primary_account Read read 0 This endpoint returns the primary cash account with its status. There will always be only one primary account.
brex.brex_transactions_get_account Read read 0 This endpoint returns the cash account associated with the provided ID with its status.
brex.brex_transactions_list_cash_statements Read read 0 This endpoint lists all finalized statements for the cash account by ID.
brex.brex_transactions_list_primary_card_transactions Read read 0 This endpoint lists all settled transactions for all card accounts. Regular users may only fetch their own "PURCHASE","REFUND" and "CHARGEBACK" settled transactions.
brex.brex_transactions_list_cash_transactions Read read 0 This endpoint lists all transactions for the cash account with the selected ID.
brex.brex_travel_list_trips Read read 0 Lists trips according to the filters passed in the query string.
brex.brex_travel_get_trip Read read 0 Retrieves a trip by ID.
brex.brex_travel_list_trip_bookings Read read 0 Lists the bookings within a trip.
brex.brex_travel_get_booking Read read 0 Retrieves a booking by trip and booking ID.
brex.brex_webhooks_list_webhook_subscriptions Read read 0 List the webhooks you have registered
brex.brex_webhooks_create_webhook_subscription Write write 0 Register an endpoint to start receiving selected webhook events
brex.brex_webhooks_list_webhook_groups Read read 0 Lists webhook groups.
brex.brex_webhooks_create_webhook_group Write write 0 Creates a webhook group.
brex.brex_webhooks_get_webhook_group Read read 0 Gets a webhook group.
brex.brex_webhooks_delete_webhook_group Write write 0 Deletes a webhook group and all its members.
brex.brex_webhooks_add_webhook_group_members Write write 0 Adds members to webhook groups.
brex.brex_webhooks_list_webhook_group_members Read read 0 Lists the members currently in the specified webhook group.
brex.brex_webhooks_remove_webhook_group_members Write write 0 Removes members from webhook groups.
brex.brex_webhooks_list_webhook_secrets Read read 0 This endpoint returns a set of webhook signing secrets used to validate the webhook. Usually only one key will be returned in the response. After key rotation, this endpoint wil...
brex.brex_webhooks_get_webhook_subscription Read read 0 Get details of a webhook
brex.brex_webhooks_update_webhook_subscription Write write 0 Update a webhook. You can update the endpoint url, event types that the endpoint receives, or temporarily deactivate the webhook.
brex.brex_webhooks_delete_webhook_subscription Write write 0 Unregister a webhook if you want to stop receiving webhook events