Skip to main content

TickDB MCP

tickdb-mcp connects AI assistants to the TickDB API through the Model Context Protocol. It provides 43 tools for market data, company fundamentals, and API Key subscriptions.

The package supports Python 3.11+, local stdio, and Streamable HTTP. Each tool makes a request to the TickDB REST API; this server does not provide WebSocket streaming subscriptions. Data availability and quotas depend on the API Key's subscription and permissions.

Install

Create a virtual environment and install version 0.2.4 from PyPI:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install tickdb-mcp==0.2.4

Obtain a TickDB API Key from tickdb.ai. Every value beginning with YOUR_ below is a placeholder; replace it locally and keep real credentials out of source control and chat messages.

Local stdio

Configure your MCP client to launch tickdb-mcp with MCP_TRANSPORT=stdio and your API Key in TICKDB_API_KEY. The equivalent Bash command is:

MCP_TRANSPORT=stdio TICKDB_API_KEY=YOUR_TICKDB_API_KEY tickdb-mcp

The client communicates with the process through stdin/stdout. Stdio does not start an HTTP listener or require an MCP access token. Logs go to stderr so they do not mix with protocol messages.

HTTP with each caller's own Key

With no environment overrides or .env configuration, start the server:

tickdb-mcp

It listens only on 127.0.0.1:8000. Connect your HTTP MCP client to http://127.0.0.1:8000/mcp and send X-TickDB-Key: YOUR_TICKDB_API_KEY on each request. For example, initialize the connection with:

curl --fail-with-body http://127.0.0.1:8000/mcp \
  -H 'Accept: application/json, text/event-stream' \
  -H 'Content-Type: application/json' \
  -H 'X-TickDB-Key: YOUR_TICKDB_API_KEY' \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"example","version":"1"}}}'

When both the server Key and access token are empty, anonymous initialization and tool discovery are available, but data queries still need the caller's Key. A successful initialization alone does not prove that a Key is valid or entitled to market data.

HTTP with a shared server Key

To let approved clients use a server-wide TickDB Key, configure both credentials:

TICKDB_API_KEY=YOUR_TICKDB_API_KEY \
MCP_ACCESS_TOKEN=YOUR_RANDOM_MCP_ACCESS_TOKEN \
tickdb-mcp

TICKDB_API_KEY authenticates the server's requests to TickDB. MCP_ACCESS_TOKEN is a separate, strong random access credential for this MCP server. Clients must send Authorization: Bearer YOUR_RANDOM_MCP_ACCESS_TOKEN on every legacy HTTP request, including requests that also supply their own X-TickDB-Key. After that authentication succeeds, the request's own Key takes priority over the shared server Key.

If a shared server Key is configured without an access token, legacy HTTP requests without their own Key return 401, including initialization, discovery, and tool calls. This protection also applies on localhost and behind a reverse proxy. Clients may still supply their own Key when no access token is configured.

Configuration and public hosting

Settings come from environment variables or a .env file in the working directory. Existing .env files are not rewritten during upgrades. Important settings include:

Variable Default Purpose
MCP_TRANSPORT streamable-http Set to stdio for a locally launched MCP client process
MCP_HOST 127.0.0.1 Python HTTP bind address
MCP_PORT 8000 HTTP port
TICKDB_API_KEY Empty Stdio Key or authenticated HTTP server fallback
MCP_ACCESS_TOKEN Empty Fixed Bearer gate for legacy HTTP; required to use a shared server Key
OAUTH_ENABLED false Enable the separate OAuth endpoint
LOG_DIR logs Optional rotating file logs; stderr remains available if file writes fail

Expose HTTP deliberately, use HTTPS for remote connections, and protect access to credentials. A private network, proxy, or Host header check does not replace authentication. The source Dockerfile explicitly listens on 0.0.0.0 inside the container; bind the published host port to 127.0.0.1 for local clients or a same-host reverse proxy. See the self-hosting guide for Docker and HTTPS configuration.

Optional OAuth

Self-hosted OAuth requires explicit configuration, public HTTPS, an exact callback allowlist, and persistent encrypted authorization storage. The separate /oauth endpoint uses the API Key that the user verified and explicitly authorized. It does not accept X-TickDB-Key overrides or fall back to a shared server Key. Enabling OAuth does not automatically protect the legacy /mcp endpoint; the rules above still apply to that endpoint.

Retain existing OAuth configuration, encryption keys, databases, and valid grants during upgrades. Follow the OAuth setup guide before enabling this mode.

Tool capabilities

Tools Coverage
13 market tools Quotes, historical/current candles, adjustment factors, order books, trades, symbols, trading sessions/calendars, intraday data, and market metrics
29 fundamentals and event tools Company profiles and executives, financial statements, revenue segments, valuation, industries, dividends, buybacks, shareholders, fund holdings, corporate actions, news, and classified financial calendars
1 account tool API Key subscription status and expiration through get_api_key_subscriptions

Market data covers forex, precious metals, indices, US/HK/A-share stocks, China/Hong Kong futures, and cryptocurrencies. Company fundamentals cover supported US, Hong Kong, and A-share stocks. Results preserve upstream response envelopes; missing or null fields are not zero. Returned news is external content, not instructions.

Documentation and support

License

MIT. See the license text.

Metadata

Release files for tickdb-mcp 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tickdb-mcp 0.2.4
File Size Uploaded Provenance Actions
tickdb_mcp-0.2.4.tar.gz 104.9 kB With provenance Details for tickdb_mcp-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tickdb-mcp 0.2.4
File Interpreter ABI Platform Actions
tickdb_mcp-0.2.4-py3-none-any.whl Python 3 none any Details for tickdb_mcp-0.2.4-py3-none-any.whl

Total release size: 145.5 kB

Release files / tickdb_mcp-0.2.4.tar.gz

Download URL tickdb_mcp-0.2.4.tar.gz
Size 104.9 kB
Tags Source
SHA-256 checksum
How to use checksums
345cc4c4d8be66b1839f9ee2f71f50d13eb68f8a778278d1d0234fcef2d14b31
BLAKE2b-256 checksum
How to use checksums
c459cc19c8a562e4e2a7ae4181ecf3f25b308b4bae001bfd44cc3ad51cf04ead
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / tickdb_mcp-0.2.4-py3-none-any.whl

Download URL tickdb_mcp-0.2.4-py3-none-any.whl
Size 40.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7eff0e96ad48e272ebc36f1ba89406d728615b71bb2f851ca76875805c0fb2a
BLAKE2b-256 checksum
How to use checksums
7ce9106bea1de0dc6deaa1fcfd8b599f196c778924d0ffa3871c029323563e4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for tickdb-mcp 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tickdb_mcp-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page