FlowTruxFlowTrux/Docs
Docsmcp

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:

  1. Communicates via JSON-RPC over stdio (stdin/stdout).
  2. 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

  1. Go to Settings > MCP Servers > Add Server.
  2. Select External.
  3. Configure the server:
FieldRequiredDescription
NameYesDisplay name for the server
CommandYesExecutable to run (e.g., node, python3, npx)
ArgsYesCommand arguments as a JSON array (e.g., ["path/to/server.js"])
EnvNoEnvironment variables as key-value pairs
  1. Click Save.
  2. Assign to a workspace in Settings > Workspaces > Edit.

Examples

Python MCP Server

If you have a custom Python MCP server:

FieldValue
Commandpython3
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:

FieldValue
Commandnpx
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:

  1. Read JSON-RPC messages from stdin.
  2. Write JSON-RPC responses to stdout.
  3. Implement tools/list to advertise available tools with names, descriptions, and input schemas.
  4. Implement tools/call to 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.