-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.example.toml
More file actions
158 lines (131 loc) · 6.98 KB
/
Copy pathconfig.example.toml
File metadata and controls
158 lines (131 loc) · 6.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# =============================================================================
# config.yarr.toml — Annotated template of all config.toml fields
#
# This file documents the non-secret config.toml options.
# Copy it to config.toml and adjust for your deployment.
#
# config.toml holds non-secret defaults. Secrets and URLs go in .env.
# See .env.example for the secrets-side template.
#
# SPLIT PHILOSOPHY:
# config.toml → ports, bind addresses, feature flags, timeouts, rate limits,
# log levels, retention settings, anything safe to commit
# .env → API URLs, API keys, tokens, OAuth credentials, passwords,
# anything that should NEVER be in version control
#
# Environment variables ALWAYS take priority over config.toml values.
# Naming:
# YARR_MCP_* → [mcp] section (server config)
# YARR_SERVICES and YARR_<NAME>_* → [yarr] services
# =============================================================================
# ── Media automation services ────────────────────────────────────────────────
# Services are usually configured through .env so URLs and credentials stay out
# of git. This table is safe to commit when left empty.
[yarr]
services = []
# ── MCP HTTP server ───────────────────────────────────────────────────────────
[mcp]
# Bind host for the MCP HTTP server.
# YARR_MCP_HOST env var overrides this.
# 0.0.0.0 → accept connections from all interfaces (for Docker, reverse proxy)
# 127.0.0.1 → loopback only (safest for local dev; no auth required)
# The code default is 127.0.0.1. Use 0.0.0.0 only for container deployments. By default, non-loopback binds
# require bearer/OAuth auth; trusted gateways may explicitly opt into
# upstream-enforced auth with YARR_NOAUTH=true.
host = "127.0.0.1"
# Bind port for the MCP HTTP server.
# YARR_MCP_PORT env var overrides this.
port = 40070
# Server name advertised to MCP clients in the tools/list response.
# YARR_MCP_SERVER_NAME env var overrides this.
server_name = "yarr"
# Code Mode admission and execution bounds. Values must be non-zero.
# Environment overrides use the matching YARR_MCP_CODEMODE_* names.
codemode_max_concurrent = 4
codemode_queue_timeout_ms = 500
codemode_timeout_secs = 30
# Disable authentication entirely.
# ONLY safe when host = "127.0.0.1" (loopback — your machine only).
# YARR_MCP_NO_AUTH env var overrides this.
# Never set to true in production. Use just dev for local no-auth mode.
# no_auth = false
# Static bearer token for /mcp authentication.
# YARR_MCP_TOKEN env var overrides this. Always set the secret through env.
# Generate with: openssl rand -hex 32 or just gen-token
# api_token = ""
# Scopes granted to the static bearer token. The safe default is read-only.
# YARR_MCP_STATIC_TOKEN_SCOPES (comma-separated) overrides this.
# A bearer-only Code Mode server must explicitly include yarr:write.
static_token_scopes = ["yarr:read"]
# Tool registration mode. `codemode` advertises one powerful `yarr` tool;
# `flat` advertises one typed tool per configured service. Read-only static
# bearer deployments must use flat mode.
# YARR_MCP_TOOL_MODE env var overrides this.
tool_mode = "codemode"
# Extra Host header values allowed by the RMCP host-validation middleware.
# YARR_MCP_ALLOWED_HOSTS env var (comma-separated) overrides this.
# allowed_hosts = ["yarr.example.internal", "yarr.lan"]
# Extra CORS origins for browser-based MCP clients.
# YARR_MCP_ALLOWED_ORIGINS env var (comma-separated) overrides this.
# Add your frontend origin if building a browser-based client.
# allowed_origins = ["https://claude.ai", "http://localhost:5173"]
# ── OAuth / JWT authentication ────────────────────────────────────────────────
# This sub-section configures the optional OAuth + JWT auth layer. Activate it by
# setting YARR_MCP_AUTH_MODE=oauth in .env. Leave all sensitive values
# (client_id, client_secret, public_url) in .env — never in this file.
[mcp.auth]
# Authentication mode: "bearer" (default) or "oauth".
# YARR_MCP_AUTH_MODE env var overrides this.
# Start with "bearer" for simplicity. Switch to "oauth" when you need per-user
# identity and Google account-gated access.
mode = "bearer"
# Public URL of this MCP server (required in OAuth mode).
# YARR_MCP_PUBLIC_URL env var overrides this.
# Must be reachable from Claude clients. Set in .env, not here.
# public_url = "https://yarr.example.internal"
# Google OAuth 2.0 credentials — ALWAYS set via .env, never here.
# YARR_MCP_GOOGLE_CLIENT_ID env var overrides this.
# google_client_id = ""
# YARR_MCP_GOOGLE_CLIENT_SECRET env var overrides this.
# google_client_secret = ""
# Bootstrap admin email — the first Google account allowed to authenticate.
# YARR_MCP_AUTH_ADMIN_EMAIL env var overrides this.
# Set to your Google account email. Additional accounts can be added via
# allowed_emails below or dynamically via the OAuth admin panel.
admin_email = ""
# Additional allowed email addresses beyond admin_email.
# Add your team members' Google email addresses here.
allowed_emails = []
# Path to the SQLite database for OAuth sessions and client registrations.
# In Docker, /data is bind-mounted from ~/.yarr on the host. For bare-metal,
# change to ~/.yarr/auth.db.
# Local OAuth is single-replica: Yarr exclusively holds
# `${sqlite_path}.instance.lock`. NFS/shared SQLite is unsupported.
sqlite_path = "/data/auth.db"
# Path to the RS256 private key for JWT signing.
# Auto-generated on first run if it doesn't exist.
# In Docker, /data is bind-mounted from ~/.yarr on the host. For bare-metal,
# change to ~/.yarr/auth-jwt.pem.
key_path = "/data/auth-jwt.pem"
# How long issued access tokens are valid (seconds).
# 3600 (1 hour) is the standard. Reduce for higher security environments.
access_token_ttl_secs = 3600
# How long refresh tokens are valid (seconds).
# 2592000 = 30 days. Increase for "remember me" UX; decrease for tighter security.
refresh_token_ttl_secs = 2592000
# How long OAuth authorization codes are valid (seconds).
# 300 (5 minutes) is the OAuth spec default. Reduce to 60 for stricter setups.
auth_code_ttl_secs = 300
# Rate limit: max new client registrations per minute per IP.
# 10 is reasonable for a private server. Reduce to 1-3 for strict control.
register_rpm = 10
# Rate limit: max authorization attempts per minute per IP.
# 60 allows normal OAuth flows. Reduce if you see abuse.
authorize_rpm = 60
# OAuth and the read-only static bearer token coexist by default. Set true to
# prevent YARR_MCP_TOKEN from being registered while OAuth is active.
disable_static_token_with_oauth = false
# Extra redirect URIs allowed during OAuth.
# claude.ai redirect URIs are included by default.
# Add your MCP client's redirect URIs if they differ from claude.ai's.
allowed_client_redirect_uris = []