Documentation
¶
Overview ¶
Package mcpserver exposes wassup as Model Context Protocol tools, resources and prompts, over stdio (Claude Code, Desktop, Codex, Cursor) or HTTP (claude.ai and other remote clients).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend interface {
Call(ctx context.Context, method string, params any, meta api.Meta) (json.RawMessage, error)
Stream(ctx context.Context, method string, params any, meta api.Meta, onEvent func(json.RawMessage) error) (json.RawMessage, error)
}
Backend reaches the engine, either in-process (daemon) or over the socket (stdio server).
type EngineBackend ¶
EngineBackend calls the engine directly (the remote server runs inside the daemon).
func (EngineBackend) Call ¶
func (b EngineBackend) Call(ctx context.Context, method string, params any, meta api.Meta) (json.RawMessage, error)
func (EngineBackend) Stream ¶
func (b EngineBackend) Stream(ctx context.Context, method string, params any, meta api.Meta, onEvent func(json.RawMessage) error) (json.RawMessage, error)
type Options ¶
type Options struct {
Backend Backend
Source string // "mcp" (stdio) or "remote" (HTTP)
Profile string
AllTools bool
Fence bool
ApprovalWait time.Duration
WhatsAppApprovals bool
// TrustClientApproval: the client relays the user's answer to approval prompts. A client
// could fake that answer, so only enable it for apps the user trusts; others get the
// out-of-band WhatsApp prompt, which the client can't forge.
TrustClientApproval bool
}
Options configures one MCP server.
type RPCBackend ¶
RPCBackend calls the daemon over its socket; Ensure (optional) starts it on demand.
func (RPCBackend) Call ¶
func (b RPCBackend) Call(ctx context.Context, method string, params any, meta api.Meta) (json.RawMessage, error)
func (RPCBackend) Stream ¶
func (b RPCBackend) Stream(ctx context.Context, method string, params any, meta api.Meta, onEvent func(json.RawMessage) error) (json.RawMessage, error)