> ## Documentation Index
> Fetch the complete documentation index at: https://agentic.proxify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Wiring

> How MCP connections compose with CLAUDE.md, skills, and hooks — the opinion layer on top of the official docs.

<Tip>**Official reference** — For installation, transports, scoping, and the server registry, see the [official MCP docs](https://code.claude.com/docs/en/mcp). This page is about making MCP connections work *with* your CLAUDE.md, skills, and hooks.</Tip>

MCP is the "reach" layer. Your other setup layers give Claude context, knowledge, and guardrails — MCP gives Claude hands. Without it, Claude reasons about your project but can't touch anything outside the repo. With it, the other layers guide *how* Claude uses that reach.

This page covers [composition patterns](#composition-patterns), [scoping strategy](#scoping-strategy), and [next steps](#next-steps). For how all four layers fit together, see [Context Distribution](/patterns/distribution).

## Composition Patterns

<AccordionGroup>
  <Accordion title="MCP + CLAUDE.md — Directing Reach">
    [CLAUDE.md](/setup/claude-md) tells Claude *when* to use which MCP connection and in what order. Without it, Claude has access but no workflow.

    ```markdown theme={null}
    # In your CLAUDE.md

    ## Workflow
    - Check Linear for requirements before implementing any feature
    - Always query the staging database, never production
    - When creating PRs, link the Linear ticket in the description
    ```

    Three lines transform MCP from "Claude can access Linear" to "Claude reads the ticket, implements against the spec, and links the ticket when opening the PR." The connection provides the capability; CLAUDE.md provides the sequence.
  </Accordion>

  <Accordion title="MCP + Hooks — Guardrailed Reach">
    [Hooks](/setup/hooks-playbook) enforce rules on MCP-powered workflows. MCP opens the door; hooks make sure Claude walks through it correctly.

    ```json theme={null}
    {
      "hooks": {
        "Stop": [
          {
            "hooks": [
              {
                "type": "command",
                "command": ".claude/hooks/verify-pr-quality.sh"
              }
            ]
          }
        ]
      }
    }
    ```

    * **`Stop` verifies MCP output** — checks that the PR has a description, links the ticket, and CI is green before Claude declares done
    * **`PreToolUse` for access control** — matcher on MCP tools that blocks write operations to production systems
    * **`PostToolUse` for audit** — logs every MCP interaction for compliance or debugging
  </Accordion>

  <Accordion title="MCP + Skills — Informed Reach">
    [Skills](/setup/skills-stack) teach Claude domain patterns that make MCP tools useful. Without the skill, Claude can query your database. With the skill, Claude knows your conventions.

    * **Database skill + DB MCP** — the skill encodes your migration conventions (timestamped filenames, naming patterns); the MCP reads the current schema. Claude writes migrations that match your existing patterns instead of inventing its own.
    * **Deployment skill + GitHub MCP** — the skill knows your release process; the MCP creates PRs. Claude targets the right branch, adds the right labels and reviewers for your release train.
  </Accordion>
</AccordionGroup>

## Scoping Strategy

The [official docs](https://code.claude.com/docs/en/mcp) explain the three scopes (local, project, user). Here's when to use each:

| Connection            | Scope                   | Why                                  |
| --------------------- | ----------------------- | ------------------------------------ |
| GitHub MCP            | `.mcp.json` (project)   | Every dev needs it. Commit it.       |
| Database (dev)        | `.mcp.json` (project)   | Team shares the dev DB connection.   |
| Personal Linear/Slack | `~/.claude.json` (user) | Tied to personal auth tokens.        |
| Experimental servers  | Local (default)         | Testing — don't pollute team config. |

## Next Steps

* [Writing CLAUDE.md](/setup/claude-md) — direct how Claude uses its MCP connections
* [Composing a Skills Stack](/setup/skills-stack) — teach domain knowledge that makes MCP tools useful
* [Hooks Playbook](/setup/hooks-playbook) — enforce guardrails on MCP-powered workflows
* [Context Distribution](/patterns/distribution) — how all four layers fit together
