McpOptions
Defined in: types.ts:115
Properties
Section titled “Properties”codeMode?
Section titled “codeMode?”
optionalcodeMode?:McpCodeModeProvider
Defined in: types.ts:151
Code-mode provider, e.g. codeMode() from @mantlejs/mcp-code.
events?
Section titled “events?”
optionalevents?:boolean
Defined in: types.ts:136
Expose service events (created/updated/patched/removed + custom) as MCP resources
(mantle://events/{path}) — for services in the expose map only.
Default
Section titled “Default”false
optionalmode?:McpMode
Defined in: types.ts:149
Tool surface. "code"/"both" require codeMode (BadRequest otherwise).
Default
Section titled “Default”“code” when codeMode is set, "tools" otherwise
optionalpath?:string
Defined in: types.ts:129
HTTP transport only: mount path.
Default
Section titled “Default”"/mcp"prompts?
Section titled “prompts?”
optionalprompts?:McpPromptDefinition[]
Defined in: types.ts:142
App-authored prompt templates. The prompts capability is only declared when non-empty.
query?
Section titled “query?”
optionalquery?:McpQueryOptions
Defined in: types.ts:144
find() result guardrails.
Default
Section titled “Default”{ defaultLimit: 25, maxLimit: 100 }resources?
Section titled “resources?”
optionalresources?:McpResourceDefinition[]
Defined in: types.ts:140
App-authored read-only resources served alongside the event resources.
serverInfo?
Section titled “serverInfo?”
optionalserverInfo?:object
Defined in: types.ts:131
Server identity reported during MCP initialization. Defaults: name "mantle", version "0.0.0".
optionalname?:string
version?
Section titled “version?”
optionalversion?:string
services
Section titled “services”services:
CapabilityScope|"*"
Defined in: types.ts:125
Expose map — required, deny-by-default. Maps a registered service path to the methods
exposed as tools: an explicit method list, or true for every method the service
registered in app.use(). "*" exposes all methods of all services registered after
mcp() — a deliberate escape hatch for prototyping. An unknown path or method throws
BadRequest when the server is built (at listen()/startMcp()). Same CapabilityScope
shape @mantlejs/auth’s authorizeAgent() uses for agent-token scopes — one deny-by-default
grant shape shared across the framework rather than two independently-typed lookalikes.
tools?
Section titled “tools?”
optionaltools?:McpToolDefinition[]
Defined in: types.ts:138
App-authored tools registered alongside the generated ones.
transport
Section titled “transport”transport:
"stdio"|"http"
Defined in: types.ts:127
"stdio" runs a standalone MCP server via startMcp(app); "http" mounts the endpoint on the app’s HTTP transport.