mcp

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mcp provides the MCP server adapter for Prism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, runner app.AgentRunner) error

Serve starts the MCP server over stdio until the client disconnects.

func ServeWithConfig added in v0.1.14

func ServeWithConfig(ctx context.Context, runner app.AgentRunner, cfg Config) error

func StatusSummary

func StatusSummary(runner app.AgentRunner) string

StatusSummary returns a one-line startup message for logging.

Types

type CallMCPToolInput added in v0.1.14

type CallMCPToolInput struct {
	Server    string         `json:"server"`
	Tool      string         `json:"tool"`
	Arguments map[string]any `json:"arguments,omitempty"`
}

type Config added in v0.1.14

type Config struct {
	Policy          *internalpolicy.Engine
	EventSink       observe.Sink
	DownstreamMCP   *downstreammcp.Client
	BundleStatePath string
	EventStorePath  string
	RootDir         string
	SkillsDir       string
}

type DoctorInput

type DoctorInput struct{}

type ExplainPolicyInput added in v0.1.14

type ExplainPolicyInput struct {
	AgentID string   `json:"agent_id"`
	Skills  []string `json:"skills"`
	Plugins []string `json:"plugins"`
	Source  string   `json:"source"`
}

type GetConstitutionInput

type GetConstitutionInput struct {
	AgentID string `json:"agent_id"`
}

type GetPromptInput

type GetPromptInput struct {
	PromptID  string            `json:"prompt_id"`
	Variables map[string]string `json:"variables,omitempty"`
}

type GetPromptOutput

type GetPromptOutput struct {
	PromptID string `json:"prompt_id"`
	Title    string `json:"title"`
	Prompt   string `json:"prompt"`
}

type GetResourceInput

type GetResourceInput struct {
	URI string `json:"uri"`
}

type GetResourceOutput

type GetResourceOutput struct {
	URI      string `json:"uri"`
	Name     string `json:"name"`
	MimeType string `json:"mime_type"`
	Content  string `json:"content"`
}

type InstallBundleInput added in v0.1.14

type InstallBundleInput struct {
	ManifestPath string `json:"manifest_path"`
	SourceRoot   string `json:"source_root,omitempty"`
	DestRoot     string `json:"dest_root,omitempty"`
	PublicKey    string `json:"public_key"`
	PrismVersion string `json:"prism_version,omitempty"`
}

type ListAgentsInput

type ListAgentsInput struct{}

type ListAgentsOutput

type ListAgentsOutput struct {
	Agents []agent.Summary `json:"agents"`
	Count  int             `json:"count"`
}

type ListBundlesInput added in v0.1.14

type ListBundlesInput struct{}

type ListMCPServerToolsInput added in v0.1.14

type ListMCPServerToolsInput struct {
	Server        string `json:"server"`
	IncludeSchema bool   `json:"include_schema,omitempty"`
	MaxTools      int    `json:"max_tools,omitempty"`
}

type ListMCPServerToolsOutput added in v0.1.14

type ListMCPServerToolsOutput struct {
	Server string                      `json:"server"`
	Tools  []downstreammcp.ToolSummary `json:"tools"`
	Count  int                         `json:"count"`
}

type ListMCPServersInput added in v0.1.14

type ListMCPServersInput struct{}

type ListMCPServersOutput added in v0.1.14

type ListMCPServersOutput struct {
	Configured bool                   `json:"configured"`
	Servers    []downstreammcp.Server `json:"servers"`
}

type ListPoliciesInput added in v0.1.14

type ListPoliciesInput struct{}

type ListPoliciesOutput added in v0.1.14

type ListPoliciesOutput struct {
	Configured bool   `json:"configured"`
	Reason     string `json:"reason"`
}

type ListPromptsInput

type ListPromptsInput struct{}

type ListPromptsOutput

type ListPromptsOutput struct {
	Prompts []PromptTemplate `json:"prompts"`
	Count   int              `json:"count"`
}

type ListResourcesInput

type ListResourcesInput struct{}

type ListResourcesOutput

type ListResourcesOutput struct {
	Resources []MCPResource `json:"resources"`
	Count     int           `json:"count"`
}

type MCPResource

type MCPResource struct {
	URI         string `json:"uri"`
	Name        string `json:"name"`
	Description string `json:"description"`
	MimeType    string `json:"mime_type"`
}

type PromptTemplate

type PromptTemplate struct {
	ID          string   `json:"id"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Variables   []string `json:"variables,omitempty"`
}

PromptTemplate describes an LLM-callable prompt helper exposed as an MCP tool.

type RunAgentInput

type RunAgentInput struct {
	AgentID       string   `json:"agent_id"`
	Task          string   `json:"task"`
	SkillNames    []string `json:"skill_names"`
	Format        string   `json:"format,omitempty"`
	BundleID      string   `json:"bundle_id,omitempty"`
	BundleVersion string   `json:"bundle_version,omitempty"`
}

type RunGraphInput added in v0.1.14

type RunGraphInput struct {
	Graph graphpkg.Definition `json:"graph"`
}

type SkillHealth added in v0.1.14

type SkillHealth struct {
	Name     string   `json:"name"`
	OK       bool     `json:"ok"`
	Chars    int      `json:"chars"`
	Evals    int      `json:"evals,omitempty"`
	Errors   []string `json:"errors,omitempty"`
	Warnings []string `json:"warnings,omitempty"`
}

type SkillHealthInput added in v0.1.14

type SkillHealthInput struct {
	SkillName string `json:"skill_name,omitempty"`
}

type SkillHealthOutput added in v0.1.14

type SkillHealthOutput struct {
	Skills []SkillHealth `json:"skills"`
	Count  int           `json:"count"`
}

type SuggestRouteInput added in v0.1.14

type SuggestRouteInput struct {
	Task   string `json:"task"`
	Source string `json:"source"`
}

type UsageSummaryInput added in v0.1.14

type UsageSummaryInput struct{}

Jump to

Keyboard shortcuts

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