Skip to content

feat: add api_base_url option for custom API endpoints#26

Merged
naji247 merged 1 commit intomainfrom
feat/custom-api-base-url
Mar 12, 2026
Merged

feat: add api_base_url option for custom API endpoints#26
naji247 merged 1 commit intomainfrom
feat/custom-api-base-url

Conversation

@naji247
Copy link
Member

@naji247 naji247 commented Mar 11, 2026

Summary

  • Adds api_base_url to MCPCatOptions so customers can point event publishing at a custom API endpoint
  • Resolution priority: api_base_url option > MCPCAT_API_URL env var > default (https://api.mcpcat.io)
  • Previously available to beta customers, now being published to the public SDK

Changes

  • MCPCatOptions gets a new api_base_url: str | None field (defaults to None)
  • EventQueue gets a configure() method that reconfigures the API client with a new base URL
  • track() resolves the URL at initialization time and calls configure() only when a non-default URL is provided

Test plan

  • uv run pytest tests/test_api_base_url.py -v — 8 new tests covering all resolution paths
  • uv run pytest — full suite passes (336 tests)
  • Verify default behavior is unchanged when neither option nor env var is set

Expose api_base_url on MCPCatOptions to allow publishing events to a
custom API endpoint. Resolution priority: code option > MCPCAT_API_URL
environment variable > default (https://api.mcpcat.io).

This was previously available to beta customers and is now being
published to the public SDK.
@naji247 naji247 merged commit 7f4ef0b into main Mar 12, 2026
38 checks passed
@naji247 naji247 deleted the feat/custom-api-base-url branch March 12, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants