MCP Server

[Preview] -- MCP server integration is part of the agent system currently in development.

Grove modules can be exposed as MCP (Model Context Protocol) servers, allowing external LLM clients to discover and invoke your tools through a standardized protocol.

Prerequisites: Agent Declarations, Tool Declarations. What you'll learn: How to declare an MCP server that exposes your Grove tools.

MCP Server Declaration

mcp_server {
  name "order-management"
  version "1.0"

  tools {
    lookup_order
    process_return
    search_products
    create_order
  }
}

The MCP server declaration registers a set of tools to be served over the MCP protocol. Each tool's description, input, and output declarations are automatically converted to the MCP tool schema format.

Transport

MCP servers support stdio and HTTP transports:

mcp_server {
  name "order-management"
  version "1.0"
  protocol stdio

  tools {
    lookup_order
    process_return
  }
}
TransportUse Case
stdioLocal integration, CLI tools, IDE extensions
httpRemote access, deployed services

How It Works

  1. You declare tools in your .grove module
  2. You declare an mcp_server that references those tools
  3. The Grove runtime serves the MCP protocol, advertising available tools
  4. External MCP clients (Claude, IDEs, other agents) discover and invoke tools
  5. Tool invocations flow through Grove's validation and action pipeline

This means every tool call through MCP gets the same guarantees as a direct Grove action: type checking, validation, state machine enforcement, and audit trail.

See Also