Skip to content

Commit d9895c4

Browse files
CopilotMossaka
andauthored
Add config.toml reference documentation (#401)
* Initial plan * Add comprehensive configuration files reference documentation - Created docs/reference/configuration-files.md with detailed documentation for all configuration files - Covers config.toml, policy.yaml, component-registry.json, docker-compose.yml - Includes schemas, examples, field descriptions, and best practices - Documents additional config files: Cargo.toml, rust-toolchain.toml, rustfmt.toml, etc. - Added to SUMMARY.md under Reference section - Updated CHANGELOG.md Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * Remove non-server config files from configuration reference Removed sections for: - policy.yaml (component config, not Wassette server config) - component-registry.json (not a config file) - docker-compose.yml (deployment file, not a config file) Now focuses only on Wassette server configuration (config.toml) and build/toolchain configs Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * Change title to config.toml and remove duplicate content - Changed page title from "Configuration Files Reference" to "config.toml" - Updated SUMMARY.md to show "config.toml" in navigation - Removed duplicate "config.toml" heading - Confirmed "Other Configuration Files" section removal Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> --------- Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> Co-authored-by: Jiaxiao Zhou <duibao55328@gmail.com>
1 parent 758c5f3 commit d9895c4

File tree

3 files changed

+106
-0
lines changed

3 files changed

+106
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66

77
### Added
88

9+
- Configuration Files reference documentation covering Wassette server configuration files (config.toml) and build/toolchain configuration files (Cargo.toml, rust-toolchain.toml, rustfmt.toml, etc.) with detailed schemas, examples, and best practices
910
- Concepts documentation page explaining MCP fundamentals (server vs client, tools, prompts, resources), WebAssembly Component Model (components, WIT, bindings), how Wassette translates components to MCP tools, and the policy/capability model
1011
- Developer documentation section with comprehensive "Getting Started" guide covering prerequisites, building, testing, code formatting, development workflow, CI/CD, and project structure for contributors
1112
- Documentation reference for commonly used HTTP domains in network permissions, providing a comprehensive list of frequently needed domains organized by category (package registries, version control systems, cloud providers, container registries, AI/ML APIs, CDNs, documentation sites, and CI/CD services) to help users make informed decisions when granting network permissions ([#368](https://github.com/microsoft/wassette/pull/368))

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- [CLI](./reference/cli.md)
2727
- [Built-in Tools](./reference/built-in-tools.md)
2828
- [Permissions](./reference/permissions.md)
29+
- [config.toml](./reference/configuration-files.md)
2930
- [Community Components](./reference/community-components.md)
3031

3132
# Design & Architecture
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# config.toml
2+
3+
This page provides a comprehensive reference for the `config.toml` configuration file used by the Wassette MCP server. This file is optional and provides defaults for server behavior, including component storage locations, secrets directory, and environment variables.
4+
5+
### Location
6+
7+
- **Linux/macOS**: `$XDG_CONFIG_HOME/wassette/config.toml` (typically `~/.config/wassette/config.toml`)
8+
- **Windows**: `%APPDATA%\wassette\config.toml`
9+
- **Custom**: Set via `WASSETTE_CONFIG_FILE` environment variable
10+
11+
### Configuration Priority
12+
13+
Configuration values are merged with the following precedence (highest to lowest):
14+
15+
1. Command-line options (e.g., `--plugin-dir`)
16+
2. Environment variables prefixed with `WASSETTE_`
17+
3. Configuration file (`config.toml`)
18+
19+
### Schema
20+
21+
```toml
22+
# Directory where WebAssembly components are stored
23+
# Default: $XDG_DATA_HOME/wassette/components (~/.local/share/wassette/components)
24+
plugin_dir = "/path/to/components"
25+
26+
# Directory where secrets are stored (API keys, credentials, etc.)
27+
# Default: $XDG_CONFIG_HOME/wassette/secrets (~/.config/wassette/secrets)
28+
secrets_dir = "/path/to/secrets"
29+
30+
# Environment variables to be made available to components
31+
# These are global defaults and can be overridden per-component in policy files
32+
[environment_vars]
33+
API_KEY = "your_api_key"
34+
LOG_LEVEL = "info"
35+
DATABASE_URL = "postgresql://localhost/mydb"
36+
```
37+
38+
### Fields
39+
40+
#### `plugin_dir`
41+
42+
- **Type**: String (path)
43+
- **Default**: Platform-specific data directory
44+
- **Description**: Directory where loaded WebAssembly components are stored. Components loaded via `wassette component load` or the MCP interface are saved here.
45+
46+
#### `secrets_dir`
47+
48+
- **Type**: String (path)
49+
- **Default**: Platform-specific config directory
50+
- **Description**: Directory for storing sensitive data like API keys and credentials. This directory should have restricted permissions (e.g., `chmod 600`).
51+
52+
#### `environment_vars`
53+
54+
- **Type**: Table/Map
55+
- **Default**: Empty
56+
- **Description**: Key-value pairs of environment variables to make available to components. Note that components must explicitly request access to environment variables via their policy files.
57+
58+
### Example Configurations
59+
60+
**Minimal Configuration:**
61+
```toml
62+
# Use all defaults
63+
```
64+
65+
**Development Configuration:**
66+
```toml
67+
plugin_dir = "./dev-components"
68+
secrets_dir = "./dev-secrets"
69+
70+
[environment_vars]
71+
LOG_LEVEL = "debug"
72+
RUST_LOG = "trace"
73+
```
74+
75+
**Production Configuration:**
76+
```toml
77+
plugin_dir = "/opt/wassette/components"
78+
secrets_dir = "/opt/wassette/secrets"
79+
80+
[environment_vars]
81+
LOG_LEVEL = "info"
82+
NODE_ENV = "production"
83+
```
84+
85+
### Environment Variables
86+
87+
You can override any configuration value using environment variables with the `WASSETTE_` prefix:
88+
89+
```bash
90+
# Override plugin directory
91+
export WASSETTE_PLUGIN_DIR=/custom/components
92+
93+
# Override config file location
94+
export WASSETTE_CONFIG_FILE=/etc/wassette/config.toml
95+
96+
# Start server
97+
wassette serve --stdio
98+
```
99+
100+
## See Also
101+
102+
- [CLI Reference](cli.md) - Command-line usage and options
103+
- [Permissions Guide](permissions.md) - Working with permissions
104+
- [Docker Deployment](../deployment/docker.md) - Detailed Docker setup

0 commit comments

Comments
 (0)