Skip to content

@McpExpose

The @McpExpose decorator and createMcpService(app, ConfigClass) ("@agboss/core/mcp") turn an AGBoss @Application into a standards-compliant Model Context Protocol (MCP) server. External MCP clients (Codex, Cursor, Windsurf, Claude Code, or another AGBoss application) can discover and call your exposed @WorkflowStart entry points and @Tool classes with full @Budget, @PiiPolicy, and @InputGuardrail / @OutputGuardrail enforcement.

Complete @McpExpose and createMcpService example

Section titled “Complete @McpExpose and createMcpService example”
Option Type Required Description
name string Yes MCP server identifier advertised during protocol initialization (e.g., "job-scout-mcp").
version string Yes Semantic version of the exposed MCP surface (e.g., "1.0.0").
exports readonly Class[] Yes Array of @Tool and @WorkflowStart classes exposed as callable MCP tools.