fluxy-bot 0.5.24 → 0.5.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -169,6 +169,17 @@ export async function startFluxyAgentQuery(
|
|
|
169
169
|
}
|
|
170
170
|
} catch {}
|
|
171
171
|
|
|
172
|
+
// Load MCP server config from workspace/MCP.json if it exists
|
|
173
|
+
let mcpServers: any[] | undefined;
|
|
174
|
+
try {
|
|
175
|
+
const mcpConfigPath = path.join(WORKSPACE_DIR, 'MCP.json');
|
|
176
|
+
const mcpConfig = JSON.parse(fs.readFileSync(mcpConfigPath, 'utf-8'));
|
|
177
|
+
if (Array.isArray(mcpConfig) && mcpConfig.length) {
|
|
178
|
+
mcpServers = mcpConfig;
|
|
179
|
+
log.info(`Loaded ${mcpConfig.length} MCP server(s) from MCP.json`);
|
|
180
|
+
}
|
|
181
|
+
} catch {}
|
|
182
|
+
|
|
172
183
|
const claudeQuery = query({
|
|
173
184
|
prompt: sdkPrompt,
|
|
174
185
|
options: {
|
|
@@ -180,6 +191,7 @@ export async function startFluxyAgentQuery(
|
|
|
180
191
|
abortController,
|
|
181
192
|
systemPrompt: enrichedPrompt,
|
|
182
193
|
plugins: plugins.length ? plugins : undefined,
|
|
194
|
+
mcpServers,
|
|
183
195
|
env: {
|
|
184
196
|
...process.env as Record<string, string>,
|
|
185
197
|
CLAUDE_CODE_OAUTH_TOKEN: oauthToken,
|
|
@@ -238,6 +238,32 @@ The supervisor manages the backend process. You don't need to manage it yourself
|
|
|
238
238
|
- Never run `npm start` or `node backend/index.ts` directly — the supervisor handles it
|
|
239
239
|
- If something is truly broken and won't self-heal, tell your human to restart fluxy
|
|
240
240
|
|
|
241
|
+
## MCP Servers (Model Context Protocol)
|
|
242
|
+
|
|
243
|
+
You can connect to external tools via MCP servers. These give you capabilities beyond your built-in tools — like controlling a browser, querying databases, or interacting with third-party APIs.
|
|
244
|
+
|
|
245
|
+
**Config file:** `MCP.json` (in your workspace root)
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
[
|
|
249
|
+
{
|
|
250
|
+
"server-name": {
|
|
251
|
+
"command": "npx",
|
|
252
|
+
"args": ["@some/mcp-server"],
|
|
253
|
+
"env": {}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Each entry is an object where the key is the server name and the value has `command`, optional `args`, and optional `env`. The array is read fresh on every turn — add, remove, or edit entries anytime.
|
|
260
|
+
|
|
261
|
+
**Your human can ask you to add MCP servers.** When they do, read `MCP.json` (create it if missing), add the new server config, and write it back. Common examples:
|
|
262
|
+
- **Playwright** (browser control): `{ "playwright": { "command": "npx", "args": ["@playwright/mcp@latest", "--headless", "--browser", "chromium"] } }`
|
|
263
|
+
- **Fetch** (HTTP requests): `{ "fetch": { "command": "npx", "args": ["@anthropic-ai/mcp-fetch@latest"] } }`
|
|
264
|
+
|
|
265
|
+
When an MCP server is configured, its tools appear alongside your built-in tools. Use them naturally — no special syntax needed.
|
|
266
|
+
|
|
241
267
|
## Sacred Files — NEVER Modify
|
|
242
268
|
- `supervisor/` — chat UI, proxy, process management
|
|
243
269
|
- `worker/` — platform APIs and database
|