Claude Code · Advanced · Part 6 of 8

Extending Claude Code: MCP, subagents, plugins, and using it in your editor

Khairul Alam·October 2026·~21 min read
AdvancedMCPSubagentsPluginsVS CodeJetBrainsDesktop

So far Claude Code has worked inside your project folder with the tools it ships with. Real projects also live in issue trackers, databases and monitoring dashboards, and real developers live in editors. This part covers the extension layer: how to connect Claude to outside tools with MCP, how to delegate work to subagents, how to bundle and share setups as plugins, and how Claude Code behaves in VS Code, JetBrains, the desktop app and the web. As before, details come from the official docs and my own advice is marked.

Part 6 in 60 seconds
  • Pick the extension by the problem: always-on rules go in CLAUDE.md, repeatable know-how in a skill, outside systems in MCP, noisy side work in a subagent, shared setups in a plugin.
  • MCP connects Claude to external services. Add a server with claude mcp add, check it with /mcp, and trust only servers you can vouch for.
  • A subagent is a helper with its own context window. It does the reading and returns only a summary, which keeps your main conversation clean.
  • A plugin bundles skills, subagents and MCP servers into one installable unit. Install with /plugin, and read what it adds first.
  • The terminal, VS Code, JetBrains, desktop app and web all run the same engine, with different strengths.

1. Which extension for which problem?

The official guide to extending Claude Code makes a useful point: you do not need to configure everything up front. Each feature has a recognisable trigger, and most teams add them in roughly this order:

You notice…Add…
Claude gets a convention or command wrong twiceA line in CLAUDE.md
You keep asking Claude to be shorter or answer in the same formatAn output style
You paste the same playbook into chat for the third timeA skill
You keep copying data from a browser tab Claude cannot seeAn MCP server for that system
Claude reads many files to find where a symbol is definedA code intelligence plugin for your language
A side task floods your conversation with output you will not reuseA subagent
A second repository needs the same setupA plugin

And this is how the main ones differ in what they cost your context window, which connects back to Part 3:

FeatureGood forWhen it loadsContext cost
CLAUDE.md“Always do X” rules, project conventionsEvery sessionEvery request
SkillReusable knowledge and workflowsDescription at start; full text when usedLow until used
MCP serverExternal data or actionsTool names at start; full details on demandLow until a tool is used
SubagentContext isolation, parallel or specialised workWhen spawnedIsolated from your main session

They also combine. The docs give examples: MCP provides the connection while a skill teaches Claude how to use it well (for instance, MCP connects to your database and a skill documents your schema and query patterns); CLAUDE.md holds the always-on rules while skills hold the reference material loaded on demand; and a skill can spawn subagents for parallel work. For the rest of this post I will skip automation scripts that run on events (the series leaves those out) and focus on the four tools above.

Claude Codethe agentic loop CLAUDE.mdalways-on rules Skillsknow-how on demand MCP serversoutside systems Subagentsisolated helpers Pluginspackage the rest
Each extension solves a different problem. Plugins are the packaging layer on top.

2. MCP: connecting Claude to outside tools

The Model Context Protocol (MCP) is, in the docs' words, “an open source standard for AI-tool integrations.” In plain terms: an MCP server is a small program or web service that offers Claude a set of tools for one outside system, such as an issue tracker, a design tool, a monitoring service or a database. Once connected, you can say things like these (the official examples):

Add the feature described in JIRA issue ENG-4521 and create a PR on GitHub.
Check Sentry and Statsig to check the usage of the feature described in ENG-4521.
Find emails of 10 random users who used feature ENG-4521, based on our PostgreSQL database.
Think of it like a power strip with standard sockets

Without a standard, every tool needs its own custom cable. MCP is the standard socket: any service that offers an MCP server can be plugged into Claude Code the same way, and the server handles the connection and sign-in details.

Adding a server

There are different ways a server can be reached. HTTP is the recommended one for remote servers; stdio runs a program on your own machine; SSE is deprecated in favour of HTTP.

# Remote server over HTTP (recommended for remote)
claude mcp add --transport http notion https://mcp.notion.com/mcp

# Remote server that needs a token header
claude mcp add --transport http secure-api https://api.example.com/mcp \
  --header "Authorization: Bearer your-token"

# Local program over stdio. The -- separates Claude's flags from the server command
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
  -- npx -y airtable-mcp-server
Claude Codeasks for a tool MCP serverHTTP (remote) MCP serverHTTP (remote) MCP serverstdio (local) Issue tracker Monitoring Database You decide which servers to trust; the server does the work.
Claude asks for a tool by name. The MCP server turns that into a call to the real system.

Where the configuration lives

Add --scope (or -s) to choose who gets the server:

ScopeAvailable inShared with team?Stored in
local (default)This project, for youNoYour ~/.claude.json
projectThis project, for everyoneYes, through version control.mcp.json in the project root
userAll your projectsNoYour ~/.claude.json

When the same server name exists at several levels, local wins over project, and project over user. Claude Code asks you to approve servers from a project's .mcp.json before using them, which protects you from servers a teammate (or a stranger's repository) committed.

Managing and signing in

claude mcp list            # all servers, with health status
claude mcp get notion      # details for one server
claude mcp remove notion   # remove it (also deletes stored sign-in tokens)

# Inside a session
/mcp                       # check status, sign in, reconnect, toggle

For servers that use OAuth sign-in, add the server, run /mcp in a session, and follow the browser steps. Tokens are stored and refreshed automatically. From a shell, claude mcp login <name> does the same. Non-interactive runs (claude -p) cannot do the OAuth step, so sign in interactively first.

Safety and cost

Trust each server before you connect it
  • The docs warn: verify you trust each server. Servers that fetch external content can expose you to prompt injection, where text in a web page or ticket tries to give Claude instructions.
  • Anthropic reviews connectors in its directory but does not security-audit or manage any MCP server. Prefer servers you wrote or that come from providers you trust.
  • Use a read-only database user for database servers (the docs' own example connects as a user named readonly).
  • You can set Claude Code permissions for MCP tools, just like built-in ones.

3. Subagents: helpers with their own context

The best-practices guide says context is your fundamental constraint, and subagents are the main tool for protecting it. The docs define them like this: a subagent is a specialised assistant you use when a side task would flood your main conversation with search results, logs or file contents you will not reference again. It does the work in its own context window and returns only the summary.

Without a subagent Your conversation also holdsevery file read and every log line window fills quickly With a subagent Subagentreads 40 filesin its own window Summarycomes back your window barely grows Also good for• independent review of a diff by a fresh context • parallel research • cheaper models for easy workSubagent requests still count toward your usage limits.
Illustrative. The saving is in your main window; the subagent still uses tokens of its own.

Built-in subagents

SubagentWhat it is for
ExploreRead-only file discovery and code search, with thoroughness levels quick, medium and very thorough. It skips CLAUDE.md and git status for speed.
PlanRead-only research while in plan mode.
General-purposeComplex multi-step tasks that need both exploration and action.

Claude uses these on its own when it makes sense, and you can ask directly:

Use subagents to investigate how our authentication system handles token
refresh, and whether we have any existing OAuth utilities I should reuse.

use a subagent to investigate how our auth system handles token refresh

Making your own

A custom subagent is a markdown file with a short header. Put it in .claude/agents/ to share it with your project, or in ~/.claude/agents/ to use it everywhere. Only name and description are required. This is the docs' own example:

.claude/agents/code-reviewer.md
---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep
model: sonnet
---

You are a code reviewer. When invoked, analyze the code and provide
specific, actionable feedback on quality, security, and best practices.

Good to know

4. Plugins: bundle and share a setup

A plugin packages skills, subagents, MCP servers (and other pieces) into a single installable unit. A marketplace is a catalogue of plugins. Use plugins when you want the same setup across repositories or to share it with others. Plugin skills are namespaced like /commit-commands:commit so several plugins can coexist.

Skim this section if you work alone on one project: you can get far with CLAUDE.md, skills and a couple of MCP servers. Plugins matter most when you maintain the same setup in several places.

  1. Open the browser. Run /plugin in a session. It opens a panel with a Discover tab listing plugins from your marketplaces.
    /plugin
  2. Or install one by name. This example from the docs adds commands for committing, pushing and opening pull requests; it opens the plugin's details so you can review it first.
    /plugin install commit-commands@claude-plugins-official
  3. Read what it adds. The details pane lists the skills, agents and servers it installs, and for plugins in Anthropic's official marketplace it shows token estimates: one for every turn and one for when its skills are invoked.
  4. Choose a scope. User (every project on this machine), project (everyone on the repository, recorded in the committed .claude/settings.json) or local (you, this repository only).
  5. Check it worked. Type / and look for /<plugin>:<skill>, or run claude plugin list in your shell.
TaskCommand
Add a marketplace (GitHub repo, git URL, local folder or hosted file)/plugin marketplace add owner/repo
Install from your shellclaude plugin install formatter@your-org --scope project
Turn off or removeclaude plugin disable name@marketplace, claude plugin uninstall name@marketplace
Update one pluginclaude plugin update name@marketplace
See what a plugin costs youclaude plugin details <name>: the “Always-on” line is tokens added to every session.
Read before you install
  • The docs warn that a plugin can run code and MCP servers, so read its details pane first and see the plugin security page for marketplaces you do not know.
  • Committing a project-scope plugin turns it on for teammates but does not download it for them; each runs claude plugin install <name>@<marketplace> --scope project once.
  • Plugins you no longer use still add startup and context cost. The Installed tab shows a “Not used recently” group so you can prune.
  • If you work in a typed language, a code intelligence plugin gives Claude precise “go to definition” and “find references” and reports type errors after edits, which can replace broad file reads.

5. Your editor, desktop app or browser

The agentic loop, tools and settings are the same everywhere. What changes is where the code runs and how you interact with it. In the official words, each surface connects to the same Claude Code engine, so your repository's CLAUDE.md, settings and MCP servers work across all of them.

VS Code (and Cursor)

JetBrains IDEs (IntelliJ, PyCharm, Android Studio and more)

The desktop app

Claude Code on the web (cloud sessions)

6. Choosing a surface

SurfaceRuns onChoose it when…
Terminal (CLI)Your machineYou want every feature, scripting, and the fullest control.
VS Code / CursorYour machineYou live in the editor and want inline diffs, @-mentions with line ranges and plan review.
JetBrains / Android StudioYour machineYou use a JetBrains IDE and want diffs in the IDE diff viewer and shared selection.
Desktop appYour machine, or cloud, SSH, WSLYou prefer a graphical app, visual diffs, parallel sessions or scheduled tasks, without a terminal.
Web / cloudAnthropic-managed VMsYou want long tasks to continue while your laptop is off, or to start work from your phone.

You can mix them. Because the extension and CLI share history and the engine is identical, a common pattern is to explore in the editor, run a heavy job in the cloud, and teleport the result back to the terminal to finish. My own advice: pick one surface and get fluent in it first; extra surfaces are easy to add later.

7. Wrap-up and glossary

  1. Add extensions when a recurring problem appears, not before.
  2. MCP connects outside systems; trust servers carefully, and prefer a CLI tool when one exists.
  3. Subagents protect your main context and can use cheaper models.
  4. Plugins package and share a setup; read what they add and prune the ones you do not use.
  5. The surface changes how you interact, not what Claude can do.

Part 7 moves from one developer to many: running Claude Code in scripts and CI, and setting it up for a team or organisation.

TermIn plain words
MCPModel Context Protocol, an open standard for connecting AI tools to outside systems.
MCP serverA program or service that offers Claude a set of tools for one outside system.
TransportHow Claude reaches an MCP server: HTTP for remote, stdio for a local program.
Prompt injectionHidden instructions in content (a web page, a ticket) that try to steer an AI.
SubagentA helper with its own context window that returns only a summary.
Plugin / marketplaceA bundle of skills, agents and servers, and a catalogue of such bundles.
Cloud sessionA Claude Code session running on cloud infrastructure instead of your computer.
TeleportPulling a cloud session and its branch into your terminal.
← Back to all writing