OneTick WebAPI authentication#

The onetick data tools make outbound requests to the OneTick WebAPI to resolve symbols. ONETICK_DB_OUTBOUND_STRATEGY controls how those requests are authenticated. The selected strategy is validated at startup; the MCP server refuses to start if required credentials are missing.

Note

If you do not have WebAPI credentials, omit the onetick data tools and skip this section. See Enabling and disabling tools.

service_account (default)

OAuth2 client-credentials flow, valid for both OneTick Cloud and an on-prem server that authenticates against your own identity provider. Required variables: OTP_CLIENT_ID, OTP_CLIENT_SECRET, OTP_ACCESS_TOKEN_URL.

  • OneTick Cloud — the onetick-mcp entrypoint supplies defaults for OTP_ACCESS_TOKEN_URL (plus OTP_HTTP_ADDRESS and OTP_WEBAPI=1), so you normally only set OTP_CLIENT_ID and OTP_CLIENT_SECRET.

  • On-prem — the cloud defaults do not apply to your server. Set OTP_ACCESS_TOKEN_URL to your IdP’s token endpoint and OTP_HTTP_ADDRESS to your server’s REST gateway (with OTP_WEBAPI=1), in addition to OTP_CLIENT_ID / OTP_CLIENT_SECRET.

basic

HTTP Basic authentication. Required variables: OTP_HTTP_USERNAME, OTP_HTTP_PASSWORD.

none

No authentication. Only suitable for internal or air-gapped OneTick servers where network-level access controls are in place.

Pointing the OneTick data tools at an on-prem server#

For an on-prem OneTick server, always set OTP_HTTP_ADDRESS to your server’s REST gateway (keep OTP_WEBAPI=1 — pure-Python REST, no C++ libraries), then set ONETICK_DB_OUTBOUND_STRATEGY and its credentials to match your server:

OTP_WEBAPI=1
OTP_HTTP_ADDRESS=https://<your-onetick-host>:<port>

# service_account — OAuth2 client-credentials against your own IdP
ONETICK_DB_OUTBOUND_STRATEGY=service_account
OTP_ACCESS_TOKEN_URL=https://<your-idp-host>/.../token
OTP_CLIENT_ID=...
OTP_CLIENT_SECRET=...

# basic — HTTP Basic auth
ONETICK_DB_OUTBOUND_STRATEGY=basic
OTP_HTTP_USERNAME=...
OTP_HTTP_PASSWORD=...

# none — no auth (rely on network-level controls)
ONETICK_DB_OUTBOUND_STRATEGY=none

Set only the block for the strategy your server uses. Consult your OneTick administrator for the gateway URL and which auth method it requires.

Note

This is a separate, outbound-only credential — it is how the MCP server authenticates to OneTick, not how MCP clients authenticate to the MCP server. See MCP server authentication for inbound authentication.

See OneTick auth variables (OneTick data tools) for the full variable reference.