mcp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package mcp provides MCP (Model Context Protocol) server functionality for AI integration.

Index

Constants

This section is empty.

Variables

View Source
var Assistants = []Assistant{
	{
		Name: "Claude Desktop",
		ID:   "claude-desktop",
		ConfigPaths: map[string]string{
			"darwin":  "~/Library/Application Support/Claude/claude_desktop_config.json",
			"linux":   "~/.config/Claude/claude_desktop_config.json",
			"windows": "%APPDATA%\\Claude\\claude_desktop_config.json",
		},
		AppPaths: map[string]string{
			"darwin":  "/Applications/Claude.app",
			"linux":   "",
			"windows": "",
		},
	},
	{
		Name: "Claude Code",
		ID:   "claude-code",
		ConfigPaths: map[string]string{
			"darwin":  "~/.claude.json",
			"linux":   "~/.claude.json",
			"windows": "%USERPROFILE%\\.claude.json",
		},
		AppPaths: map[string]string{
			"darwin":  "",
			"linux":   "",
			"windows": "",
		},
	},
	{
		Name: "Cursor",
		ID:   "cursor",
		ConfigPaths: map[string]string{
			"darwin":  "~/.cursor/mcp.json",
			"linux":   "~/.cursor/mcp.json",
			"windows": "%USERPROFILE%\\.cursor\\mcp.json",
		},
		AppPaths: map[string]string{
			"darwin":  "/Applications/Cursor.app",
			"linux":   "",
			"windows": "",
		},
	},
	{
		Name: "Windsurf",
		ID:   "windsurf",
		ConfigPaths: map[string]string{
			"darwin":  "~/.codeium/windsurf/mcp_config.json",
			"linux":   "~/.codeium/windsurf/mcp_config.json",
			"windows": "%USERPROFILE%\\.codeium\\windsurf\\mcp_config.json",
		},
		AppPaths: map[string]string{
			"darwin":  "/Applications/Windsurf.app",
			"linux":   "",
			"windows": "",
		},
	},
	{
		Name: "VS Code",
		ID:   "vscode",
		ConfigPaths: map[string]string{
			"darwin":  ".vscode/mcp.json",
			"linux":   ".vscode/mcp.json",
			"windows": ".vscode\\mcp.json",
		},
		AppPaths: map[string]string{
			"darwin":  "/Applications/Visual Studio Code.app",
			"linux":   "",
			"windows": "",
		},
	},
}

Assistants is the list of supported AI assistants.

Functions

func NewMCPCmd

func NewMCPCmd() *cobra.Command

NewMCPCmd creates the mcp command with all subcommands.

Types

type Assistant

type Assistant struct {
	Name        string            // Display name
	ID          string            // Identifier (claude-desktop, cursor, etc.)
	ConfigPaths map[string]string // OS -> config path template
	AppPaths    map[string]string // OS -> app path (to check if installed)
}

Assistant represents an AI assistant that supports MCP.

func GetAssistantByID

func GetAssistantByID(id string) *Assistant

GetAssistantByID returns an assistant by ID.

func (Assistant) GetConfigPath

func (a Assistant) GetConfigPath() string

GetConfigPath returns the config path for the current OS.

func (Assistant) IsConfigured

func (a Assistant) IsConfigured() bool

IsConfigured checks if Nylas MCP is already configured for this assistant.

func (Assistant) IsInstalled

func (a Assistant) IsInstalled() bool

IsInstalled checks if the AI assistant application is installed.

func (Assistant) IsProjectConfig

func (a Assistant) IsProjectConfig() bool

IsProjectConfig returns true if the config is project-specific (not global).

Jump to

Keyboard shortcuts

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