ginadapter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package ginadapter exposes a live *gin.Engine as an api2mcp Source, for embedded mode: mount an MCP endpoint inside an existing Gin app without a separate process or an OpenAPI spec.

r := gin.Default()
// ... your routes ...
src := ginadapter.New(r)
srv := api2mcp.New(src, api2mcp.WithBaseURL("http://localhost:8080"), api2mcp.ReadOnly())

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source adapts a *gin.Engine.

func New

func New(engine *gin.Engine) *Source

New returns a Source backed by the given Gin engine.

func (*Source) Operations

func (s *Source) Operations(_ context.Context) ([]ir.Operation, error)

Operations implements source.Source by walking the engine's registered routes.

Jump to

Keyboard shortcuts

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