Documentation
¶
Overview ¶
Package mcp hosts an in-process Model Context Protocol server that gives Claude Code the same IDE loop it has in VS Code or GoLand: diagnostics flow to Claude, and Claude's edits open as a diff the user accepts or rejects. Claude auto-connects over SSE via a lockfile under ~/.claude/ide
Index ¶
- type DiffRequest
- type Session
- func (s *Session) Close() error
- func (s *Session) Enabled() bool
- func (s *Session) Port() int
- func (s *Session) SetDiffHandlers(show func(context.Context, DiffRequest) bool, close func(tabName string))
- func (s *Session) SetDispatcher(d func(func()))
- func (s *Session) SetEnabled(enabled bool)
- func (s *Session) URL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffRequest ¶
DiffRequest describes a proposed file change for editor review
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session owns the MCP server bound to an editor
func Attach ¶
Attach creates the MCP server for the editor over SSE on addr and starts it. Disable or re-enable it later with SetEnabled
func (*Session) SetDiffHandlers ¶
func (s *Session) SetDiffHandlers( show func(context.Context, DiffRequest) bool, close func(tabName string), )
SetDiffHandlers installs the hooks that show and close a read-only diff review in the editor UI, wired by the app so mcp stays decoupled from the UI
func (*Session) SetDispatcher ¶
func (s *Session) SetDispatcher(d func(func()))
SetDispatcher installs the function that runs editor access on the Bubble Tea loop. Until it is set, access runs inline on the caller's goroutine
func (*Session) SetEnabled ¶
SetEnabled starts or stops the MCP server