Local MCP server exposing Stackless app APIs to terminal agents
Project description
Stackless MCP
stackless-mcp is a local stdio MCP server for Claude Code, Codex, and other
terminal agents. It exposes Stackless app capabilities as MCP tools by calling a
deployed Stackless instance over /api/v1.
The MCP process is intentionally thin. It does not import middleware-service,
does not need Snowflake or dbt credentials, and does not read local app data.
Stackless remains the source of truth for auth, RBAC, ownership, and mutations.
Use this guide when connecting a terminal agent to your own Stackless instance
from the published stackless-mcp package. Development from a monorepo checkout
is covered separately at the end.
Prerequisite
Install uv. The agent configuration uses uvx, which is included with uv
and fetches the pinned stackless-mcp package on first run.
Install
Pin the beta version exactly in your agent configuration:
stackless-mcp==1.0.0b2. The MCP server also needs the base URL for your
Stackless instance.
Codex
Add this block to ~/.codex/config.toml:
[mcp_servers.stackless]
command = "uvx"
args = [
"stackless-mcp==1.0.0b2",
"--base-url",
"https://your-stackless-instance.example.com",
]
Claude Code
Add this block to .mcp.json:
{
"mcpServers": {
"stackless": {
"command": "uvx",
"args": [
"stackless-mcp==1.0.0b2",
"--base-url",
"https://your-stackless-instance.example.com"
]
}
}
}
Login
Run login once before starting Codex or Claude Code:
uvx stackless-mcp==1.0.0b2 login \
--base-url https://your-stackless-instance.example.com
login opens the Stackless browser auth flow, receives a local callback from the
authenticated browser session, exchanges it for a scoped slmcp_ MCP session,
and stores that session locally. The server-side session defaults to a 30-day
TTL. Your Stackless instance can lower that lifetime with
MCP_SESSION_TTL_SECONDS.
Credentials are stored in the OS keyring by default. If keyring support is not available, use file storage:
uvx stackless-mcp==1.0.0b2 login \
--base-url https://your-stackless-instance.example.com \
--auth-storage file
With --auth-storage file, credentials are stored as a 0600
credentials.json file in the platform user config directory for
stackless-mcp. If you use file storage for login, add
"--auth-storage", "file" to the agent configuration too.
Verify
uvx stackless-mcp==1.0.0b2 --version
uvx stackless-mcp==1.0.0b2 doctor \
--base-url https://your-stackless-instance.example.com
Run doctor first when setup does not work. It checks local configuration,
stored auth, Stackless API connectivity, and server capability discovery.
Example successful output:
{
"auth": {
"credential_present": true,
"expires_at": "2026-07-10T12:00:00Z",
"expiry_status": "unexpired",
"mode": "stored_token",
"storage_backend": "keyring",
"token_present": true,
"user_id": "user_123"
},
"auth_storage": "keyring",
"base_url": "https://your-stackless-instance.example.com",
"capabilities": {
"checked": true,
"client_known_unsupported_by_server": [],
"error": null,
"ok": true,
"server_supported_unknown_to_client": [],
"server_version": "2026.06.10"
},
"client_version": "1.0.0b2",
"connectivity": {
"checked": true,
"ok": true
},
"errors": [],
"ok": true,
"toolsets": [
"all"
]
}
doctor exits 0 when required checks pass and exits 1 for local
configuration, auth, or connectivity failures. Missing command arguments and
invalid CLI options exit 2.
Troubleshooting
- Missing base URL: pass
--base-url https://...in the agent config and login command, or setSTACKLESS_BASE_URL. - Expired or missing token: run
uvx stackless-mcp==1.0.0b2 login --base-url https://your-stackless-instance.example.comagain. - Server capability delta:
doctorreports tools known by the client but not supported by the server underclient_known_unsupported_by_server. Upgrade the Stackless instance when you need those tools; otherwise the client simply advertises the supported subset. - Connectivity failure: confirm the base URL is reachable from your machine,
uses the correct scheme, and includes no
/api/v1suffix. - Keyring failure: rerun
loginand your agent command with--auth-storage file.
For a one-shot connectivity check without starting MCP stdio, run:
uvx stackless-mcp==1.0.0b2 \
--base-url https://your-stackless-instance.example.com \
--check
--check uses the stored MCP session when present and exits. Expired sessions
prompt a fresh stackless-mcp login instead of failing with an opaque MCP
startup error.
Upgrade
Upgrade by changing the pinned package version in your Codex or Claude Code
configuration, then restart the agent. Pre-release versions follow PEP 440:
betas such as 1.0.0b2 must be pinned exactly. For example, change
stackless-mcp==1.0.0b2 to stackless-mcp==1.0.0b3 when that beta is
published.
Revoke or Reset Auth
uvx stackless-mcp==1.0.0b2 logout \
--base-url https://your-stackless-instance.example.com
uvx stackless-mcp==1.0.0b2 reset-auth \
--base-url https://your-stackless-instance.example.com
logout calls /mcp/auth/revoke and then deletes the local credential.
reset-auth only deletes the local credential, which is useful for stale or
corrupt local state; the server-side session remains valid until it is revoked
or expires.
To rotate a file-backed credential, run logout with --auth-storage file,
then run login --auth-storage file again. Delete any copied backups of the old
file credential as part of rotation.
Advanced: Toolsets
This is not part of basic setup. By default, the full supported tool set loads and the agent decides which tool to call at runtime. Tool selection is automatic and is not a setup choice.
Use --toolsets only when you intentionally want to reduce the loaded
tool-schema surface and agent context:
[mcp_servers.stackless]
command = "uvx"
args = [
"stackless-mcp==1.0.0b2",
"--base-url",
"https://your-stackless-instance.example.com",
"--toolsets",
"catalog,runs",
]
Valid toolsets are all, core, catalog, runs, transformations,
semantic, dashboards, and lifecycle. all is the default. Core tools for
auth checks and operation status are always registered; selecting core
registers only those tools. Toolsets are a runtime ergonomics feature, not a
security boundary. Stackless backend RBAC and tool permissions still enforce
access.
Development
Use this path only when developing stackless-mcp from a monorepo checkout:
cd stackless-mcp
poetry install --with dev
poetry run stackless-mcp login \
--base-url https://your-stackless-instance.example.com
poetry run stackless-mcp \
--base-url https://your-stackless-instance.example.com
Manual token/cookie setup remains for development and compatibility only:
export STACKLESS_BASE_URL=https://your-stackless-instance.example.com
export STACKLESS_TOKEN='<valid Stackless/Cognito JWT or slmcp token>'
# or, for browser-cookie development auth:
# export STACKLESS_COOKIE='AWSALB=...; AWSELBAuthSessionCookie-0=...'
poetry run stackless-mcp
Tool Surface
Prefer these workflow-style tools for new agents:
| Tool | Description |
|---|---|
check_stackless_connection |
Check configured Stackless auth/API connectivity. |
find_relevant_data |
Find catalog assets relevant to a business question. |
explain_stackless_asset |
Explain one catalog asset, columns, and lineage handles. |
list_stackless_assets |
List visible catalog assets by type, domain, or tag. |
trace_stackless_lineage |
Trace upstream or downstream catalog lineage. |
get_stackless_column_details |
Get column metadata for a catalog asset. |
refresh_stackless_catalog |
Refresh the catalog snapshot in light or full mode. |
get_stackless_connector_status |
Get connector sync status from the catalog snapshot. |
get_stackless_asset_freshness |
Summarize upstream freshness for a catalog asset. |
list_stackless_snowflake_schemas |
List visible Snowflake schemas from the catalog. |
query_snowflake |
Run direct read-only Snowflake SQL with Stackless guardrails. |
list_stackless_runs |
List recent scheduler runs with stable run refs. |
diagnose_stackless_run |
Diagnose one run or job with redacted logs. |
cancel_stackless_run |
Cancel a pending or running scheduler run. |
draft_transformation_model |
Scaffold or create a Transformation Model draft. |
validate_transformation_model_draft |
Validate a Transformation Model draft. |
preview_transformation_model_draft |
Queue a guarded preview for a Transformation Model draft. |
draft_semantic_model |
Scaffold or create a Semantic Model draft. |
list_stackless_semantic_models |
List visible Semantic Models. |
explain_stackless_semantic_model |
Explain a Semantic Model and queryable members. |
validate_semantic_model_draft |
Validate a Semantic Model draft or payload. |
preview_semantic_model_query |
Run a guarded Semantic Model preview query. |
list_stackless_dashboards |
List visible Stackless dashboards. |
get_stackless_dashboard |
Get dashboard metadata, custom spec, and workflow hints. |
diagnose_stackless_dashboard |
Diagnose custom dashboard widget hydration failures. |
draft_dashboard_from_goal |
Scaffold or create a custom dashboard draft. |
fork_stackless_dashboard |
Fork a published custom dashboard into a private draft. |
update_stackless_dashboard_draft |
Update a private custom dashboard draft. |
hydrate_dashboard |
Hydrate custom dashboard widgets through Stackless/Cube. |
validate_dashboard_draft |
Validate a custom dashboard draft or spec. |
preview_dashboard |
Hydrate a custom dashboard preview through Stackless/Cube. |
diff_stackless_draft |
Inspect draft diff/review output before publication. |
publish_stackless_draft |
Publish a Stackless draft after confirmation. |
unpublish_stackless_resource |
Unpublish a Stackless resource after confirmation. |
delete_stackless_draft |
Delete a draft resource after confirmation. |
get_stackless_operation |
Get status for an MCP operation ID. |
Mutating tools require an idempotency_key. Publish, unpublish, cancel, and
delete also require confirmation={"confirmed": true, "evidence": "..."}.
For draft_transformation_model, an idempotency_key is required only when a
spec is supplied and a draft is created.
Endpoint-shaped compatibility tools are no longer registered. Use the workflow-style tools above for all new MCP agent flows.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stackless_mcp-1.0.0b2.tar.gz.
File metadata
- Download URL: stackless_mcp-1.0.0b2.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe1e0352965751f03841dd5f20e99c14460ab6aa8d6d4df4ccc1f57060ccbafc
|
|
| MD5 |
4a70f08b70ea782a59241bcf587b61a8
|
|
| BLAKE2b-256 |
e3f4174e7800440afdd606644e5ccb05a14c344768fa353bdb78cc937432cead
|
Provenance
The following attestation bundles were made for stackless_mcp-1.0.0b2.tar.gz:
Publisher:
stackless-mcp-release.yml on OxWorks/stackless
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stackless_mcp-1.0.0b2.tar.gz -
Subject digest:
fe1e0352965751f03841dd5f20e99c14460ab6aa8d6d4df4ccc1f57060ccbafc - Sigstore transparency entry: 1796491203
- Sigstore integration time:
-
Permalink:
OxWorks/stackless@1d075ccfd115bf082ddd5cfe28935e4efb2142a7 -
Branch / Tag:
refs/tags/stackless-mcp-v1.0.0b2 - Owner: https://github.com/OxWorks
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
stackless-mcp-release.yml@1d075ccfd115bf082ddd5cfe28935e4efb2142a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file stackless_mcp-1.0.0b2-py3-none-any.whl.
File metadata
- Download URL: stackless_mcp-1.0.0b2-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caf96028dde33a6a1a69043ff8421e56d34c7736233902139ae2d5501d7b4c98
|
|
| MD5 |
0eb800eccd7834fa2b03f7efa85c3812
|
|
| BLAKE2b-256 |
bdb8be0d6317dc2f9878306b6a2265c8cb17aa0cdfd4685058517e68ecce061b
|
Provenance
The following attestation bundles were made for stackless_mcp-1.0.0b2-py3-none-any.whl:
Publisher:
stackless-mcp-release.yml on OxWorks/stackless
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stackless_mcp-1.0.0b2-py3-none-any.whl -
Subject digest:
caf96028dde33a6a1a69043ff8421e56d34c7736233902139ae2d5501d7b4c98 - Sigstore transparency entry: 1796491522
- Sigstore integration time:
-
Permalink:
OxWorks/stackless@1d075ccfd115bf082ddd5cfe28935e4efb2142a7 -
Branch / Tag:
refs/tags/stackless-mcp-v1.0.0b2 - Owner: https://github.com/OxWorks
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
stackless-mcp-release.yml@1d075ccfd115bf082ddd5cfe28935e4efb2142a7 -
Trigger Event:
push
-
Statement type: