External MCP Servers
Add any MCP-compatible server to extend FlowTrux with custom tools
FlowTrux can connect to any MCP-compatible server, not just the built-in ones. This lets you integrate custom tools, internal APIs, or community MCP servers into your workflows.
How External Servers Work
An external MCP server is any process that:
- Communicates via JSON-RPC over stdio (stdin/stdout).
- Implements the MCP protocol to advertise tools and handle tool calls.
FlowTrux launches the server as a child process using the command and arguments you provide, injects environment variables for configuration, and communicates with it the same way it does with built-in servers.
Adding an External Server
- Go to Settings > MCP Servers > Add Server.
- Select External.
- Configure the server:
| Field | Required | Description |
|---|---|---|
| Name | Yes | Display name for the server |
| Command | Yes | Executable to run (e.g., node, python3, npx) |
| Args | Yes | Command arguments as a JSON array (e.g., ["path/to/server.js"]) |
| Env | No | Environment variables as key-value pairs |
- Click Save.
- Assign to a workspace in Settings > Workspaces > Edit.
Examples
Python MCP Server
If you have a custom Python MCP server:
| Field | Value |
|---|---|
| Command | python3 |
| Args | ["/opt/mcp-servers/my-server/main.py"] |
| Env | {"API_URL": "https://internal-api.example.com", "API_KEY": "secret-key"} |
NPX Package
For an MCP server published as an npm package:
| Field | Value |
|---|---|
| Command | npx |
| Args | ["-y", "@example/mcp-weather-server"] |
| Env | {"WEATHER_API_KEY": "your-api-key"} |
Security Considerations
- Environment variables containing secrets (API keys, tokens) are encrypted in the database, the same way built-in server credentials are stored.
- Process isolation: Each MCP server runs as its own child process. A crash in one server does not affect others.
Building Your Own MCP Server
An MCP server needs to:
- Read JSON-RPC messages from stdin.
- Write JSON-RPC responses to stdout.
- Implement
tools/listto advertise available tools with names, descriptions, and input schemas. - Implement
tools/callto execute tool calls and return results.
Minimal Node.js example using the MCP SDK:
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
const server = new Server({ name: "my-server", version: "1.0.0" }, {
capabilities: { tools: {} }
});
server.setRequestHandler("tools/list", async () => ({
tools: [{
name: "hello",
description: "Say hello",
inputSchema: {
type: "object",
properties: {
name: { type: "string", description: "Name to greet" }
},
required: ["name"]
}
}]
}));
server.setRequestHandler("tools/call", async (request) => {
if (request.params.name === "hello") {
const name = request.params.arguments.name;
return {
content: [{ type: "text", text: `Hello, ${name}!` }]
};
}
});
const transport = new StdioServerTransport();
await server.connect(transport);
Refer to the MCP specification for the full protocol details.
FlowTrux built-in servers use a shared helper (mcp-servers/shared/mcp-server.ts) that handles the protocol boilerplate. You can use it as a reference when building TypeScript servers.