The model-context access tool for agents and humans
Project description
mcat-cli
The model-context access tool for agents and humans.
mcat is a CLI to interact with MCP servers from an endpoint.
mcat provides:
auth start: start authorization and return action details (URL/code)auth continue: resume a paused auth flowinit: run MCPinitializeand store session infotool/resource/prompt: access server capabilities
Install
Example install commands:
pip install mcat-cli
uv tool install mcat-cli
Requires Python 3.11+.
Typical Flow
- Start auth (non-blocking):
mcat auth start https://mcp.example.com/mcp \
-k token.json \
--state auth.json
- Continue auth after browser approval:
mcat auth continue --state auth.json -k token.json
- Initialize MCP session:
mcat init https://mcp.example.com/mcp -k token.json -o session.json
- Discover and use server utilities:
mcat tool list -s session.json
mcat tool call TOOL_NAME -i '{"key":"value"}' -s session.json
mcat resource list -s session.json
mcat resource read RESOURCE_URI -s session.json
mcat prompt list -s session.json
mcat prompt get PROMPT_NAME -s session.json -i '{"arg":"value"}'
If you are a human using the CLI directly, add --wait to auth start:
mcat auth start https://mcp.example.com/mcp -k token.json --state auth.json --wait
Tokens and secrets
Tokens and secrets can be specified by -k/--key-ref and KEY_SPEC using these patterns:
env://VAR.env://path:VAR.env://:VAR(same as.env://.env:VAR)json://pathpath(same asjson://path)
Notes:
- auth writes token back to
--key-ref - existing destination needs
-o/--overwrite env://is read-only for writes
Examples:
- Existing token/PAT in environment variable:
mcat init https://mcp.example.com/mcp -k env://MCP_TOKEN -o session.json
- Existing token/PAT in
.envfile:
mcat init https://mcp.example.com/mcp -k .env://.env:MCP_TOKEN -o session.json
For GitHub MCP usage, if you already have a GitHub PAT, you can reference it from env://... or .env://... directly.
Provide OAuth Client Information
Use client config when a provider expects a specific OAuth client (for example, pre-registered client settings in services like Linear, or enterprise OAuth setups).
auth start supports:
-c/--client CLIENT_INFO_FILE--client-id ID--client-secret KEY_SPEC--client-name NAME
Resolution order:
- CLI overrides
--clientfile- built-in defaults
Modes:
- static client mode: resolved
client_idpresent - dynamic registration mode: no resolved
client_id, uses resolvedclient_name
Validation:
nameconflicts withid/secret--client-nameconflicts with--client-id/--client-secretsecretrequiresid
Example client file (dynamic registration):
{"name":"your-public-client-name"}
Example client file (static client):
{
"id": "your-client-id",
"secret": "env://OAUTH_CLIENT_SECRET",
"scope": "mcp:connect",
"resource": "https://mcp.example.com/mcp"
}
Output
Most commands emit JSON to stdout:
{"ok":true,"result":{}}
{"ok":false,"error":"message"}
Resource output modes:
mcat resource read ... -s session.json: JSON resultmcat resource read ... -s session.json -o file.bin: save decoded content to file + JSON metadatamcat resource read ... -s session.json -o -: write decoded bytes to stdout
When logging is enabled, log output is sent to stderr by default.
Logging
If something goes wrong, enable logs for auth, mcp, and app:
mcat --log auth --log mcp --log app --log-stderr auth start ...
To include HTTP request/response bodies, use :debug level:
mcat --log auth:debug --log mcp:debug --log app:debug --log-stderr auth start ...
Logging options are global options and must be placed before the command name.
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 mcat_cli-0.1.8.tar.gz.
File metadata
- Download URL: mcat_cli-0.1.8.tar.gz
- Upload date:
- Size: 50.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22cafe8703eac6b38f5b728f3475f69f030ad8f8cd5f65a07844309a57d00a2e
|
|
| MD5 |
a0a7ae1f5dfcdb7b28657598baf03d1c
|
|
| BLAKE2b-256 |
4aa9b9e86d9b7dccefc6c56efa1d254d4f93c612381ae38e3d3245cbc99080f6
|
Provenance
The following attestation bundles were made for mcat_cli-0.1.8.tar.gz:
Publisher:
publish.yml on briceyan/mcat-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcat_cli-0.1.8.tar.gz -
Subject digest:
22cafe8703eac6b38f5b728f3475f69f030ad8f8cd5f65a07844309a57d00a2e - Sigstore transparency entry: 1004895564
- Sigstore integration time:
-
Permalink:
briceyan/mcat-cli@3e2048e35750d072c93a61f013e5489c01ce8adc -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/briceyan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3e2048e35750d072c93a61f013e5489c01ce8adc -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcat_cli-0.1.8-py3-none-any.whl.
File metadata
- Download URL: mcat_cli-0.1.8-py3-none-any.whl
- Upload date:
- Size: 34.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9acb7e99375bebfc98d8431f289d22f796c32ce7d1e3f207177c0f88403137b4
|
|
| MD5 |
96df86aace958ff5183d74d12abc9052
|
|
| BLAKE2b-256 |
5b7954e06d72a6dda1036944a1dd26cc37121d0d3f3753dc801b1a3a296ccda6
|
Provenance
The following attestation bundles were made for mcat_cli-0.1.8-py3-none-any.whl:
Publisher:
publish.yml on briceyan/mcat-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcat_cli-0.1.8-py3-none-any.whl -
Subject digest:
9acb7e99375bebfc98d8431f289d22f796c32ce7d1e3f207177c0f88403137b4 - Sigstore transparency entry: 1004895571
- Sigstore integration time:
-
Permalink:
briceyan/mcat-cli@3e2048e35750d072c93a61f013e5489c01ce8adc -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/briceyan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3e2048e35750d072c93a61f013e5489c01ce8adc -
Trigger Event:
push
-
Statement type: