pub struct FileStoreConfig {
pub enabled: Option<bool>,
pub path: Option<String>,
pub name: Option<String>,
}Expand description
[store] section in mcpr.toml.
Controls the SQLite-based request storage engine. All fields are optional — sensible defaults are applied based on the platform.
[store]
# Enable or disable request storage. Default: true.
# Set to false to run mcpr as a pure proxy with no local persistence.
enabled = true
# Override the database file path. Default: platform-specific.
# Linux: ~/.local/share/mcpr/mcpr.db
# macOS: ~/Library/Application Support/mcpr/mcpr.db
# Windows: %APPDATA%\mcpr\mcpr.db
path = "/var/lib/mcpr/requests.db"
# Proxy name tag written to every row. Default: derived from upstream URL.
# Use this when you run multiple proxies sharing one database file,
# or when you want a human-friendly name in `mcpr proxy logs <name>`.
name = "api-server"Fields§
§enabled: Option<bool>Whether request storage is enabled.
When false, no database is opened and no events are recorded.
CLI query commands (mcpr proxy logs, etc.) will report that
storage is disabled.
Default: true — storage is on by default because observability
is the primary value proposition of mcpr beyond basic proxying.
path: Option<String>Override the database file path.
When set, the store uses this exact path instead of the platform default. Useful for:
- Placing the DB on a specific disk or partition.
- Docker/container deployments where the data dir is mounted.
- Running integration tests with an isolated database.
The parent directory is created automatically if it doesn’t exist.
Default: platform-specific (see super::path::resolve_db_path).
name: Option<String>Human-readable proxy name, written to every request and session row.
This is how mcpr proxy logs <name> identifies which proxy’s data
to query. When multiple proxies share a database, each needs a
unique name.
Default: derived from the upstream MCP URL hostname (e.g.,
“localhost-9000” for http://localhost:9000/mcp). Set this
explicitly when the derived name isn’t descriptive enough.
Implementations§
Source§impl FileStoreConfig
impl FileStoreConfig
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Whether storage is enabled. Defaults to true.
Trait Implementations§
Source§impl Clone for FileStoreConfig
impl Clone for FileStoreConfig
Source§fn clone(&self) -> FileStoreConfig
fn clone(&self) -> FileStoreConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more