mcpserver

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 7 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 GoShip's MCP tool server for a host that serves many people at once, such as the hosted server behind https://mcp.goship.sh/mcp. Nothing is read from a machine or selected beforehand: each tool call reaches the GoShip API with the token of the person who made it, which the host puts in the request's context with WithToken after checking it.

The tools are the ones `goship mcp` serves locally, without goship_deploy's directory upload (a host has no directory of the caller's to read).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(apiURL, version string) *mcp.Server

New builds the server. Building one costs ~30ms, so a host builds it once and shares it across requests and people: the credential travels in each request's context, never in the server.

func WithToken

func WithToken(ctx context.Context, token string) context.Context

WithToken returns ctx carrying the GoShip token of the person a request is from. A tool call whose context has none fails, asking to reconnect.

Types

This section is empty.

Jump to

Keyboard shortcuts

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