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

mcp

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package mcp implements the popgres MCP (Model Context Protocol) server.

The server tools are generated from the collections and they execute the same REST API requests (handlers, rules, hooks and rate limits) with the auth token of the MCP request.

Index

Constants

View Source
const SchemaResourceURI = "popgres://schema"

SchemaResourceURI is the URI of the resource that describes the collections.

Variables

This section is empty.

Functions

func NewServer

func NewServer(app core.App, auth *core.Record, version string, dispatch Dispatcher) (*sdk.Server, error)

NewServer creates a new MCP server with the tools of the collections that the provided auth record can access.

Types

type Dispatcher

type Dispatcher func(ctx context.Context, method string, path string, body any) (int, []byte, error)

Dispatcher executes an internal REST API request with the auth of the MCP request and returns the response status code and body.

Jump to

Keyboard shortcuts

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