Skip to content

Commit 99a73bb

Browse files
Update README to clarify JSON configuration structure and MCP server examples
- Revised the section on `config.json` to emphasize that it must be standard JSON and provided a clearer example with comments for documentation purposes. - Added detailed explanations for MCP server entries, including two examples for stdio commands. - Removed outdated example section and streamlined the guidance for users setting up their configuration file.
1 parent 85bb01c commit 99a73bb

1 file changed

Lines changed: 40 additions & 42 deletions

File tree

README.md

Lines changed: 40 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,31 @@ OpenFox reads a single JSON file at **`~/.openfox/config.json`**. Fields map to
5151

5252
**Valid on-disk JSON**: `~/.openfox/config.json` must be **standard JSON** (double quotes, no `//` comments). The **`jsonc`** snippet below is **documentation only**—remove comments before saving, or paste the object into the Web **Config** editor.
5353

54-
### Reference `config.json` (valid JSON; structure matches a full on-disk file)
54+
### Full reference example (JSONC; documentation only)
5555

56-
Secret values below are **placeholders**—use your own keys and never commit them to git.
56+
The **key order, nesting, and non-secret values** match a full on-disk layout; secrets are **placeholders**. On disk the file must be **plain JSON** (no `//` comments).
5757

58-
```json
58+
```jsonc
5959
{
60+
// Agent identity
6061
"agent_id": "OpenFox",
6162
"docs_enabled": true,
6263
"os_security_key": "<os_security_key>",
64+
// Browser / API origins (update if you change the listen port)
6365
"cors_origin_list": [
6466
"http://127.0.0.1:7777",
6567
"http://localhost:7777"
6668
],
6769
"time_zone": "Asia/Shanghai",
70+
// Enable RAG / knowledge search
6871
"search_knowledge": true,
72+
// Main chat model (LiteLLM)
6973
"llm": {
7074
"model_name": "deepseek/deepseek-chat",
7175
"api_base": "https://api.deepseek.com",
7276
"api_key": "<llm_api_key>"
7377
},
78+
// Channel integrations (example: Feishu)
7479
"channels": {
7580
"feishu": {
7681
"app_id": "<feishu_app_id>",
@@ -79,7 +84,36 @@ Secret values below are **placeholders**—use your own keys and never commit th
7984
"verification_token": "<feishu_verification_token>"
8085
}
8186
},
82-
"mcps": [],
87+
// MCP servers: each entry is stdio (command+args) or HTTP (url+headers)
88+
"mcps": [
89+
{
90+
// Display name
91+
"name": "weibo",
92+
// stdio: uvx --from Git runs the MCP without a prior install
93+
"command": "uvx",
94+
"args": [
95+
"--from",
96+
"git+https://github.com/InfernalAzazel/mcp-server-weibo.git",
97+
"mcp-server-weibo"
98+
],
99+
"env": {},
100+
// stdio: leave url empty
101+
"url": "",
102+
"headers": {},
103+
"tool_timeout": 60
104+
},
105+
{
106+
"name": "chrome-devtools",
107+
// stdio: npx runs a published Node MCP package
108+
"command": "npx",
109+
"args": ["chrome-devtools-mcp@latest"],
110+
"env": {},
111+
"url": "",
112+
"headers": {},
113+
"tool_timeout": 60
114+
}
115+
],
116+
// RAG: Chroma + embedder + reranker
83117
"knowledge": {
84118
"vector_db": {
85119
"collection": "docs",
@@ -113,6 +147,7 @@ Secret values below are **placeholders**—use your own keys and never commit th
113147
"max_results": 10,
114148
"isolate_vector_search": false
115149
},
150+
// Toolkit toggles and options
116151
"tools": {
117152
"mcp": {
118153
"include_tools": null,
@@ -224,44 +259,7 @@ Secret values below are **placeholders**—use your own keys and never commit th
224259
}
225260
```
226261

227-
To attach MCP servers, replace `"mcps": []` with a real array (see the **JSONC** example in the next subsection; strip comments for a valid file).
228-
229-
### MCP servers (`mcps`) — example with comments (JSONC, not valid for copy-paste as-is)
230-
231-
Each item is either **stdio** (`command` + `args`, optional `env`) or **HTTP** (`url`, optional `headers`). Below are two **stdio** examples: **uvx** (Python MCP from Git) and **npx** (Node MCP). For HTTP, set `url` (and optional `headers`) and leave `command` / `args` empty.
232-
233-
```jsonc
234-
"mcps": [
235-
{
236-
// Display name
237-
"name": "weibo",
238-
// uvx: run tool from a Git dependency (--from) without a prior pip install
239-
"command": "uvx",
240-
"args": [
241-
"--from",
242-
"git+https://github.com/InfernalAzazel/mcp-server-weibo.git",
243-
"mcp-server-weibo"
244-
],
245-
"env": {},
246-
// stdio transport: keep url empty
247-
"url": "",
248-
"headers": {},
249-
"tool_timeout": 60
250-
},
251-
{
252-
"name": "chrome-devtools",
253-
// npx: run a published Node MCP package
254-
"command": "npx",
255-
"args": ["chrome-devtools-mcp@latest"],
256-
"env": {},
257-
"url": "",
258-
"headers": {},
259-
"tool_timeout": 60
260-
}
261-
]
262-
```
263-
264-
Requires **`uv` / `uvx`** and **Node.js `npx`** on the host where OpenFox runs, if you use those entries.
262+
If you use the **stdio** MCP entries above, the host running OpenFox needs **`uv` / `uvx`** and **Node.js (with `npx`)** installed, as applicable.
265263

266264
You can edit the live file in the Web **Config** page or via the **expand/config** HTTP API when authenticated. After manual edits on disk, restart `python -m openfox` if the process is already running.
267265

0 commit comments

Comments
 (0)