MCP Servers

The MCP Server integration allows Greppilot to connect to a custom server that implements the Model Context Protocol (MCP). This enables Greppilot agents to discover and execute tools hosted on your private MCP server, extending the agent's capabilities with custom logic and data sources.

Configuration

To integrate an MCP Server, provide the following configuration details:

FieldTypeDescriptionRequired
serverNametextA unique name for your MCP server instance within Greppilot. This name is used as a prefix for all tools discovered from this server (e.g., my-mcp-server_toolName).Yes
urlurlThe full HTTP/HTTPS endpoint of your MCP server.Yes
authHeaderpasswordAn optional authorization header value, typically for API keys or bearer tokens (e.g., Bearer YOUR_TOKEN).No

In production environments, the url must use HTTPS (e.g., https://mcp.example.com). HTTP connections are only permitted in development environments.

How it Works

Tool Discovery

Upon configuration, Greppilot connects to your MCP server using the provided url. It sends a JSON-RPC request with the tools/list method to retrieve all available tools hosted on your server. These tools, including their descriptions and parameter schemas, are then registered with Greppilot and become available for use by agents. Tool discovery has a 10-second timeout.

Tool Execution

When a Greppilot agent determines that an MCP tool needs to be executed, Greppilot sends a JSON-RPC request to your server. This request uses the tools/call method, specifying the name of the tool (stripped of its serverName prefix) and the necessary arguments (parameters). The response from your MCP server is then relayed back to the agent. Tool execution has a 30-second timeout.

// Example: tools/list request
{
  "jsonrpc": "2.0",
  "id": "...",
  "method": "tools/list",
  "params": {}
}

Error Handling

Greppilot provides detailed error messages if the MCP server is unreachable, returns an invalid response, or if a tool execution times out. Specific HTTP status codes and JSON-RPC error messages from the MCP server are relayed to assist with troubleshooting.