Skip to main content

MCP Tools Reference

Complete reference for all MCP (Model Context Protocol) tools exposed by SCM's MCP server.

Overview

SCM runs as an MCP server, exposing tools that AI assistants can use to manage context, bundles, profiles, and remotes. These tools enable seamless integration with Claude Code, Cursor, and other MCP-compatible clients.

Fragment Tools

list_fragments

List available local context fragments with their tags and source locations.

Parameters:

NameTypeRequiredDescription
querystringNoText search on name
tagsstring[]NoFilter by tags
sort_bystringNoSort field: name or source (default: name)
sort_orderstringNoasc or desc (default: asc)

Example:

{
"tool": "list_fragments",
"arguments": {
"tags": ["golang", "testing"],
"sort_by": "name"
}
}

get_fragment

Get a local fragment's content by name.

Parameters:

NameTypeRequiredDescription
namestringYesFragment name (without extension)

Example:

{
"tool": "get_fragment",
"arguments": {
"name": "go-testing"
}
}

create_fragment

Create a new context fragment.

Parameters:

NameTypeRequiredDescription
namestringYesFragment name (without extension)
contentstringYesFragment content (markdown)
tagsstring[]NoTags for the fragment
versionstringNoVersion string (default: 1.0)

delete_fragment

Delete a local context fragment.

Parameters:

NameTypeRequiredDescription
namestringYesFragment name to delete

Profile Tools

list_profiles

List all configured profiles with their descriptions.

Parameters:

NameTypeRequiredDescription
querystringNoText search on name or description
sort_bystringNoSort field: name or default (default: name)
sort_orderstringNoasc or desc (default: asc)

get_profile

Get a profile's configuration including fragments, tags, and variables.

Parameters:

NameTypeRequiredDescription
namestringYesProfile name

create_profile

Create a new profile with bundles, tags, and/or parent profiles.

Parameters:

NameTypeRequiredDescription
namestringYesProfile name
descriptionstringNoProfile description
bundlesstring[]NoBundle references to include
tagsstring[]NoTags to include fragments by
parentsstring[]NoParent profiles to inherit from
defaultbooleanNoSet as default profile
exclude_fragmentsstring[]NoFragment names to exclude
exclude_promptsstring[]NoPrompt names to exclude
exclude_mcpstring[]NoMCP server names to exclude

Example:

{
"tool": "create_profile",
"arguments": {
"name": "my-golang-profile",
"description": "Go development with testing focus",
"bundles": ["go-development", "testing"],
"parents": ["base-developer"],
"exclude_fragments": ["verbose-logging"],
"default": true
}
}

update_profile

Update an existing profile by adding/removing bundles, tags, or parents.

Parameters:

NameTypeRequiredDescription
namestringYesProfile name to update
descriptionstringNoNew description
add_bundlesstring[]NoBundles to add
remove_bundlesstring[]NoBundles to remove
add_tagsstring[]NoTags to add
remove_tagsstring[]NoTags to remove
add_parentsstring[]NoParent profiles to add
remove_parentsstring[]NoParent profiles to remove
defaultbooleanNoSet as default profile
add_exclude_fragmentsstring[]NoAdd fragments to exclusion list
remove_exclude_fragmentsstring[]NoRemove fragments from exclusion list
add_exclude_promptsstring[]NoAdd prompts to exclusion list
remove_exclude_promptsstring[]NoRemove prompts from exclusion list
add_exclude_mcpstring[]NoAdd MCP servers to exclusion list
remove_exclude_mcpstring[]NoRemove MCP servers from exclusion list

delete_profile

Delete a profile.

Parameters:

NameTypeRequiredDescription
namestringYesProfile name to delete

Prompt Tools

list_prompts

List saved prompts.

Parameters:

NameTypeRequiredDescription
querystringNoText search on name
sort_bystringNoSort field: name (default: name)
sort_orderstringNoasc or desc (default: asc)

get_prompt

Get a saved prompt's content by name.

Parameters:

NameTypeRequiredDescription
namestringYesPrompt name (without extension)

Context Assembly

assemble_context

Assemble context from a profile, fragments, and/or tags. Returns the combined context that would be sent to an AI.

Parameters:

NameTypeRequiredDescription
profilestringNoProfile name to use
bundlesstring[]NoAdditional fragment names to include
tagsstring[]NoInclude all fragments with these tags

Example:

{
"tool": "assemble_context",
"arguments": {
"profile": "developer",
"bundles": ["security"],
"tags": ["best-practices"]
}
}

search_content

Search across all SCM content types (fragments, prompts, profiles, MCP servers).

Parameters:

NameTypeRequiredDescription
querystringYesSearch text (matches name, description, tags)
typesstring[]NoContent types: fragment, prompt, profile, mcp_server
tagsstring[]NoFilter by tags (fragments only)
sort_bystringNoSort: name, type, or relevance (default: relevance)
sort_orderstringNoasc or desc (default: asc)
limitintegerNoMaximum results (default: 50)

Example:

{
"tool": "search_content",
"arguments": {
"query": "testing",
"types": ["fragment", "prompt"],
"limit": 10
}
}

Remote Tools

list_remotes

List configured remote sources for fragments and prompts.

Parameters: None

discover_remotes

Search GitHub/GitLab for SCM repositories containing fragments and prompts.

Parameters:

NameTypeRequiredDescription
querystringNoOptional search term to filter repositories
sourcestringNoWhich forge: github, gitlab, or all (default: all)
min_starsintegerNoMinimum star count filter (default: 0)

Example:

{
"tool": "discover_remotes",
"arguments": {
"query": "golang",
"source": "github",
"min_stars": 10
}
}

browse_remote

List items (fragments, prompts, profiles) available in a remote repository.

Parameters:

NameTypeRequiredDescription
remotestringYesRemote name (from list_remotes)
item_typestringNoType: fragment, prompt, or profile (default: all)
pathstringNoSubdirectory path to browse

preview_remote

Preview content of a remote item before pulling. Returns a pull_token for confirm_pull.

Parameters:

NameTypeRequiredDescription
referencestringYesRemote reference (e.g., github/general/tdd or github/security@v1.0.0)
item_typestringYesType: fragment, prompt, or profile

confirm_pull

Install a previously previewed item using the pull_token from preview_remote.

Parameters:

NameTypeRequiredDescription
pull_tokenstringYesToken from preview_remote response

add_remote

Register a new remote source for fragments and prompts.

Parameters:

NameTypeRequiredDescription
namestringYesShort name for the remote (e.g., alice)
urlstringYesRepository URL (e.g., alice/scm or https://github.com/alice/scm)

remove_remote

Remove a registered remote source.

Parameters:

NameTypeRequiredDescription
namestringYesRemote name to remove

MCP Server Management

list_mcp_servers

List configured MCP servers.

Parameters:

NameTypeRequiredDescription
querystringNoText search on name or command
sort_bystringNoSort: name or command (default: name)
sort_orderstringNoasc or desc (default: asc)

add_mcp_server

Add an MCP server to the configuration.

Parameters:

NameTypeRequiredDescription
namestringYesServer name (unique identifier)
commandstringYesCommand to run the MCP server
argsstring[]NoCommand arguments
backendstringNoBackend: unified, claude-code, or gemini (default: unified)

Example:

{
"tool": "add_mcp_server",
"arguments": {
"name": "tree-sitter",
"command": "npx",
"args": ["tree-sitter-mcp", "--stdio"],
"backend": "claude-code"
}
}

remove_mcp_server

Remove an MCP server from the configuration.

Parameters:

NameTypeRequiredDescription
namestringYesServer name to remove
backendstringNoBackend to remove from: unified, claude-code, or gemini (default: all)

set_mcp_auto_register

Enable or disable auto-registration of SCM's own MCP server.

Parameters:

NameTypeRequiredDescription
enabledbooleanYesWhether to auto-register SCM's MCP server

Dependency Management

sync_dependencies

Sync remote bundles and profiles referenced in config. Automatically fetches missing dependencies, updates lockfile, and applies hooks.

Parameters:

NameTypeRequiredDescription
profilesstring[]NoSpecific profiles to sync (default: all)
forcebooleanNoRe-pull even if already installed (default: false)
lockbooleanNoUpdate lockfile after sync (default: true)
apply_hooksbooleanNoApply hooks after sync (default: true)

lock_dependencies

Generate a lockfile from currently installed remote items for reproducible installations.

Parameters: None

install_dependencies

Install all items from the lockfile.

Parameters:

NameTypeRequiredDescription
forcebooleanNoSkip confirmation prompts (default: false)

check_outdated

Check if any locked items have newer versions available.

Parameters: None

check_missing_dependencies

Check which remote dependencies are not installed locally.

Parameters:

NameTypeRequiredDescription
profilesstring[]NoSpecific profiles to check (default: all)

Hooks

apply_hooks

Apply/reapply SCM hooks to backend configuration files (.claude/settings.json, .gemini/settings.json).

Parameters:

NameTypeRequiredDescription
backendstringNoBackend: claude-code, gemini, or all (default: all)
regenerate_contextbooleanNoAlso regenerate the context file (default: true)

Using MCP Tools

With Claude Code

Claude Code automatically discovers SCM tools when SCM is configured as an MCP server. You can invoke them naturally:

"List all my fragments"
→ Uses list_fragments

"Find SCM repositories about Python"
→ Uses discover_remotes with query "python"

"Create a new profile called web-dev with the security bundle"
→ Uses create_profile

Programmatic Access

Tools can be called directly via the MCP protocol:

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_fragments",
"arguments": {
"tags": ["golang"]
}
}
}

Error Handling

All tools return errors in the standard MCP format:

{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "Invalid params: name is required"
}
}