server

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package server wires the MCP SDK to the Pipedrive client. It does not own the lifetime of either; cmd/pipedrive-mcp/main.go does. This package only provides the constructor that returns a server with every tool package's Register function called.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, name, version string, client *pipedrive.Client, domain string, opts tools.RegisterOptions) *mcp.Server

New constructs an MCP server with every tool package wired up. The client may be nil (used by the --dump-schemas path, where tool handlers never execute — only their schemas are dumped). domain is used for URL injection in tool outputs.

opts.DryRun mirrors PIPEDRIVE_DRY_RUN; opts.EnableDestructive mirrors PIPEDRIVE_ENABLE_DESTRUCTIVE — see the RegisterOptions godoc for details.

The parent ctx governs the cache-warm goroutine's lifetime. When it cancels (e.g. SIGTERM), the warm-up's in-flight HTTP requests cancel cleanly instead of running orphaned to completion.

Types

This section is empty.

Directories

Path Synopsis
Package testutil provides shared helpers for tool-handler tests.
Package testutil provides shared helpers for tool-handler tests.

Jump to

Keyboard shortcuts

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