codex

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MCPIntegrationName is the unique identifier for this integration
	MCPIntegrationName = "codex-cli-mcp"

	// MCPIntegrationVersion is the adapter version
	MCPIntegrationVersion = "2.0.0"

	// MCPServerName is the identifier used in ~/.codex/config.toml
	MCPServerName = "memorizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CodexCLIMCPAdapter

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

CodexCLIMCPAdapter implements the Integration interface for Codex CLI MCP server

func NewCodexCLIMCPAdapter

func NewCodexCLIMCPAdapter() *CodexCLIMCPAdapter

NewCodexCLIMCPAdapter creates a new Codex CLI MCP integration adapter

func (*CodexCLIMCPAdapter) Detect

func (a *CodexCLIMCPAdapter) Detect() (bool, error)

Detect checks if Codex CLI with MCP support is installed on the system

func (*CodexCLIMCPAdapter) FormatFactsOutput added in v0.14.0

func (a *CodexCLIMCPAdapter) FormatFactsOutput(facts *types.FactsIndex, format integrations.OutputFormat) (string, error)

FormatFactsOutput is not used by MCP integrations MCP servers provide output through resources and tools, not direct formatting

func (*CodexCLIMCPAdapter) FormatOutput

func (a *CodexCLIMCPAdapter) FormatOutput(index *types.FileIndex, format integrations.OutputFormat) (string, error)

FormatOutput is not used by MCP integrations MCP servers provide output through resources and tools, not direct formatting

func (*CodexCLIMCPAdapter) GetCommand

func (a *CodexCLIMCPAdapter) GetCommand(binaryPath string, format integrations.OutputFormat) string

GetCommand returns the command that should be executed by Codex CLI

func (*CodexCLIMCPAdapter) GetDescription

func (a *CodexCLIMCPAdapter) GetDescription() string

GetDescription returns a human-readable description

func (*CodexCLIMCPAdapter) GetName

func (a *CodexCLIMCPAdapter) GetName() string

GetName returns the integration name

func (*CodexCLIMCPAdapter) GetVersion

func (a *CodexCLIMCPAdapter) GetVersion() string

GetVersion returns the adapter version

func (*CodexCLIMCPAdapter) IsEnabled

func (a *CodexCLIMCPAdapter) IsEnabled() (bool, error)

IsEnabled checks if the integration is currently configured

func (*CodexCLIMCPAdapter) Reload

Reload applies configuration changes

func (*CodexCLIMCPAdapter) Remove

func (a *CodexCLIMCPAdapter) Remove() error

Remove removes the integration configuration

func (*CodexCLIMCPAdapter) Setup

func (a *CodexCLIMCPAdapter) Setup(binaryPath string) error

Setup configures the Codex CLI MCP integration

func (*CodexCLIMCPAdapter) Update

func (a *CodexCLIMCPAdapter) Update(binaryPath string) error

Update updates the integration configuration

func (*CodexCLIMCPAdapter) Validate

func (a *CodexCLIMCPAdapter) Validate() error

Validate checks the health of the integration

type CodexMCPConfig

type CodexMCPConfig struct {
	MCPServers map[string]CodexMCPServer `toml:"mcp_servers,omitempty"`
}

CodexMCPConfig represents the Codex CLI config.toml structure Only includes the mcp_servers section we care about

type CodexMCPServer

type CodexMCPServer struct {
	Command           string            `toml:"command,omitempty"`
	Args              []string          `toml:"args,omitempty"`
	Enabled           *bool             `toml:"enabled,omitempty"` // pointer for optional
	StartupTimeoutSec *int              `toml:"startup_timeout_sec,omitempty"`
	ToolTimeoutSec    *int              `toml:"tool_timeout_sec,omitempty"`
	Env               map[string]string `toml:"env,omitempty"`
}

CodexMCPServer represents a single MCP server configuration Codex CLI uses TOML with environment variables in nested table

Jump to

Keyboard shortcuts

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