EnableAgentMcpServer

Enables an Embabel Agent application to run as a Model Context Protocol (MCP) server.

This annotation configures your Spring Boot application to expose agents as MCP-compatible tools that can be consumed by AI assistants like Claude Desktop, IDEs with MCP support, or other MCP-compliant clients.

What This Annotation Provides:

  • Activates the "mcp-server" Spring profile
  • Configures JSON-RPC server for MCP protocol communication
  • Auto-discovers and exposes @Agent annotated classes as MCP tools
  • Sets up security boundaries and sandboxing for tool execution
  • Enables MCP protocol handlers and message routing

Configuration Properties:

When this annotation is active, the following properties can be configured:


# application.yml
mcp:
  server:
    port: 3000              # MCP server port (default: 3000)
    timeout: 30000          # Request timeout in ms (default: 30s)
    max-connections: 10     # Max concurrent connections
    allowed-tools: "*"      # Tool access control (* = all)

Since

1.0

Author

Embabel Team

See also

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun toString(): String