mcpserver

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package mcpserver exposes Oni3 agent tools through the Model Context Protocol. It is the server counterpart of the mcp package, which connects Oni3 to external MCP servers.

Index

Constants

View Source
const (
	CallAgentToolName  = "call_agent"
	ListAgentsToolName = "list_agents"
	ListModelsToolName = "list_models"
)

Names of the three MCP tools exposed by Oni3.

Variables

This section is empty.

Functions

func AgentTools

func AgentTools(cfg *config.Config) ([]tool.InvokableTool, error)

AgentTools builds the standard Oni3 MCP surface used by both `oni3 mcp` and the HTTP endpoint embedded in `oni3 web`.

func New

func New(opts Options) (*server.MCPServer, error)

New builds an MCP server that lists and invokes the supplied Oni3 tools.

func RunAgent

func RunAgent(ctx context.Context, cfg *config.Config, agentName, model, prompt string) (string, error)

RunAgent executes one agent turn with an optional model override.

Types

type Options

type Options struct {
	Name         string
	Version      string
	Instructions string
	Tools        []tool.InvokableTool
}

Options configures one MCP server instance.

Jump to

Keyboard shortcuts

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