ConfigurationMCP

MCP

Bob Shell supports the Model Context Protocol (MCP), allowing you to extend Bob's capabilities by connecting to external services and tools.

What is MCP?

An MCP (Model Context Protocol) server acts as a bridge between Bob and external services like databases, APIs, or custom scripts. With MCP, you can extend Bob's capabilities beyond its built-in features.

MCP servers provide Bob with:

  • Tool discovery: Access to available tools with their descriptions and parameters
  • Tool invocation: The ability to call specific tools with arguments and receive structured responses
  • Resource access: The capability to read data from specific resources

Benefits of MCP

  • Extend functionality: Add custom capabilities to Bob that aren't available out-of-the-box
  • Integrate with services: Connect Bob to your databases, APIs, and other systems
  • Automate workflows: Create specialized tools for your specific needs
  • Share capabilities: Distribute useful tools across your team

Configuring MCP servers

You can manage MCP server configurations at two levels:

  1. Global configuration: Settings in <USER_HOME>/.bob/mcp_settings.json apply to all workspaces
  2. Project-level configuration: Settings in .bob/mcp.json apply only to the current project

When a server name exists in both global and project configurations, the project-level configuration takes precedence.

Editing MCP settings files

Use Bob IDE, or another text editor, to modify your MCP settings files.

The following example shows a basic Stdio server configuration:

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

Configuration properties

Each server configuration requires one of these properties:

  • command: Path to the executable for Stdio transport
  • url: SSE endpoint URL for remote servers
  • httpURL: HTTP endpoint URL for Streamable HTTP transport

Optional properties include:

  • args: Command-line arguments for Stdio transport
  • headers: Custom HTTP headers for SSE transport
  • env: Environment variables for the server process
  • cwd: Working directory for Stdio transport
  • timeout: Request timeout in milliseconds (default: 600,000 ms / 10 minutes)
  • alwaysAllow: Tool names to approve automatically. Bob Shell reads these entries from mcp.json and applies them at the start of each task, so listed tools do not prompt for approval.
  • disabled: Set to true to disable the server

Transport types

MCP supports three ways to communicate with servers:

Stdio transport

Stdio transport runs servers locally on your machine:

  • Uses standard input/output streams for communication
  • Provides lower latency and better security
  • Runs as a child process on your machine

Example configuration:

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

SSE transport

SSE transport connects to remote servers over HTTP/HTTPS:

  • Uses Server-Sent Events protocol
  • Works with servers hosted on different machines
  • Requires network access

Example configuration:

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

Streamable HTTP transport

Streamable HTTP transport connects to remote servers using HTTP:

  • Uses a bidirectional HTTP connection
  • Supports both request/response and server-pushed messages
  • Works with servers hosted on different machines

Example configuration:

{
 "mcpServers": {
   "remote-server": {
     "httpURL": "https://your-server-url.com/mcp"
   }
 }
}

Platform-specific examples

Windows configuration

{
  "mcpServers": {
    "puppeteer": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@modelcontextprotocol/server-puppeteer"
      ]
    }
  }
}

macOS and Linux configuration

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-puppeteer"
      ]
    }
  }
}

Runtime version manager configuration

When using version managers like asdf or mise:

{
  "mcpServers": {
    "mcp-batchit": {
      "command": "mise",
      "args": [
        "x",
        "--",
        "node",
        "/Users/myself/workspace/mcp-batchit/build/index.js"
      ],
      "alwaysAllow": [
        "search",
        "batch_execute"
      ]
    }
  }
}
How is this topic?