MCP Servers
Configuring MCP Servers

Configuring MCP Servers

Global MCP Server Inclusion Mode

Using MCP servers will increase your token consumption. Bwat allows you to limit or completely disable MCP server functionality as needed.

  1. Click the "MCP Servers" icon in the top navigation bar of the Bwat extension
  2. Select the "Installed" tab, then click the "Advanced MCP Settings" link at the bottom
  3. Bwat will open a settings window. Locate Bwat>Mcp:Mode and choose your preferred option from the dropdown
MCP settings edit

Managing Individual MCP Servers

Each MCP server has its own configuration panel for adjusting settings, managing tools, and controlling operation.

Accessing Server Settings

  1. Click the "MCP Servers" icon in Bwat's top navigation bar
  2. Find the desired MCP server in the list and click its name to open its settings
MCP settings individual

Common Operations

  • Deleting a Server: Click the Trash icon beside the MCP server or the red Delete Server button in its configuration box
    • Note: Deletion occurs immediately without confirmation
  • Restarting a Server: Click the Restart button next to the server or the gray Restart Server button in its configuration panel
  • Enabling/Disabling: Toggle the switch next to the server to activate or deactivate it individually
  • Network Timeout: Adjust how long Bwat waits for an MCP server response using the dropdown at the bottom of the server's config box (default: 1 minute, range: 30 seconds to 1 hour)

Editing MCP Settings Files

All installed MCP server configurations are stored in bwat_mcp_settings.json:

  1. Click the MCP Servers icon in Bwat's navigation bar
  2. Go to the "Installed" tab
  3. Click "Configure MCP Servers" at the pane's bottom

The JSON-formatted file contains a mcpServers object with named configurations:

{
  "mcpServers": {
    "server1": {
      "command": "python",
      "args": ["/path/to/server.py"],
      "env": {
        "API_KEY": "your_api_key"
      },
      "alwaysAllow": ["tool1", "tool2"],
      "disabled": false
    }
  }
}

Understanding Transport Types

MCP supports two communication methods:

STDIO Transport

For locally-run servers:

  • Uses standard input/output streams
  • Lower latency (no network delays)
  • Enhanced security (no network exposure)
  • Simple setup (no HTTP server required)
  • Runs directly on your machine

Example Configuration:

{
  "mcpServers": {
    "local-server": {
      "command": "node",
      "args": ["/path/to/server.js"],
      "env": {
        "API_KEY": "your_api_key"
      },
      "alwaysAllow": ["tool1", "tool2"],
      "disabled": false
    }
  }
}

SSE Transport

For remotely-hosted servers:

  • Uses Server-Sent Events protocol
  • Can be hosted on separate machines
  • Supports multiple simultaneous connections
  • Requires network access
  • Enables centralized management

Example Configuration:

{
  "mcpServers": {
    "remote-server": {
      "url": "https://your-server-url.com/mcp",
      "headers": {
        "Authorization": "Bearer your-token"
      },
      "alwaysAllow": ["tool3"],
      "disabled": false
    }
  }
}

Integrating MCP Tools into Your Workflow

Once configured, Bwat automatically detects available MCP tools:

  1. Enter your request in Bwat's chat interface
  2. Bwat will suggest relevant MCP tools when applicable
  3. Approve tool usage when prompted (or enable auto-approval)

Example: Requesting "Analyze my API's performance" might trigger an MCP tool designed for endpoint testing.

Troubleshooting MCP Servers

Common issues and fixes:

  • Unresponsive Server: Verify the server process is running and check network connections
  • Permission Errors: Validate API keys/credentials in bwat_mcp_settings.json
  • Missing Tools: Confirm the server properly implements the tool and isn't disabled in settings
  • Performance Issues: Adjust the network timeout value for specific servers