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

server

package
v1.1.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: 15 Imported by: 0

Documentation

Overview

Package server wires the tools onto the MCP SDK and dumps the tool surface.

Index

Constants

View Source
const Description = "GitLab over MCP from your own account: issues, merge requests, reviews, the repository and CI."

Description is the one-line description shared by the bundle manifest and the registry entry. At most 100 characters.

View Source
const Name = "gitlab-mcp"

Name is the MCP server name.

Variables

This section is empty.

Functions

func DumpSchemas

func DumpSchemas(w io.Writer, version string) error

DumpSchemas writes the full tool surface — every flag and toolset on — as JSON, without touching the network or credentials. The SDK has no public enumerator, so an in-memory client asks the server, which is also exactly what a client would be told.

func New

func New(opts Options) *mcp.Server

New builds the MCP server with every tool the configuration registers. A nil Client is allowed: every tool then answers [auth], which is what a client started before `gitlab-mcp login` should see.

Types

type Dump

type Dump struct {
	Server            string                  `json:"server"`
	Version           string                  `json:"version"`
	SDK               string                  `json:"sdk"`
	Tools             []*mcp.Tool             `json:"tools"`
	ResourceTemplates []*mcp.ResourceTemplate `json:"resourceTemplates"`
}

Dump is what --dump-schemas writes: the whole registrable surface, every mcp.Tool as the wire carries it, _meta and output schema included. The schema-diff gate compares two of these.

type Options

type Options struct {
	Config  config.Config
	Client  *gapi.Client
	Granted []string // scopes the token was granted
	Logger  *slog.Logger
	Version string
}

Options is what the server needs from startup.

Jump to

Keyboard shortcuts

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