Help us shape the future of Go! Take the 2026 Go Developer Survey

mcp

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package mcp serves awp as a Model Context Protocol server over stdio, for harnesses that prefer tools to shell commands (spec section 15). The tools call the same daemon the CLI does, so behavior is identical.

When the client registers for Claude Code channel notifications (the server declares the experimental "claude/channel" capability), inbound messages are also pushed into the session as they arrive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// Ensure returns a client for a running daemon, starting it if needed.
	Ensure func() (*control.Client, error)
	// Channel forces pushing inbound messages as channel notifications even
	// if the client did not ask for them.
	Channel bool
	Logf    func(format string, args ...any)
	// contains filtered or unexported fields
}

Server is one MCP session.

func (*Server) Run

func (s *Server) Run(ctx context.Context, in io.Reader, out io.Writer) error

Run serves MCP on in/out until in closes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL