Skip to content
zeeshare.com

writing / FDE and agents

How Claude Code works

How Claude Code worksPart 4

MCP servers and plugins

On this page
  1. MCP: phone lines to other departments
  2. Use it, but check the street sign
  3. Plugins: a ready-packed toolbox
  4. The spec-driven thread
  5. One project, set up step by step
  6. Which one fits?
  7. Your setup so far
  8. Three rules of thumb

In short: Your colleague often needs things from other departments: the ticket from the planning team, the numbers from the database, a look at the live website. An MCP server is a phone line to one of those departments. Use what they say to find things, then check for yourself. A plugin is a ready-packed toolbox: your recipe cards, alarms, specialists and phone lines in one box, so any new project can be set up the same way in one go.

Part 3 covered steering your colleague inside a project. This part is about reaching outside it, and packing up what works so you can take it anywhere.

This series is building towards one thing: a setup that works the way you work, on any project. Each part adds a piece, and ends with a checklist of what you have so far. The project in the examples, the Acme storefront, is made up.

Claude Your project MCP servers Plugins Trust and checks You

MCP: phone lines to other departments

Think of it like this: Each phone line reaches one department, and each department can do a few things for you. The ticket desk can read out a ticket. The records room can look something up. You only install the lines you actually call.

MCP is a common standard for these lines. An MCP server offers Claude a few tools in another system, such as “get this ticket” or “run this read-only query”. Claude calls them when a task needs them.

your project Claude Issue tracker http · remote get_issuelist_comments Browser stdio · local open_pagescreenshot Code graph stdio · local who_callswhat_breaks_if Database read-only role run_selectdescribe_table reads the ticket and its acceptance criteria, then asks the graph what the change touches .mcp.json lists the servers · /mcp shows their status and sign-in
Each MCP server is a phone line to one department. Pick a request to see which lines Claude calls. The servers and tool names are examples.

Some lines are remote: the department is a service on the internet, and you often sign in once. Some are local: a small program on your own computer.

Projectshared in git
File
.mcp.json at the project root
Who
Everyone on the repo
Note
Claude Code asks before using these the first time
Localthe default
File
~/.claude.json
Who
Only you, in this project
Note
For a server you are trying out
Userall your projects
File
~/.claude.json
Who
Only you, everywhere
Note
For tools you use in every repo

Important: Only connect lines you trust. A line that reads things anyone can write, like public web pages or tickets, can carry hidden instructions aimed at Claude. This is called prompt injection. Give lines read-only access where you can, and make Claude ask before anything that writes.

Under the hood: adding and limiting servers
  • Remote servers use HTTP, the recommended kind for hosted services. Local ones use stdio and run as a process on your machine.
  • Add one with claude mcp add. The scope decides who gets it: local (just you, this project, the default), project (shared in .mcp.json) or user (just you, every project).
  • Claude Code asks before it uses a project’s servers for the first time. Run /mcp to see status, sign in or sign out.
  • In .mcp.json, write secrets as ${VAR} so each person’s own environment fills them in.
  • In permission rules, a server’s tool is named mcp__<server>__<tool>. Put write tools under ask.
  • Claude Code warns when one tool result passes 10,000 tokens and cuts results off at 25,000 by default. With tool search, which is on by default, Claude looks up the tools it needs instead of keeping every server’s full list in mind.

Use it, but check the street sign

Think of it like this: A colleague gives you directions from memory. Helpful, but the shop may have moved. You follow the directions, then check the street sign before you walk in.

A tool’s answer can be a guess or out of date. A map of your code may name the file a function lived in last month. So let the tool narrow the search, then have Claude read the real file before it changes anything.

Trust the tool's answer graph: "pay() lives in billing" edit billing/pay.ts wrong file: it moved last week Use it to find, then read graph: "probably billing" grep for pay( read checkout/pay.ts edit the right file A tool's answer can be a guess or out of date. The file on disk is the truth.
Follow the directions, then check the street sign: the tool narrows the search, the real file decides.
Add an MCP server when
  • Claude needs live data from another system: a ticket, an error report, a query result.
  • A tool answers a question far faster than reading files, such as "what calls this?"
  • Claude has to act somewhere else, such as open a page in a browser.
Think twice when
  • You do not know who runs it. A server that fetches outside content can carry prompt injection.
  • It can write to something important. Start read-only, and put write tools under "ask".
  • You will rarely use it. Every server adds to setup and to what Claude has to choose from.

Plugins: a ready-packed toolbox

Think of it like this: Instead of handing each new colleague the fridge rules, the recipe cards, the alarms and the phone list one by one, you hand them one packed toolbox.

A plugin bundles skills, subagents, hooks and MCP servers into one folder that installs as one unit. Its skills carry its name, like /acme-kit:plan-ticket, so two toolboxes never mix up their tools.

acme-kit/ .claude-plugin/plugin.json skills/plan-ticket/SKILL.md agents/spec-reviewer.md hooks/hooks.json .mcp.json one folder, installed as one unit Skill → /acme-kit:plan-ticketnamed after the plugin, so it never clashes Subagent → spec-reviewerClaude can delegate to it Hooks → run at their eventsin every session where it is on MCP server → toolsstarts alongside each session It all runs as you. Read it before you install it.
One packed toolbox, unpacked: the parts you already know from Part 3. The plugin and its files are invented for this post.

Plugins come from marketplaces, which work like an app store: a list of toolboxes and where to get each one. Anthropic’s official one is added for you. Others you add yourself, and you can pin a version so it does not change under you.

Marketplace a catalog in a repo: marketplace.json acme/claude-plugins#v1.0.0 #tag pins a version Plugin acme-kit@acme-plugins /plugin install Your settings: pick a scope user: ~/.claude/settings.json project: .claude/settings.json (commit it; each person still installs once) local: .claude/settings.local.json Third-party marketplaces do not auto-update by default, so a pinned version stays put.
From the app store to your session. The marketplace and plugin names are examples.

Remember: A toolbox you switch on comes to every session, not just the ones where you use it. Its tools take up a little attention every time, and its scripts run as you. Pack it with care, and switch off what you stop using.

Choosing a plugin
  • Read the source, not the install count: its skills, hooks and servers run as you.
  • Prefer narrow plugins that fill one gap over whole methods that compete with yours.
  • Pin the marketplace to a tag, and update on purpose.
  • Check its cost: claude plugin details <name> shows what it adds to every turn.
Watch out for
  • Hooks that also steer your own reviewers or subagents.
  • Plugins that install more plugins in the middle of a task.
  • Plugins you no longer use. The Not used recently list in /plugin shows them; turn them off.
Under the hood: plugin files and commands
  • A plugin is a folder with a manifest at .claude-plugin/plugin.json, plus any of skills/, agents/, hooks/hooks.json and .mcp.json.
  • Add a marketplace with /plugin marketplace add owner/repo; a #tag on the end pins a version. Install with /plugin install name@marketplace.
  • Scopes: user (~/.claude/settings.json), project (.claude/settings.json, committed; each teammate still installs once) and local (.claude/settings.local.json).
  • Third-party marketplaces do not auto-update by default.
  • claude plugin details <name> shows what a plugin adds to every session. The Not used recently list in /plugin helps you find ones to switch off.

The spec-driven thread

Think of it like this: A good colleague works from the written brief, not from what someone half-remembers from a meeting.

This series is heading towards a way of working where a written spec is the source of truth. This part adds two pieces of it:

  • The brief comes in through a phone line. Claude reads the ticket and its acceptance criteria from your tracker before it plans.
  • The method goes out as a toolbox. Once your planning steps, reviewers and alarms work in one project, a plugin gives every project the same ones.

From Part 7, the spec moves to the centre: how to write one, plan from it, build against it and prove the result.

One project, set up step by step

  1. 1 · Connect the tracker for the whole team

    One command writes the server into .mcp.json. The token comes from each person's environment, never from the file.

    claude mcp add --transport http --scope project tracker https://tracker.example.com/mcp
    {
      "mcpServers": {
        "tracker": {
          "type": "http",
          "url": "https://tracker.example.com/mcp",
          "headers": { "Authorization": "Bearer ${TRACKER_TOKEN}" }
        }
      }
    }
  2. 2 · Approve it, sign in, and limit it

    The first time, Claude Code asks before using a project's servers. /mcp shows status and handles sign-in. Writes to the tracker ask first.

    "permissions": {
      "allow": ["mcp__tracker__get_issue", "mcp__tracker__list_comments"],
      "ask":   ["mcp__tracker__create_issue", "mcp__tracker__update_issue"]
    }
  3. 3 · Start from the ticket, not from memory

    The spec comes in through the server, so the plan is built on the real acceptance criteria.

    Read ticket ACME-142 and its comments. List the acceptance
    criteria, then plan. Don't write code yet.
  4. 4 · Add a code graph, and verify what it says

    A local server answers "what does this change touch?" Claude uses it to find files, then reads them before editing.

    claude mcp add --transport stdio --scope project codegraph -- npx -y example-codegraph-mcp ./graph.json
  5. 5 · Package the setup as a plugin

    The team's skills, reviewer, hooks and servers go into one folder with a manifest.

    // acme-kit/.claude-plugin/plugin.json
    {
      "name": "acme-kit",
      "version": "1.0.0",
      "description": "Acme storefront: plan from tickets, review against the spec"
    }
  6. 6 · Share it through a team marketplace

    Add the marketplace pinned to a tag, install at project scope, and commit the settings change. Each teammate runs the install once.

    /plugin marketplace add acme/claude-plugins#v1.0.0
    /plugin install acme-kit@acme-plugins
  7. 7 · Any repo, the same way of working

    A new project gets the kit in one install: the same planning skill, the same reviewer, the same guards. That is the start of the twin this series is building.

Which one fits?

  • Claude needs data from another system: An MCP serverTickets, errors, a database, a browser. Add it with claude mcp add; share it in .mcp.json. Start read-only.
  • We repeat the same procedure: A skillSteps Claude follows when a request matches. No new system involved, so no server needed (Part 3).
  • The whole team should get our setup: A pluginBundle the skills, subagents, hooks and servers, publish it in a marketplace, pin a version, install at project scope.
  • A server's tool must never write: A permission ruleName the tool as mcp__server__tool in deny or ask. Better still, give the server read-only credentials.
  • A plugin looks useful but unknown: Read it firstOpen its details in /plugin, read its hooks and servers, check its context cost, and try it at local scope before the team gets it.
  • It is just for me: Local or user scopeAdd the server or install the plugin for yourself only. Nothing goes into the shared files until it has earned its place.
Under the hood: the full comparison
MCP serverSkillPlugin
Everyday pictureA phone line to a departmentA recipe cardA packed toolbox
What it addsTools in another systemSteps Claude followsA bundle of skills, subagents, hooks and servers
Where it lives.mcp.json or ~/.claude.json.claude/skills/A marketplace, installed into your settings
Costs contextTools are looked up when neededDescription every turn, steps when usedWhat its parts cost, every session it is on
Runs code on your machineLocal servers doOnly through the tools it usesYes: hooks and servers run as you

Your setup so far

your setup so far · parts 1 to 4
  1. Part 1 · where it runsYou know which machine does what, and which folders Claude can reach.
  2. Part 2 · what it remembersOne task per session; forks in their own worktree; subagents for noisy side jobs.
  3. Part 3 · how it behavesCLAUDE.md for what is always true, skills for procedures, hooks for musts, subagents for checks.
  4. Part 4 · what it can reachMCP servers for your tracker and tools, verified before trusted; your setup packaged as one plugin.
  5. Next · Part 5Permissions and safety: what the twin may do without asking, and what it must never do.

Three rules of thumb

Doors, not walls

An MCP server opens one door to one system. Open the ones you use, and start them read-only.

Find with tools, trust files

A tool's answer narrows the search. The file Claude reads is the truth it edits against.

Package what works

When a setup proves itself in one repo, make it a plugin, pin it, and give every repo the same way of working.

QuizA code map tells Claude that applyDiscount() is in billing/discount.ts. What should Claude do before editing?

Show the answer

Answer: Search for the function and read the file it is really in

The map gives directions; the file is the street sign. Reading the actual file is what makes the edit safe.

Words in this post:

  • MCP: a common standard for connecting AI tools to other software.
  • MCP server: one connection that gives Claude a few tools in another system.
  • Prompt injection: hidden instructions in content Claude reads, trying to steer it.
  • Plugin: a folder of skills, subagents, hooks and servers installed as one unit.
  • Marketplace: a list of plugins and where to get each one.

Facts here were checked against the Claude Code documentation on MCP, plugins and installing plugins in November 2026. These features change often, so the docs are the final word for your version.

Next, Part 5: Permissions and safety covers which keys your colleague gets, and which doors stay locked.

Setting up Claude Code or AI agents for your team?

I help teams build this: agents, RAG search and Claude Code setups that hold up in production.

See services
Next in this seriesHow Claude Code worksPermissions and safety5 min read