mcpserver

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package mcpserver is the Traceway MCP server: a thin tool/prompt/resource layer over pkg/client plus the embedded operator playbooks in knowledge/. It is transport-agnostic: the CLI runs it over stdio (traceway mcp) and a future backend mount can serve the same server over streamable HTTP by constructing one per authenticated session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) *mcp.Server

New builds an MCP server with the full Traceway tool/prompt/resource surface registered. The returned server is ready to Run on any transport.

Types

type Config

type Config struct {
	// Client is the authenticated API client. Refresh behavior is the
	// client's own concern (client.WithRefresher); the server never touches
	// credentials.
	Client *client.Client
	// DefaultProjectID is used when a tool call passes no project_id. May be
	// empty: list_projects still works and every tool accepts project_id.
	DefaultProjectID string
	// InstanceURL is the Traceway instance origin, appended to the server
	// instructions so clients can validate pasted dashboard URLs and produce
	// links. May be empty.
	InstanceURL string
	// Version is the traceway build version reported to MCP clients.
	Version string
	// AuthHint is the remediation shown on token_expired errors. The caller
	// knows how credentials were supplied (CLI session, env token, HTTP
	// bearer) and what actually fixes a dead one; empty falls back to the
	// CLI-session advice.
	AuthHint         string
	PerRequestBearer bool
}

Config carries everything a server session needs. It holds no mutable state: project selection is per-call (a project_id param falling back to DefaultProjectID), which keeps one server per authenticated session safe for a multi-tenant HTTP mount.

Directories

Path Synopsis
Package knowledge holds the canonical Traceway operator playbooks.
Package knowledge holds the canonical Traceway operator playbooks.

Jump to

Keyboard shortcuts

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