Configuration¶
The server reads its configuration from CLI flags or environment variables. CLI flags win when both are set for the same field.
Settings¶
| Env var | CLI flag | Required | Default | Notes |
|---|---|---|---|---|
SALDEO_USERNAME |
--username |
yes | — | SaldeoSMART login (firm-portal user, not client). |
SALDEO_API_TOKEN |
--api-token |
yes | — | 64-char token from Konfiguracja → Konto → API. Held as SecretStr. |
SALDEO_BASE_URL |
--base-url |
no | https://saldeo.brainshare.pl |
Use https://saldeo-test.brainshare.pl for the test environment. |
SALDEO_TIMEOUT |
(env only) | no | 30.0 |
httpx request timeout in seconds. |
Logging¶
The server logs every request to a daily-rotated file (7 days retained).
Configuration env vars (read by setup_logging in src/saldeosmart_mcp/logging.py):
| Env var | Default | Notes |
|---|---|---|
SALDEO_LOG_DIR |
/var/log/saldeosmart (Docker) or platform default |
Directory for saldeosmart.log. |
SALDEO_LOG_LEVEL |
INFO |
Set to DEBUG to log full XML envelopes (still token-redacted). |
CLI help¶
usage: saldeosmart-mcp [-h] [--username USERNAME] [--api-token API_TOKEN]
[--base-url BASE_URL]
MCP server for the SaldeoSMART REST API. Speaks MCP over stdio; works with any
MCP-aware client.
options:
-h, --help show this help message and exit
--username USERNAME SaldeoSMART username. Falls back to $SALDEO_USERNAME.
--api-token API_TOKEN
SaldeoSMART API token. Falls back to
$SALDEO_API_TOKEN.
--base-url BASE_URL SaldeoSMART base URL. Falls back to $SALDEO_BASE_URL,
then to https://saldeo.brainshare.pl.
SaldeoConfig fields¶
Pydantic-Settings model defined in
src/saldeosmart_mcp/config.py.
| Field | Type | Default | Constraints |
|---|---|---|---|
username |
str |
— | MinLen(min_length=1) |
api_token |
SecretStr |
— | MinLen(min_length=1) |
base_url |
str |
'https://saldeo.brainshare.pl' | _PydanticGeneralMetadata(pattern='^https?://') |
timeout |
float |
30.0 | Gt(gt=0) |