Skip to main content

Named profiles for Claude Code MCP servers and plugins

Project description

claude-code-profiles

Lightweight CLI to manage named profiles for Claude Code — switch which MCP servers and plugins are active without touching your settings.json manually.

How it works

Each profile declares which MCP servers and plugins to enable. When you run ccp <name>, it:

  1. Reads your ~/.claude/settings.json and ~/.claude.json in memory — never writes to them
  2. Builds a filtered MCP config containing only the servers your profile wants
  3. Launches claude with --mcp-config <tmpfile> --strict-mcp-config --settings <tmpfile>
  4. Cleans up the temp files when the session ends

Plugins are controlled via --settings (patches enabledPlugins). MCP servers are controlled via --mcp-config + --strict-mcp-config, which tells Claude Code to use only the servers in the profile and ignore all others.

Your base settings are never modified.

Where MCP definitions come from

ccp discovers MCP server definitions from three sources, in priority order:

  1. ~/.claude.json — user-scope registry (where claude mcp add --scope user writes)
  2. ~/.claude/settings.json mcpServers — directly defined servers
  3. .mcp.json files — scanned walking up from the current directory to home, plus plugin cache and marketplace directories

Note: If you add a new MCP after creating a profile, update the profile to include it — otherwise it will be excluded when the profile is applied.

Requirements

  • Python 3.9+
  • Claude Code installed and configured (~/.claude/settings.json must exist)

Installation

uv tool install claude-code-profiles

To update later:

uv tool upgrade claude-code-profiles

Make sure ~/.local/bin is on your $PATH. If it isn't, add this to your shell config:

export PATH="$PATH:$HOME/.local/bin"

To uninstall:

uv tool uninstall claude-code-profiles

Usage

ccp list              # list available profiles
ccp show <name>       # show profile contents
ccp create <name>     # create a new profile (opens VS Code or nano)
ccp remove <name>     # delete a profile
ccp <name> [args...]  # launch claude with profile applied

Creating a profile

ccp create code

This opens an editor pre-populated with every MCP and plugin discovered from your setup. Remove the ones you don't want, save and close.

Profile structure:

{
  "description": "Code mode — LSPs and GitHub only",
  "enabledMcpjsonServers": ["github", "postgres", "filesystem"],
  "enabledPlugins": [
    "some-plugin@claude-plugins-official"
  ]
}

Anything removed from the lists is disabled when the profile is applied.

Profiles directory

Profiles are stored in ~/.claude/profiles/ by default. Override with:

export CCP_PROFILES_DIR=/path/to/profiles

Example profiles

code — focused coding session:

{
  "description": "Coding — GitHub, LSP, and docs",
  "enabledMcpjsonServers": ["github", "filesystem"],
  "enabledPlugins": [
    "context7@claude-plugins-official"
  ]
}

infra — infrastructure work:

{
  "description": "Infra — Kubernetes, Terraform, PagerDuty",
  "enabledMcpjsonServers": ["kubernetes", "pagerduty", "github"],
  "enabledPlugins": []
}

research — docs and planning:

{
  "description": "Research — notes and web",
  "enabledMcpjsonServers": ["obsidian", "brave-search"],
  "enabledPlugins": [
    "context7@claude-plugins-official"
  ]
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_code_profiles-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_code_profiles-1.0.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file claude_code_profiles-1.0.0.tar.gz.

File metadata

  • Download URL: claude_code_profiles-1.0.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for claude_code_profiles-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cbed2843a83a240ef85f4245520f504ae523323073468952af39dee5775a06ef
MD5 02e0b3a74b1e3b64d00d02c67ca20e3b
BLAKE2b-256 a27a57a8de51d8523b3ca749b0ffbcfbc1ead04426f644931e9a8567b0031abf

See more details on using hashes here.

File details

Details for the file claude_code_profiles-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: claude_code_profiles-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for claude_code_profiles-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcc5e752bfee160e6b11bf15093685ee61800fe801eeffc227ccedacc1f0a80c
MD5 03c0110bed13dcc82ccd79cb705a236e
BLAKE2b-256 a3aa39aa13b03ced47e610d8501470d2636a23e6571fb8c51043768dd15a758c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page