Skip to content

Comments

feat: [AG-116] MCP profiles#16

Merged
ShawkyZ merged 9 commits intomainfrom
feat/mcp-profiles
Feb 3, 2026
Merged

feat: [AG-116] MCP profiles#16
ShawkyZ merged 9 commits intomainfrom
feat/mcp-profiles

Conversation

@ShawkyZ
Copy link
Contributor

@ShawkyZ ShawkyZ commented Jan 29, 2026

Description

Summary

  • Adds MCP tool profiles feature allowing users to select which tools are registered based on their use case
  • Profiles can be configured via CLI flag (--profile=<lite|full|experimental>) or environment variable (SNYK_MCP_PROFILE)
  • Three profiles are available: lite (essential tools), full (default, all non-experimental), and experimental (all tools including experimental)

Motivation

Currently, all MCP tools are always registered when the server starts. This change allows users to:

  • Reduce tool noise by using a minimal set of essential tools (lite profile)
  • Access experimental features by opting into the experimental profile
  • Have a sensible default that excludes unstable experimental tools (full profile)

Changes

New Files

  • internal/mcp/profiles.go - Profile types, constants, parsing, and tool filtering logic
  • internal/mcp/profiles_test.go - Comprehensive tests for profile functionality

Modified Files

  • internal/mcp/tools.go - Added Profiles field to SnykMcpToolsDefinition struct; updated addSnykTools() to filter by profile
  • internal/mcp/snyk_tools.json - Added profiles array to each tool definition
  • internal/mcp/llm_binding.go - Get profile from configuration and pass to addSnykTools()
  • internal/mcp/tools_test.go - Updated existing tests and added profile integration tests
  • pkg/mcp/main.go - Added --profile CLI flag

Profile Assignments

Profile Tools Included
lite snyk_auth, snyk_sca_scan, snyk_code_scan, snyk_version, snyk_logout, snyk_trust, snyk_send_feedback
full (default) All lite tools + snyk_container_scan, snyk_iac_scan, snyk_sbom_scan, snyk_aibom
experimental All full tools + snyk_package_health

Usage

# Use lite profile via CLI flag and locally installed CLI
snyk mcp -t stdio --profile=lite

# Use lite profile via CLI flag and npx
npx -y snyk@latest mcp -t stdio --profile=lite


# Use experimental profile via environment variable
SNYK_MCP_PROFILE=experimental snyk mcp -t stdio

# Default is 'full' profile
snyk mcp -t stdio

Checklist

  • Tests added and all succeed
  • Regenerated mocks, etc. (make generate)
  • Linted (make lint-fix)
  • README.md updated, if user-facing
  • License file updated, if new 3rd-party dependency is introduced

@ShawkyZ ShawkyZ requested a review from a team as a code owner January 29, 2026 14:46
@ShawkyZ ShawkyZ changed the title feat: [AG-116] MCP profile feat: [AG-116] MCP profiles Jan 29, 2026
// - ProfileLite: only tools explicitly marked with "lite" in their profiles
// - ProfileExperimental: all tools (includes everything)
// - ProfileFull (default): all tools except those marked as experimental-only
func IsToolInProfile(toolDef SnykMcpToolsDefinition, profile Profile) bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of tagging the tools, what if we had this as a profile level. Lite = Lite only. Full = Full + Lite. Experimental = Experimental + Full + Lite.

It could make this function clearer. It also makes it more consistent were each tool gets a profile level. Right now its a bit weird how "experimental" picks up the others, but "full" doesn't and has to be explicitly set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking of changing this to always explicitly set the profile where a tool should show up.

Copy link
Contributor

@ifeanyiecheruo ifeanyiecheruo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once small non-blocking comment to not hard-code the list of profiles in an error message

@ShawkyZ ShawkyZ merged commit 46cb0e1 into main Feb 3, 2026
8 checks passed
@ShawkyZ ShawkyZ deleted the feat/mcp-profiles branch February 3, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants