mcpserver

package
v0.0.0-...-42328bb Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mcpserver is the MCP server of latchwire mcp: the tools a local agent calls to set Latchwire up. It keeps no state and decides nothing: every tool goes to the daemon's assist.call, which checks access, asks the user for approval and records the call. The pure parts (the configuration text, the [Peer] block, the server guide) are computed here, peer_block and server_guide only after the daemon allowed them.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is the version the server reports to its clients.

Functions

func New

func New(dial func(ctx context.Context) (*ipc.Conn, error)) *mcp.Server

New returns the MCP server with the Latchwire tools. Every tool call has a daemon connection of its own, opened with dial and closed when the call ends: when the client cancels the call, the daemon sees the connection close and cancels what it was doing.

Types

type Dialer

type Dialer func(ctx context.Context) (*ipc.Conn, error)

Dialer opens a new connection to the daemon. The connection is not yet served: the server serves it for one tool call and closes it afterwards.

Jump to

Keyboard shortcuts

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