Skip to content

Commit 7eac94e

Browse files
committed
rename mcpServers to mcp-servers in config; reduce max_context_tokens
1 parent c4f976b commit 7eac94e

6 files changed

Lines changed: 29 additions & 29 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,17 @@ ask = [
245245
"Bash(unknown_tool)",
246246
]
247247
248-
[mcpServers.company-internal]
248+
[mcp-servers.company-internal]
249249
command = "/usr/local/bin/company-mcp-server"
250250
args = ["--config", "/etc/company/mcp-config.json"]
251251
env = { "COMPANY_API_URL" = "https://internal.company.com" }
252252
253-
[mcpServers.github]
253+
[mcp-servers.github]
254254
command = "npx"
255255
args = ["-y", "@modelcontextprotocol/server-github"]
256256
env = { "GITHUB_TOKEN" = "ghp_YOUR_TOKEN" }
257257
258-
[mcpServers.api]
258+
[mcp-servers.api]
259259
url = "https://api.example.com/mcp"
260260
headers = { "Authorization" = "Bearer token123" }
261261
```

examples/config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
# Configure external tools via Model Context Protocol
55

66
# Filesystem server
7-
[mcpServers.filesystem]
7+
[mcp-servers.filesystem]
88
command = "npx"
99
args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Documents"]
1010

1111
# Company internal server with environment variables
12-
[mcpServers.company-internal]
12+
[mcp-servers.company-internal]
1313
command = "/usr/local/bin/company-mcp-server"
1414
args = ["--config", "/etc/company/mcp-config.json"]
1515
env = { "COMPANY_API_URL" = "https://internal.company.com" }
1616

1717
# Database with credentials
18-
[mcpServers.postgres]
18+
[mcp-servers.postgres]
1919
command = "npx"
2020
args = ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
2121
env = { "PGPASSWORD" = "secret123" }
2222

2323
# Remote API server (HTTP)
24-
[mcpServers.api]
24+
[mcp-servers.api]
2525
url = "https://api.example.com/mcp"
2626
headers = { "Authorization" = "Bearer token123" }
2727

examples/mcp_examples.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Common MCP server configurations for Sofos.
55
## Filesystem
66

77
```toml
8-
[mcpServers.filesystem]
8+
[mcp-servers.filesystem]
99
command = "npx"
1010
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/directory"]
1111
```
@@ -15,15 +15,15 @@ args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/directory"]
1515
### PostgreSQL
1616

1717
```toml
18-
[mcpServers.postgres]
18+
[mcp-servers.postgres]
1919
command = "npx"
2020
args = ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
2121
```
2222

2323
### PostgreSQL with credentials
2424

2525
```toml
26-
[mcpServers.postgres]
26+
[mcp-servers.postgres]
2727
command = "npx"
2828
args = ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user@localhost/mydb"]
2929
env = { "PGPASSWORD" = "secret123" }
@@ -32,7 +32,7 @@ env = { "PGPASSWORD" = "secret123" }
3232
### SQLite
3333

3434
```toml
35-
[mcpServers.sqlite]
35+
[mcp-servers.sqlite]
3636
command = "npx"
3737
args = ["-y", "@modelcontextprotocol/server-sqlite", "/path/to/database.db"]
3838
```
@@ -42,7 +42,7 @@ args = ["-y", "@modelcontextprotocol/server-sqlite", "/path/to/database.db"]
4242
### GitHub
4343

4444
```toml
45-
[mcpServers.github]
45+
[mcp-servers.github]
4646
command = "npx"
4747
args = ["-y", "@modelcontextprotocol/server-github"]
4848
env = { "GITHUB_TOKEN" = "ghp_YOUR_TOKEN" }
@@ -53,7 +53,7 @@ Get token: https://github.com/settings/tokens
5353
### GitLab
5454

5555
```toml
56-
[mcpServers.gitlab]
56+
[mcp-servers.gitlab]
5757
command = "npx"
5858
args = ["-y", "@modelcontextprotocol/server-gitlab"]
5959
env = { "GITLAB_TOKEN" = "glpat_YOUR_TOKEN" }
@@ -62,7 +62,7 @@ env = { "GITLAB_TOKEN" = "glpat_YOUR_TOKEN" }
6262
### Slack
6363

6464
```toml
65-
[mcpServers.slack]
65+
[mcp-servers.slack]
6666
command = "npx"
6767
args = ["-y", "@modelcontextprotocol/server-slack"]
6868
env = { "SLACK_BOT_TOKEN" = "xoxb-YOUR-TOKEN", "SLACK_TEAM_ID" = "T1234567890" }
@@ -73,7 +73,7 @@ env = { "SLACK_BOT_TOKEN" = "xoxb-YOUR-TOKEN", "SLACK_TEAM_ID" = "T1234567890" }
7373
### Google Drive
7474

7575
```toml
76-
[mcpServers.gdrive]
76+
[mcp-servers.gdrive]
7777
command = "npx"
7878
args = ["-y", "@modelcontextprotocol/server-google-drive"]
7979
env = { "GOOGLE_APPLICATION_CREDENTIALS" = "/path/to/credentials.json" }
@@ -84,15 +84,15 @@ env = { "GOOGLE_APPLICATION_CREDENTIALS" = "/path/to/credentials.json" }
8484
### HTTP Server
8585

8686
```toml
87-
[mcpServers.custom]
87+
[mcp-servers.custom]
8888
url = "https://api.example.com/mcp"
8989
headers = { "Authorization" = "Bearer YOUR_TOKEN" }
9090
```
9191

9292
### Python Server
9393

9494
```toml
95-
[mcpServers.python]
95+
[mcp-servers.python]
9696
command = "python"
9797
args = ["-m", "my_mcp_server"]
9898
env = { "API_KEY" = "YOUR_KEY" }
@@ -101,7 +101,7 @@ env = { "API_KEY" = "YOUR_KEY" }
101101
### Custom Binary with Environment
102102

103103
```toml
104-
[mcpServers.company-internal]
104+
[mcp-servers.company-internal]
105105
command = "/usr/local/bin/company-mcp-server"
106106
args = ["--config", "/etc/company/mcp-config.json"]
107107
env = { "COMPANY_API_URL" = "https://internal.company.com", "LOG_LEVEL" = "debug" }
@@ -110,15 +110,15 @@ env = { "COMPANY_API_URL" = "https://internal.company.com", "LOG_LEVEL" = "debug
110110
## Multiple Servers
111111

112112
```toml
113-
[mcpServers.docs]
113+
[mcp-servers.docs]
114114
command = "npx"
115115
args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Documents"]
116116

117-
[mcpServers.projects]
117+
[mcp-servers.projects]
118118
command = "npx"
119119
args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Projects"]
120120

121-
[mcpServers.github]
121+
[mcp-servers.github]
122122
command = "npx"
123123
args = ["-y", "@modelcontextprotocol/server-github"]
124124
env = { "GITHUB_TOKEN" = "ghp_YOUR_TOKEN" }

examples/mcp_quickstart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ brew install node
2020
Create `~/.sofos/config.toml`:
2121

2222
```toml
23-
[mcpServers.filesystem]
23+
[mcp-servers.filesystem]
2424
command = "npx"
2525
args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/yourusername/Documents"]
2626
```
@@ -48,7 +48,7 @@ The AI will use tools like `filesystem_list_directory` and `filesystem_read_file
4848
### GitHub
4949

5050
```toml
51-
[mcpServers.github]
51+
[mcp-servers.github]
5252
command = "npx"
5353
args = ["-y", "@modelcontextprotocol/server-github"]
5454
env = { "GITHUB_TOKEN" = "ghp_YOUR_TOKEN" }
@@ -59,15 +59,15 @@ Get token: https://github.com/settings/tokens
5959
### PostgreSQL
6060

6161
```toml
62-
[mcpServers.postgres]
62+
[mcp-servers.postgres]
6363
command = "npx"
6464
args = ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
6565
```
6666

6767
### SQLite
6868

6969
```toml
70-
[mcpServers.sqlite]
70+
[mcp-servers.sqlite]
7171
command = "npx"
7272
args = ["-y", "@modelcontextprotocol/server-sqlite", "/path/to/database.db"]
7373
```

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl Default for SofosConfig {
1414
fn default() -> Self {
1515
Self {
1616
max_messages: 500,
17-
max_context_tokens: 180_000,
17+
max_context_tokens: 165_000,
1818
max_tool_iterations: 200,
1919
max_file_size: 10 * 1024 * 1024,
2020
max_bash_output: 50 * 1024 * 1024,

src/mcp/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::path::{Path, PathBuf};
44

55
#[derive(Debug, Clone, Serialize, Deserialize)]
66
pub struct McpConfig {
7-
#[serde(rename = "mcpServers", default)]
7+
#[serde(rename = "mcp-servers", default)]
88
pub mcp_servers: HashMap<String, McpServerConfig>,
99
}
1010

@@ -96,7 +96,7 @@ mod tests {
9696
#[test]
9797
fn test_parse_stdio_server() {
9898
let toml_content = r#"
99-
[mcpServers.test-server]
99+
[mcp-servers.test-server]
100100
command = "/path/to/server"
101101
args = ["--port", "8080"]
102102
env = { "API_KEY" = "secret" }
@@ -117,7 +117,7 @@ env = { "API_KEY" = "secret" }
117117
#[test]
118118
fn test_parse_http_server() {
119119
let toml_content = r#"
120-
[mcpServers.http-server]
120+
[mcp-servers.http-server]
121121
url = "https://example.com/mcp"
122122
headers = { "Authorization" = "Bearer token" }
123123
"#;

0 commit comments

Comments
 (0)