picklemcp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphQLModel

type GraphQLModel struct {
	Model      string
	Operations []string
}

GraphQLModel represents an exposed model with its operations.

type RBACRole

type RBACRole struct {
	Slug        string
	Name        string
	Permissions []string
}

RBACRole represents a derived role for MCP display.

type RBACState

type RBACState struct {
	Roles         []RBACRole
	GraphQLModels []GraphQLModel
}

RBACState holds the derived RBAC state for MCP tools. Since the MCP server may not have DB access, this works off replayed policy definitions rather than live database queries.

func DeriveRBACState

func DeriveRBACState(projectDir string) *RBACState

DeriveRBACState returns the current RBAC state by scanning policy files and GraphQL policy files in the project directory. Parses Go source to extract CreateRole/AlterRole/DropRole calls and Expose/Unexpose calls.

type Server

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

Server wraps the MCP server with Pickle project context.

func NewServer

func NewServer(projectDir string) (*Server, error)

NewServer creates a Pickle MCP server with all tools registered.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the MCP server on stdio transport.

func (*Server) RunHTTP

func (s *Server) RunHTTP(addr string) error

RunHTTP starts the MCP server as a Streamable HTTP server on the given address.

Jump to

Keyboard shortcuts

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