opteryx-mcp
Connect Claude Desktop, Claude Code and other MCP clients to Opteryx. Ask questions about your data in plain English; the assistant finds datasets, reads schemas, queries, and checks Opteryx SQL, all as you and against only the data you can see.
uvx opteryx-mcp login --user <user>
Why a local bridge
The Opteryx MCP endpoint (https://agent.opteryx.app/mcp/) takes a bearer
token, and access tokens last five minutes. A token pasted into a client's
config stops working almost immediately. opteryx-mcp holds a user and a
personal access token instead, exchanges them for a fresh access token a
minute before each one expires, and forwards everything the client sends.
It also re-mints if a token is rejected, and re-opens the MCP session if the
server forgets it.
It has no dependencies beyond the Python standard library.
Setup
1. Create a personal access token
In Opteryx Studio, open Settings and create a personal access token. It
looks like opt_..._01, lasts 90 days by default, and is shown once.
2. Store it
On macOS, login stores the token in the Keychain and checks it works.
security prompts for the token, so it never appears in shell history:
uvx opteryx-mcp login --user <user>
Connected to https://agent.opteryx.app/mcp/ as <user>.
7 tools: search_datasets, get_dataset_schema, query_dataset, profile_column, lookup_sql_syntax, search_docs, validate_sql
Run it again to replace an expired token. On other platforms, set
OPTERYX_TOKEN in the client's config instead.
3. Add it to your client
Claude Desktop. Print the config entry:
uvx opteryx-mcp config --user <user>
Then quit Claude Desktop (Cmd-Q) and merge the entry into
~/Library/Application Support/Claude/claude_desktop_config.json, keeping the
file's other keys. Desktop rewrites that file when it quits, so an entry added
while it is running is silently dropped. The entry looks like:
{
"mcpServers": {
"opteryx": {
"command": "/opt/homebrew/bin/uvx",
"args": ["opteryx-mcp", "--user", "<user>"]
}
}
}
uvx is named by absolute path because Desktop starts servers with a minimal
PATH. Reopen Desktop and the server appears in a chat's + / tools menu,
under Settings → Developer, and in Code-tab sessions.
Claude Code.
claude mcp add opteryx -- uvx opteryx-mcp --user <user>
Other clients. Any client that launches stdio servers takes the same
command: uvx opteryx-mcp --user <user>.
Tools
| Tool | What it does |
|---|---|
search_datasets |
Find datasets by name or column name |
get_dataset_schema |
Columns, types, statistics and sample rows |
query_dataset |
Run an OData v4 query; reads are capped at 200 rows |
profile_column |
The values a column actually holds, before you filter on one |
lookup_sql_syntax |
Confirm a function or statement exists in Opteryx SQL |
validate_sql |
Check SQL against the dialect and your schemas without running it |
search_docs |
Search the Opteryx documentation |
Every call runs as the user the token belongs to.
Configuration
| Variable | Default | Purpose |
|---|---|---|
OPTERYX_USER |
— | The user, if --user is not given |
OPTERYX_TOKEN |
Keychain entry opteryx-mcp / user |
The personal access token |
OPTERYX_MCP_URL |
https://agent.opteryx.app/mcp/ |
MCP endpoint |
OPTERYX_AUTH_URL |
https://authenticate.opteryx.app |
Where access tokens are minted |
Troubleshooting
uvx opteryx-mcp check --user <user>connects once and lists the tools, the same way a client would.- Claude Desktop writes the bridge's log to
~/Library/Logs/Claude/mcp-server-opteryx.log. It records each token minted and every request that fails. token request failed (401)means the user and token don't match, or the token has expired or been revoked. Create a new one and runloginagain.- If the server never appears in Desktop, check that the entry is still in the config file. If you edited it while Desktop was running, it was overwritten.
Development
pip install -e . pytest ruff
make test
make lint
Releases are published to PyPI from v* tags.
Metadata
Release files for opteryx-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| opteryx_mcp-0.1.0.tar.gz | 21.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opteryx_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.4 kB
Release files / opteryx_mcp-0.1.0.tar.gz
| Download URL | opteryx_mcp-0.1.0.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6795a015fb1500c4a6f418ffcf944c81cb53f4291ae498ee62b23dae640e00e6
|
|
BLAKE2b-256 checksum How to use checksums |
f090a000980212d8319365d9a8030f0aa730d0f9f14a2176785858cc05c0f147
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 5, 2026.
Transparency logRelease files / opteryx_mcp-0.1.0-py3-none-any.whl
| Download URL | opteryx_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9c93104fc58e1b469a3aff53586d77736dba7324b104660bf70a670536ea1b1
|
|
BLAKE2b-256 checksum How to use checksums |
f4abdf84235c42fa9a23ee68e4268f45c8633f251033497c889b75aaf9f2fa89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 5, 2026.
Transparency log