Add public API for MCP server installation#122
Merged
Conversation
Introduces pkg/mcpinstall package that allows external projects to install MCP server configurations for various AI coding assistants. The API provides: - InstallForClient() function with configurable ServerName, Command, and Args - Client type constants (Cursor, ClaudeCode, VSCode, etc.) - Options struct for installation configuration Refactors internal implementation to separate generic InstallMCPForClient() from Tiger-specific installTigerMCPForClient() wrapper. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
nathanjcochran
approved these changes
Dec 4, 2025
Member
nathanjcochran
left a comment
There was a problem hiding this comment.
LGTM! Left a handful of minor comments/questions/suggestions, but overall looks good 👍
internal/tiger/cmd/mcp_install.go
Outdated
| // InstallMCPForClient installs an MCP server configuration for the specified client. | ||
| // This is a generic, configurable function exported for use by external projects via pkg/mcpinstall. | ||
| // Required options: ServerName, Command, Args must all be provided. | ||
| func InstallMCPForClient(clientName string, opts InstallOptions) error { |
Member
There was a problem hiding this comment.
Any reason not to include ClientName in the InstallOptions struct, instead of it being a separate parameter? Especially since there are already other required fields in InstallOptions, so callers will have to provide it regardless.
- Fix VSCode buildInstallCommand to marshal entire JSON struct including name, command, and args (not just args) - Fix InstallOptions comments to say "(required)" instead of incorrect "(default: ...)" mentions - Simplify tests to pass "tiger" string directly instead of roundabout getTigerExecutablePath() calls - Remove unused Client type and constants from public package since InstallForClient takes clientName string, not Client type 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Per PR review feedback, move clientName from a separate function parameter into the InstallOptions struct. This keeps all configuration in one place. - Add ClientName field to InstallOptions (required) - Change InstallMCPForClient signature from (clientName, opts) to just (opts) - Rename public API function from InstallForClient to Install - Reorder struct fields to group required fields together 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add ClientInfo struct and SupportedClients() function to expose available MCP clients. This allows external users to discover valid values for Options.ClientName. ClientInfo contains: - Name: Human-readable display name (e.g., "Claude Code") - ClientName: Identifier for Options.ClientName (e.g., "claude-code") 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pkg/mcpinstallpackage that allows external projects to install MCP server configurations for various AI coding assistantsInstallForClient()function with configurableServerName,Command, andArgsClienttype constants (Cursor,ClaudeCode,VSCode, etc.) for type-safe client selectionInstallMCPForClient()from Tiger-specificinstallTigerMCPForClient()wrapperExample Usage
🤖 Generated with Claude Code