Documentation
¶
Index ¶
- Constants
- type BuildConfig
- type DependencyConfig
- type DockerConfig
- type Manager
- func (m *Manager) AddTool(manifest *ProjectManifest, name string, config ToolConfig) error
- func (m *Manager) Exists() bool
- func (m *Manager) Load() (*ProjectManifest, error)
- func (m *Manager) RemoveTool(manifest *ProjectManifest, name string) error
- func (m *Manager) Save(manifest *ProjectManifest) error
- func (m *Manager) Validate(manifest *ProjectManifest) error
- type ProjectManifest
- type SecretProviderConfig
- type SecretsConfig
- type ToolConfig
Constants ¶
const ( FrameworkFastMCPPython = "fastmcp-python" FrameworkMCPGo = "mcp-go" FrameworkTypeScript = "typescript" FrameworkJava = "java" )
Supported frameworks
const ( SecretProviderEnv = "env" SecretProviderKubernetes = "kubernetes" )
Supported secret providers
const ManifestFileName = "kmcp.yaml"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildConfig ¶
type BuildConfig struct {
Output string `yaml:"output,omitempty" json:"output,omitempty"`
Docker DockerConfig `yaml:"docker,omitempty" json:"docker,omitempty"`
Target string `yaml:"target,omitempty" json:"target,omitempty"`
Platform string `yaml:"platform,omitempty" json:"platform,omitempty"`
}
BuildConfig represents build configuration
type DependencyConfig ¶
type DependencyConfig struct {
AutoManage bool `yaml:"auto_manage" json:"auto_manage"`
Runtime []string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
Dev []string `yaml:"dev,omitempty" json:"dev,omitempty"`
Extra []string `yaml:"extra,omitempty" json:"extra,omitempty"`
}
DependencyConfig represents dependency management configuration
type DockerConfig ¶
type DockerConfig struct {
Image string `yaml:"image,omitempty" json:"image,omitempty"`
Dockerfile string `yaml:"dockerfile,omitempty" json:"dockerfile,omitempty"`
Platform []string `yaml:"platform,omitempty" json:"platform,omitempty"`
BaseImage string `yaml:"base_image,omitempty" json:"base_image,omitempty"`
Port int `yaml:"port,omitempty" json:"port,omitempty"`
Environment map[string]string `yaml:"environment,omitempty" json:"environment,omitempty"`
HealthCheck string `yaml:"health_check,omitempty" json:"health_check,omitempty"`
}
DockerConfig represents Docker build configuration
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles project manifest operations
func NewManager ¶
NewManager creates a new manifest manager
func (*Manager) AddTool ¶
func (m *Manager) AddTool(manifest *ProjectManifest, name string, config ToolConfig) error
AddTool adds a new tool to the manifest
func (*Manager) Load ¶
func (m *Manager) Load() (*ProjectManifest, error)
Load reads and parses the kmcp.yaml file
func (*Manager) RemoveTool ¶
func (m *Manager) RemoveTool(manifest *ProjectManifest, name string) error
RemoveTool removes a tool from the manifest
func (*Manager) Save ¶
func (m *Manager) Save(manifest *ProjectManifest) error
Save writes the manifest to kmcp.yaml
func (*Manager) Validate ¶
func (m *Manager) Validate(manifest *ProjectManifest) error
Validate checks if the manifest is valid
type ProjectManifest ¶
type ProjectManifest struct {
// Project metadata
Name string `yaml:"name" json:"name"`
Framework string `yaml:"framework" json:"framework"`
Version string `yaml:"version" json:"version"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Author string `yaml:"author,omitempty" json:"author,omitempty"`
Email string `yaml:"email,omitempty" json:"email,omitempty"`
// Project configuration
Tools map[string]ToolConfig `yaml:"tools,omitempty" json:"tools,omitempty"`
Secrets SecretsConfig `yaml:"secrets,omitempty" json:"secrets,omitempty"`
// Metadata
CreatedAt time.Time `yaml:"created_at,omitempty" json:"created_at,omitempty"`
UpdatedAt time.Time `yaml:"updated_at,omitempty" json:"updated_at,omitempty"`
}
ProjectManifest represents the complete kmcp.yaml configuration
func GetDefault ¶
func GetDefault(name, framework, description, author, email, namespace string) *ProjectManifest
GetDefault returns a new ProjectManifest with default values
type SecretProviderConfig ¶
type SecretProviderConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Provider string `yaml:"provider" json:"provider"` // env, kubernetes
// For environment provider
File string `yaml:"file,omitempty" json:"file,omitempty"` // .env.local
// For kubernetes provider
SecretName string `yaml:"secretName,omitempty" json:"secretName,omitempty"`
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
}
SecretProviderConfig represents configuration for a secret provider
type SecretsConfig ¶
type SecretsConfig map[string]SecretProviderConfig
SecretsConfig defines the secret management configuration
type ToolConfig ¶
type ToolConfig struct {
Name string `yaml:"name" json:"name"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Handler string `yaml:"handler,omitempty" json:"handler,omitempty"`
Enabled bool `yaml:"enabled" json:"enabled"`
Type string `yaml:"type,omitempty" json:"type,omitempty"`
Config map[string]interface{} `yaml:"config,omitempty" json:"config,omitempty"`
}
ToolConfig represents configuration for an MCP tool