mcp

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package mcp provides MCP server integration for Aha Studio using OmniSkill.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServer

func RunServer(ctx context.Context, opts *ServerOptions) error

RunServer starts the MCP server.

Types

type AhaSkill

type AhaSkill struct {
	skill.BaseSkill
	// contains filtered or unexported fields
}

AhaSkill implements the skill.Skill interface for Aha.io operations.

func NewAhaSkill

func NewAhaSkill(cfg *Config) *AhaSkill

NewAhaSkill creates a new AhaSkill with the given configuration.

func (*AhaSkill) Close

func (s *AhaSkill) Close() error

Close cleans up resources.

func (*AhaSkill) Description

func (s *AhaSkill) Description() string

Description returns a human-readable description of the skill.

func (*AhaSkill) Init

func (s *AhaSkill) Init(ctx context.Context) error

Init initializes the skill.

func (*AhaSkill) Name

func (s *AhaSkill) Name() string

Name returns the skill identifier.

func (*AhaSkill) Tools

func (s *AhaSkill) Tools() []skill.Tool

Tools returns the tools provided by this skill.

type Config

type Config struct {
	// Subdomain is the Aha.io account subdomain.
	Subdomain string

	// APIKey is the Aha.io API key.
	APIKey string

	// DefaultProduct is the default product ID for queries.
	DefaultProduct string

	// BrowserEmail is the email for browser automation login.
	BrowserEmail string

	// BrowserPassword is the password for browser automation login.
	BrowserPassword string

	// DBPath is the path to the SQLite cache database for offline queries.
	// If empty, cache-based tools will return an error.
	DBPath string

	// SyncRequestsPerSecond throttles the dedicated client used by the
	// sync_data tool (does not affect other tools' shared client). Default
	// is 10 req/s if unset/zero (see NewClient).
	SyncRequestsPerSecond float64
}

Config holds configuration for the Aha MCP skill.

func ConfigFromEnv

func ConfigFromEnv() (*Config, error)

ConfigFromEnv creates a Config from environment variables.

func (*Config) NewClient

func (c *Config) NewClient() (*aha.Client, error)

NewClient creates an Aha API client from the config.

func (*Config) NewSyncClient added in v0.12.0

func (c *Config) NewSyncClient() (*aha.Client, error)

NewSyncClient creates an Aha API client throttled for bulk sync operations, using SyncRequestsPerSecond (defaulting to 10 req/s if unset).

type ServerOptions

type ServerOptions struct {
	// Transport is the transport mode: "stdio" or "http"
	Transport string

	// HTTPAddr is the HTTP server address (for http transport)
	HTTPAddr string

	// Config is the Aha configuration
	Config *Config
}

ServerOptions configures the MCP server.

type ToolHandlers

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

ToolHandlers provides handler functions for Aha MCP tools.

func NewToolHandlers

func NewToolHandlers(cfg *Config) *ToolHandlers

NewToolHandlers creates a new ToolHandlers instance.

func (*ToolHandlers) AddFeatureComment

func (h *ToolHandlers) AddFeatureComment(ctx context.Context, params map[string]any) (any, error)

AddFeatureComment adds a comment to a feature.

func (*ToolHandlers) AddGoalToFeature added in v0.12.0

func (h *ToolHandlers) AddGoalToFeature(ctx context.Context, params map[string]any) (any, error)

AddGoalToFeature links a goal to a feature using the GraphQL CreateRecordLink mutation.

func (*ToolHandlers) AddIdeaComment

func (h *ToolHandlers) AddIdeaComment(ctx context.Context, params map[string]any) (any, error)

AddIdeaComment adds a comment to an idea.

func (*ToolHandlers) AssignFeatureRelease

func (h *ToolHandlers) AssignFeatureRelease(ctx context.Context, params map[string]any) (any, error)

AssignFeatureRelease assigns a feature to a release.

func (*ToolHandlers) AssignUserToFeature

func (h *ToolHandlers) AssignUserToFeature(ctx context.Context, params map[string]any) (any, error)

AssignUserToFeature assigns a user to a feature.

func (*ToolHandlers) BrowserCreateTemplate

func (h *ToolHandlers) BrowserCreateTemplate(ctx context.Context, params map[string]any) (any, error)

BrowserCreateTemplate creates a strategic model template via browser automation.

func (*ToolHandlers) ChangeFeatureStatus

func (h *ToolHandlers) ChangeFeatureStatus(ctx context.Context, params map[string]any) (any, error)

ChangeFeatureStatus changes the workflow status of a feature.

func (*ToolHandlers) CreateEpic added in v0.10.0

func (h *ToolHandlers) CreateEpic(ctx context.Context, params map[string]any) (any, error)

CreateEpic creates a new epic in a release.

func (*ToolHandlers) CreateFeature

func (h *ToolHandlers) CreateFeature(ctx context.Context, params map[string]any) (any, error)

CreateFeature creates a new feature.

func (*ToolHandlers) CreateGoal added in v0.10.0

func (h *ToolHandlers) CreateGoal(ctx context.Context, params map[string]any) (any, error)

CreateGoal creates a new goal in a product.

func (*ToolHandlers) CreateIdea added in v0.12.0

func (h *ToolHandlers) CreateIdea(ctx context.Context, params map[string]any) (any, error)

CreateIdea creates a new idea using the GraphQL API.

func (*ToolHandlers) CreateInitiative added in v0.10.0

func (h *ToolHandlers) CreateInitiative(ctx context.Context, params map[string]any) (any, error)

CreateInitiative creates a new initiative in a product.

func (*ToolHandlers) CreateProduct added in v0.10.0

func (h *ToolHandlers) CreateProduct(ctx context.Context, params map[string]any) (any, error)

CreateProduct creates a new product.

func (*ToolHandlers) CreateRelease added in v0.12.0

func (h *ToolHandlers) CreateRelease(ctx context.Context, params map[string]any) (any, error)

CreateRelease creates a new release for a product.

func (*ToolHandlers) CreateRequirement added in v0.10.0

func (h *ToolHandlers) CreateRequirement(ctx context.Context, params map[string]any) (any, error)

CreateRequirement creates a new requirement for a feature.

func (*ToolHandlers) CreateStrategicModel added in v0.10.0

func (h *ToolHandlers) CreateStrategicModel(ctx context.Context, params map[string]any) (any, error)

CreateStrategicModel creates a new strategic model.

func (*ToolHandlers) DeleteComment added in v0.10.0

func (h *ToolHandlers) DeleteComment(ctx context.Context, params map[string]any) (any, error)

DeleteComment deletes a comment.

func (*ToolHandlers) DeleteIdea added in v0.12.0

func (h *ToolHandlers) DeleteIdea(ctx context.Context, params map[string]any) (any, error)

DeleteIdea deletes an idea by ID.

func (*ToolHandlers) DeleteRequirement added in v0.10.0

func (h *ToolHandlers) DeleteRequirement(ctx context.Context, params map[string]any) (any, error)

DeleteRequirement deletes a requirement.

func (*ToolHandlers) DescribeAQL

func (h *ToolHandlers) DescribeAQL(ctx context.Context, params map[string]any) (any, error)

DescribeAQL returns AQL syntax help.

func (*ToolHandlers) GetComment

func (h *ToolHandlers) GetComment(ctx context.Context, params map[string]any) (any, error)

GetComment retrieves a comment by ID.

func (*ToolHandlers) GetCurrentUser added in v0.10.0

func (h *ToolHandlers) GetCurrentUser(ctx context.Context, params map[string]any) (any, error)

GetCurrentUser returns the authenticated user.

func (*ToolHandlers) GetEpic

func (h *ToolHandlers) GetEpic(ctx context.Context, params map[string]any) (any, error)

GetEpic retrieves an epic by ID.

func (*ToolHandlers) GetFeature

func (h *ToolHandlers) GetFeature(ctx context.Context, params map[string]any) (any, error)

GetFeature retrieves a feature by reference number.

func (*ToolHandlers) GetFeatureIdeas added in v0.12.0

func (h *ToolHandlers) GetFeatureIdeas(ctx context.Context, params map[string]any) (any, error)

GetFeatureIdeas lists ideas linked to a feature.

func (*ToolHandlers) GetFeaturesStatistics added in v0.12.0

func (h *ToolHandlers) GetFeaturesStatistics(ctx context.Context, params map[string]any) (any, error)

GetFeaturesStatistics returns aggregated statistics for features from the local cache.

func (*ToolHandlers) GetGoal

func (h *ToolHandlers) GetGoal(ctx context.Context, params map[string]any) (any, error)

GetGoal retrieves a goal by ID.

func (*ToolHandlers) GetIdea

func (h *ToolHandlers) GetIdea(ctx context.Context, params map[string]any) (any, error)

GetIdea retrieves an idea by reference number.

func (*ToolHandlers) GetIdeasStatistics added in v0.12.0

func (h *ToolHandlers) GetIdeasStatistics(ctx context.Context, params map[string]any) (any, error)

GetIdeasStatistics returns aggregated statistics for ideas from the local cache.

func (*ToolHandlers) GetInitiative

func (h *ToolHandlers) GetInitiative(ctx context.Context, params map[string]any) (any, error)

GetInitiative retrieves an initiative by reference number.

func (*ToolHandlers) GetInitiativeWithFeatures added in v0.12.0

func (h *ToolHandlers) GetInitiativeWithFeatures(ctx context.Context, params map[string]any) (any, error)

GetInitiativeWithFeatures retrieves an initiative with all its linked features.

func (*ToolHandlers) GetKeyResult

func (h *ToolHandlers) GetKeyResult(ctx context.Context, params map[string]any) (any, error)

GetKeyResult retrieves a key result by ID.

func (*ToolHandlers) GetPersona

func (h *ToolHandlers) GetPersona(ctx context.Context, params map[string]any) (any, error)

GetPersona retrieves a persona by ID.

func (*ToolHandlers) GetRelease

func (h *ToolHandlers) GetRelease(ctx context.Context, params map[string]any) (any, error)

GetRelease retrieves a release by reference number.

func (*ToolHandlers) GetRequirement

func (h *ToolHandlers) GetRequirement(ctx context.Context, params map[string]any) (any, error)

GetRequirement retrieves a requirement by ID.

func (*ToolHandlers) GetStrategicModel added in v0.10.0

func (h *ToolHandlers) GetStrategicModel(ctx context.Context, params map[string]any) (any, error)

GetStrategicModel retrieves a strategic model by ID.

func (*ToolHandlers) GetTeam

func (h *ToolHandlers) GetTeam(ctx context.Context, params map[string]any) (any, error)

GetTeam retrieves a team by ID.

func (*ToolHandlers) GetUser

func (h *ToolHandlers) GetUser(ctx context.Context, params map[string]any) (any, error)

GetUser retrieves a user by ID.

func (*ToolHandlers) GetVoterDomainHistogram added in v0.12.0

func (h *ToolHandlers) GetVoterDomainHistogram(ctx context.Context, params map[string]any) (any, error)

GetVoterDomainHistogram returns an email-domain histogram of idea voters from the local cache.

func (*ToolHandlers) GetWorkflow

func (h *ToolHandlers) GetWorkflow(ctx context.Context, params map[string]any) (any, error)

GetWorkflow retrieves a workflow by ID.

func (*ToolHandlers) GraphFindPath

func (h *ToolHandlers) GraphFindPath(ctx context.Context, params map[string]any) (any, error)

GraphFindPath finds the shortest path between two entities.

func (*ToolHandlers) GraphInitiativeImpact

func (h *ToolHandlers) GraphInitiativeImpact(ctx context.Context, params map[string]any) (any, error)

GraphInitiativeImpact returns the impact analysis of an initiative.

func (*ToolHandlers) GraphQuery

func (h *ToolHandlers) GraphQuery(ctx context.Context, params map[string]any) (any, error)

GraphQuery executes a Cypher query against Neo4j.

func (*ToolHandlers) GraphReleaseDeps

func (h *ToolHandlers) GraphReleaseDeps(ctx context.Context, params map[string]any) (any, error)

GraphReleaseDeps returns feature dependencies for a release.

func (*ToolHandlers) GraphSearch

func (h *ToolHandlers) GraphSearch(ctx context.Context, params map[string]any) (any, error)

GraphSearch performs full-text search across graph entities.

func (*ToolHandlers) GraphSync

func (h *ToolHandlers) GraphSync(ctx context.Context, params map[string]any) (any, error)

GraphSync syncs data to Neo4j graph database.

func (*ToolHandlers) Init

func (h *ToolHandlers) Init(ctx context.Context) error

Init initializes the handlers with an Aha client.

func (*ToolHandlers) ListCustomFieldDefinitions added in v0.10.0

func (h *ToolHandlers) ListCustomFieldDefinitions(ctx context.Context, params map[string]any) (any, error)

ListCustomFieldDefinitions lists all custom field definitions, optionally filtered by product.

func (*ToolHandlers) ListCustomFieldOptions added in v0.10.0

func (h *ToolHandlers) ListCustomFieldOptions(ctx context.Context, params map[string]any) (any, error)

ListCustomFieldOptions lists options for a select custom field.

func (*ToolHandlers) ListEpicComments added in v0.10.0

func (h *ToolHandlers) ListEpicComments(ctx context.Context, params map[string]any) (any, error)

ListEpicComments lists comments for an epic.

func (*ToolHandlers) ListEpics added in v0.10.0

func (h *ToolHandlers) ListEpics(ctx context.Context, params map[string]any) (any, error)

ListEpics lists epics with optional filtering.

func (*ToolHandlers) ListFeatureComments added in v0.10.0

func (h *ToolHandlers) ListFeatureComments(ctx context.Context, params map[string]any) (any, error)

ListFeatureComments lists comments for a feature.

func (*ToolHandlers) ListFeatureRequirements added in v0.10.0

func (h *ToolHandlers) ListFeatureRequirements(ctx context.Context, params map[string]any) (any, error)

ListFeatureRequirements lists requirements for a specific feature.

func (*ToolHandlers) ListFeatures added in v0.10.0

func (h *ToolHandlers) ListFeatures(ctx context.Context, params map[string]any) (any, error)

ListFeatures lists features with optional filtering.

func (*ToolHandlers) ListFeaturesByReleaseDate added in v0.12.0

func (h *ToolHandlers) ListFeaturesByReleaseDate(ctx context.Context, params map[string]any) (any, error)

ListFeaturesByReleaseDate lists features by release date from the local cache. This tool queries the synced SQLite database, not the live Aha API.

func (*ToolHandlers) ListFeaturesByReleaseName added in v0.12.0

func (h *ToolHandlers) ListFeaturesByReleaseName(ctx context.Context, params map[string]any) (any, error)

ListFeaturesByReleaseName lists features by release name from the local cache. This tool queries the synced SQLite database, not the live Aha API.

func (*ToolHandlers) ListGoals added in v0.10.0

func (h *ToolHandlers) ListGoals(ctx context.Context, params map[string]any) (any, error)

ListGoals lists goals with optional filtering.

func (*ToolHandlers) ListIdeaCategories added in v0.12.0

func (h *ToolHandlers) ListIdeaCategories(ctx context.Context, params map[string]any) (any, error)

ListIdeaCategories lists idea categories for a product.

func (*ToolHandlers) ListIdeaComments added in v0.10.0

func (h *ToolHandlers) ListIdeaComments(ctx context.Context, params map[string]any) (any, error)

ListIdeaComments lists comments for an idea.

func (*ToolHandlers) ListIdeas

func (h *ToolHandlers) ListIdeas(ctx context.Context, params map[string]any) (any, error)

ListIdeas lists ideas with optional filtering and pagination.

func (*ToolHandlers) ListInitiativeFeatures added in v0.12.0

func (h *ToolHandlers) ListInitiativeFeatures(ctx context.Context, params map[string]any) (any, error)

ListInitiativeFeatures lists features linked to a specific initiative.

func (*ToolHandlers) ListInitiatives added in v0.10.0

func (h *ToolHandlers) ListInitiatives(ctx context.Context, params map[string]any) (any, error)

ListInitiatives lists initiatives with optional filtering.

func (*ToolHandlers) ListInitiativesByTag added in v0.12.0

func (h *ToolHandlers) ListInitiativesByTag(ctx context.Context, params map[string]any) (any, error)

ListInitiativesByTag lists initiatives filtered by a tag value from custom fields.

func (*ToolHandlers) ListPredefinedTemplates

func (h *ToolHandlers) ListPredefinedTemplates(ctx context.Context, params map[string]any) (any, error)

ListPredefinedTemplates returns all available strategic model templates.

func (*ToolHandlers) ListProductEpics added in v0.10.0

func (h *ToolHandlers) ListProductEpics(ctx context.Context, params map[string]any) (any, error)

ListProductEpics lists epics for a specific product.

func (*ToolHandlers) ListProductGoals added in v0.10.0

func (h *ToolHandlers) ListProductGoals(ctx context.Context, params map[string]any) (any, error)

ListProductGoals lists goals for a specific product.

func (*ToolHandlers) ListProductInitiatives added in v0.10.0

func (h *ToolHandlers) ListProductInitiatives(ctx context.Context, params map[string]any) (any, error)

ListProductInitiatives lists initiatives for a specific product.

func (*ToolHandlers) ListProductStrategicModels added in v0.10.0

func (h *ToolHandlers) ListProductStrategicModels(ctx context.Context, params map[string]any) (any, error)

ListProductStrategicModels lists strategic models for a product.

func (*ToolHandlers) ListProducts

func (h *ToolHandlers) ListProducts(ctx context.Context, params map[string]any) (any, error)

ListProducts lists all accessible Aha.io products.

func (*ToolHandlers) ListReleaseFeatures added in v0.10.0

func (h *ToolHandlers) ListReleaseFeatures(ctx context.Context, params map[string]any) (any, error)

ListReleaseFeatures lists features for a specific release.

func (*ToolHandlers) ListReleases

func (h *ToolHandlers) ListReleases(ctx context.Context, params map[string]any) (any, error)

ListReleases lists all releases for a product.

func (*ToolHandlers) ListStrategicModels added in v0.10.0

func (h *ToolHandlers) ListStrategicModels(ctx context.Context, params map[string]any) (any, error)

ListStrategicModels lists strategic models.

func (*ToolHandlers) ListUsers added in v0.10.0

func (h *ToolHandlers) ListUsers(ctx context.Context, params map[string]any) (any, error)

ListUsers lists workspace users.

func (*ToolHandlers) ListWorkflowStatuses

func (h *ToolHandlers) ListWorkflowStatuses(ctx context.Context, params map[string]any) (any, error)

ListWorkflowStatuses lists all workflow statuses for a product.

func (*ToolHandlers) Query

func (h *ToolHandlers) Query(ctx context.Context, params map[string]any) (any, error)

Query executes an AQL query and returns results.

func (*ToolHandlers) SearchDocuments

func (h *ToolHandlers) SearchDocuments(ctx context.Context, params map[string]any) (any, error)

SearchDocuments searches for Aha! documents using GraphQL.

func (*ToolHandlers) SetCustomFieldValues added in v0.12.0

func (h *ToolHandlers) SetCustomFieldValues(ctx context.Context, params map[string]any) (any, error)

SetCustomFieldValues sets one or more custom field values on a Feature, Initiative, or Release record. Use list_custom_fields to discover valid keys for a given entity_type, and list_custom_field_options for the valid values of a select/choice field.

func (*ToolHandlers) SyncData added in v0.12.0

func (h *ToolHandlers) SyncData(ctx context.Context, params map[string]any) (any, error)

SyncData syncs Aha data to the local SQLite cache used by the offline query tools (list_features_by_release_date, get_features_statistics, etc.). This blocks until the entire sync completes — for large or detailed syncs, that can take a while (detailed mode makes an additional per-record API call for features and initiatives).

func (*ToolHandlers) UpdateComment added in v0.10.0

func (h *ToolHandlers) UpdateComment(ctx context.Context, params map[string]any) (any, error)

UpdateComment updates an existing comment.

func (*ToolHandlers) UpdateEpic added in v0.10.0

func (h *ToolHandlers) UpdateEpic(ctx context.Context, params map[string]any) (any, error)

UpdateEpic updates an epic's fields.

func (*ToolHandlers) UpdateFeature added in v0.10.0

func (h *ToolHandlers) UpdateFeature(ctx context.Context, params map[string]any) (any, error)

UpdateFeature updates a feature's fields (general update tool).

func (*ToolHandlers) UpdateGoal added in v0.10.0

func (h *ToolHandlers) UpdateGoal(ctx context.Context, params map[string]any) (any, error)

UpdateGoal updates a goal's fields.

func (*ToolHandlers) UpdateIdea added in v0.10.0

func (h *ToolHandlers) UpdateIdea(ctx context.Context, params map[string]any) (any, error)

UpdateIdea updates an idea's fields.

func (*ToolHandlers) UpdateInitiative added in v0.10.0

func (h *ToolHandlers) UpdateInitiative(ctx context.Context, params map[string]any) (any, error)

UpdateInitiative updates an initiative's fields.

func (*ToolHandlers) UpdateProduct added in v0.10.0

func (h *ToolHandlers) UpdateProduct(ctx context.Context, params map[string]any) (any, error)

UpdateProduct updates an existing product.

func (*ToolHandlers) UpdateRelease added in v0.10.0

func (h *ToolHandlers) UpdateRelease(ctx context.Context, params map[string]any) (any, error)

UpdateRelease updates a release's fields.

func (*ToolHandlers) UpdateRequirement added in v0.10.0

func (h *ToolHandlers) UpdateRequirement(ctx context.Context, params map[string]any) (any, error)

UpdateRequirement updates a requirement's fields.

func (*ToolHandlers) UpdateStrategicModel added in v0.10.0

func (h *ToolHandlers) UpdateStrategicModel(ctx context.Context, params map[string]any) (any, error)

UpdateStrategicModel updates a strategic model.

Jump to

Keyboard shortcuts

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