# Install & Configure: Extend Claude Code with the v2 Plugin System
## What This Is
The Claude Code AI assistant can now be extended with a new plugin system. This lets developers add new abilities, commands, and connections to other services, making the AI more powerful and tailored to specific team needs.
Source: https://github.com/anthropics-claude/claude-code/blob/main/CHANGELOG.md
## Before You Start
Scan my workspace and analyze:
- The project language, framework, and directory structure
- Existing agent configuration (check for .claude/, .codex/, CLAUDE.md, settings.json, commands/, skills/ directories)
Then ask me before proceeding:
1. Do I need to configure any service credentials for this plugin (database, API keys, etc.)?
2. Should this be project-scoped or global?
## Fetch the Source
Fetch the raw file content from GitHub:
```bash
curl -sL "https://raw.githubusercontent.com/anthropics-claude/claude-code/main/CHANGELOG.md"
```
## What to Implement
This is an **Agent Plugin** — typically an MCP server or capability bundle.
- Install any required npm/pip packages from the source repository
- Register the MCP server in `.claude/settings.json` under the `mcpServers` key with the correct command and args
- Configure any required environment variables or credentials
- Verify the server starts correctly by checking its expected output
## Additional Context
- Verify the user's `claude-code` installation is version 2.0.12 or newer. If an older version is detected, provide instructions to update the native binary or VS Code extension.
- Scan the project's `CLAUDE.md` or a global configuration file for an `extraKnownMarketplaces` entry. If found, query the specified URL for a list of team-approved plugins. Otherwise, prompt the user for a public plugin name or marketplace URL.
- Execute the appropriate `/plugin install <plugin_name>` command to add the selected plugin. After installation, use the `/plugin enable <plugin_name>` command and check for any required configuration steps in the plugin's documentation.
## Reference Implementation
```
# Add a private plugin marketplace for your team
# In your CLAUDE.md or settings file:
extraKnownMarketplaces:
- https://internal-repo.my-company.com/claude-plugins
# Manage plugins from the command line
/plugin marketplace # List available plugins
/plugin install my-plugin # Install a plugin
/plugin enable my-plugin # Enable it for the current session
/plugin disable my-plugin # Disable it
/plugin validate # Check plugin configuration
```
## Guidelines
- Adapt everything to my existing project — do not assume a specific stack or directory layout
- Review any fetched code for safety before installing or executing it
- After setup, run a quick verification and show me a summary of exactly what was installed, where, and how to use it