Skip to main content

1.4 Setup MCP Servers and Skills

MCP (Model Context Protocol) servers and skills extend Claude's capabilities beyond code generation. In this section, you'll set up tools that allow Claude to interact with external systems.

What Are MCP Servers?​

MCP servers provide Claude with live, structured access to external systems. Instead of you copy-pasting information into the chat, Claude can query these systems directly.

Common use cases for MCP servers:

  • Documentation access — Fetch up-to-date docs for libraries and frameworks
  • Database interaction — Query tables, inspect schemas, understand data
  • API integration — Connect to external services and tools
  • File system access — Work with files outside the current project

You can browse available MCP servers at mcp.so or glama.ai/mcp/servers.

What Are Skills?​

Skills are specialized capabilities that can be invoked by Claude to perform specific tasks:

SkillPurpose
agent-browserAutomate browser interactions, take screenshots, test UIs
web-design-guidelinesReview UI code against best practices
frontend-designGenerate high-quality frontend interfaces
Want to understand how skills work — and build your own?

This section covers installing skills. 2.1 Extending Agents with Skills covers what they actually are, the open standard behind them, and how to decide what goes in one. 2.2 Build Your First Skill walks you through creating one from scratch.

What Are Hooks?​

Hooks are user-defined shell commands that Claude Code runs automatically at specific points in its lifecycle — before a tool call, after a response, before compacting context, and more. Unlike an instruction in CLAUDE.md/AGENTS.md, which an agent can miss or ignore, a hook fires deterministically every time its trigger condition is met.

Common use cases for hooks:

  • Blocking risky commands — deny or require confirmation for a Bash call before it executes
  • Enforcing formatting/linting — auto-run a formatter after every file edit
  • Preserving context — inject must-keep instructions right before a /compact
  • Logging and notifications — record tool usage or notify a channel when a task finishes

Hooks aren't unique to Claude Code — most agentic coding tools now support some version of this pattern:

Hooks and Security

1.9 Access Control for Agents covers PreToolUse hooks in depth — the most common way to use hooks to enforce a security policy that goes beyond simple allow/deny wildcards.

This program doesn't require you to write a hook during setup, but knowing they exist matters: later sections build on them, and you may reach for one anytime a written instruction alone isn't reliable enough.

Install MCP Servers​

Claude Code provides a built-in mcp subcommand that makes installation straightforward. You can install MCP servers either globally (available in all projects) or locally (specific to a project).

Desktop app: a GUI shortcut for well-known integrations

For popular pre-built integrations — Slack, GitHub, Linear, Google Calendar, and similar — the Desktop app has a graphical Connectors menu: click the + button next to the prompt box and select Connectors. This is faster than the terminal for those specific services. Context7 and DBHub (below) aren't in that list, so add them the exact same way as the CLI: with the claude mcp add command in a terminal.

Global vs Project Installation​

ScopeFlagConfig LocationUse When
Global-s user~/.claude/settings.jsonYou want the MCP available everywhere
Project-s project.claude/settings.json in project rootMCP is specific to this project

Context7 MCP (Documentation Access)​

Context7 provides Claude with access to up-to-date documentation, eliminating the need to rely solely on training data.

Get your API key (recommended):

While Context7 works without an API key, having one provides higher rate limits and better performance:

  1. Visit context7.com/dashboard
  2. Create an account if you don't have one
  3. Navigate to the API Keys section and create a new key
  4. Copy the key for use in the commands below

Install globally:

claude mcp add context7 -s user -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY

Or install for a specific project:

cd /path/to/your/project
claude mcp add context7 -s project -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
tip

Replace YOUR_API_KEY with your actual API key from the Context7 dashboard. For more installation options and troubleshooting, see the official Context7 documentation.

DBHub MCP (Database Access) — Optional​

DBHub gives Claude direct access to query database schemas and data. Each database connection requires its own MCP server entry — use a descriptive name to distinguish them.

General pattern for local databases:

claude mcp add <descriptive-name> -s project -- npx -y @bytebase/dbhub@latest --transport stdio --dsn "<connection-string>"

Example — connecting to the local PostgreSQL database for the petclinic application:

claude mcp add dbhub-petclinic -s project -- npx -y @bytebase/dbhub@latest --transport stdio --dsn "postgres://petclinic:petclinic@localhost:5432/petclinic?sslmode=disable"
tip

If you work with multiple databases, add a separate server for each with a distinct name (e.g., dbhub-petclinic, dbhub-inventory).

Other MCP Servers​

As you work through the program, you may want to add other MCP servers. The general pattern is:

claude mcp add <server-name> -s user -- <command> <args>
Managing MCP Servers

You can list, remove, and manage MCP servers with the claude mcp command:

claude mcp list          # See installed servers
claude mcp remove <name> # Remove a server

Install Skills​

Skills are installed using the skills.sh platform from Vercel.

agent-browser​

This skill enables Claude to automate browser interactions — navigating pages, clicking buttons, filling forms, and capturing screenshots.

npx skills add vercel-labs/agent-browser --skill agent-browser -a claude-code

web-design-guidelines​

Review UI code against established web design best practices:

npx skills add vercel-labs/agent-skills --skill web-design-guidelines -a claude-code

frontend-design​

Generate distinctive, production-grade frontend interfaces:

npx skills add anthropics/claude-code --skill frontend-design -a claude-code

Liatrio Skill Library​

Liatrio maintains its own shared marketplace of Skills at github.com/liatrio-labs/skills. The repo is internal to the Liatrio GitHub org rather than public, so the owner/repo HTTPS shorthand for npx skills add can fail unless Git is already authenticated to GitHub over HTTPS — use one of the two paths below.

Claude Code plugin marketplace — If you're chatting directly in the general Claude desktop or web app (outside the Code tab), this marketplace is already added for you. If you're using Claude Code — whether the terminal CLI or the Code tab in the Claude Code Desktop app — add it yourself, since both surfaces share the same plugin configuration, with the built-in /plugin command:

/plugin marketplace add liatrio-labs/skills

Once added, run /plugin marketplace list to confirm the name it registered under, then install any skill from it:

/plugin install <skill-name>@<marketplace-name>

Desktop app alternative: instead of the /plugin commands above, click the + button next to the prompt box and select Plugins → Add plugin to browse and install from any configured marketplace with a GUI, or Manage plugins to enable/disable/uninstall. Either path (commands or menu) writes to the same shared configuration.

skills.sh CLI (SSH) — install a specific skill by cloning through your GitHub SSH key. Use this when you want the same npx skills add flow as the public skills above, or when the HTTPS shorthand fails on the internal repo:

npx skills add git@github.com:liatrio-labs/skills.git --skill <skill-name> -a claude-code

When you're ready to contribute a skill back to this library, see Sharing Skills with the Team in the appendix.

note

Plugin commands and marketplace naming can evolve as the ecosystem matures. If /plugin marketplace add doesn't work as shown, check the Anthropic documentation for the current syntax.

Verify MCP and Skills Setup​

Restart Claude Code to load the new configuration:

# Exit any running Claude session first
claude

Note: You may need to open a new terminal (or start a new session in the Desktop app's Code tab) to pick up changes.

Test Context7​

Ask Claude to fetch documentation:

Use Context7 to get the latest documentation for Express.js routing

Claude should use the Context7 MCP to fetch current documentation rather than relying on training data.

Test Skills​

Use the /skills command to list all installed skills:

/skills

This should display your installed skills, including sdd, agent-browser, web-design-guidelines, and frontend-design.

Configuration File Locations​

Claude Code shares the same configuration files whether you run it in the terminal or the Desktop app's Code tab — MCP servers, plugins, and skills installed on one surface are available on the other. For this program, use the configuration locations below:

ScopeConfig Location
Global Claude Code settings~/.claude/settings.json
Project-scoped Claude Code settings.claude/settings.json in project root

Other Claude product configuration (the general Claude desktop/web chat app, outside the Code tab) is outside the Forge setup path.

Troubleshooting​

MCP server fails to start​

Check that npx is available:

npx --version

If not, ensure Node.js is properly installed (see Environment Setup).

Skills not recognized​

  1. Restart Claude Code after installing skills
  2. Check skills are installed: npx skills list
  3. Re-run the install command for the missing skill with --yes
  4. If symlinks or permissions fail, re-run the install command with --copy

Context7 returns errors​

  • Verify internet connectivity
  • Some documentation sources may be rate-limited; wait and retry
  • Check Context7 service status

Permission issues​

If the skills installer reports permission or symlink errors, do not install an npm package directly. Rerun the relevant npx skills add ... command for Claude Code with --copy so the skill files are copied into the agent directory instead of symlinked:

npx skills add vercel-labs/agent-browser --skill agent-browser -a claude-code --copy

What You've Configured​

At this point, your Claude Code environment includes:

  • SDD Workflow Skill — A single skill that routes through the four spec-driven development phases
  • MCP Servers — Context7 for documentation access (and optionally others)
  • Skills — Browser automation, design review, frontend generation

Next Steps​

With your environment fully configured, it's time to fork the example project and put these tools to work.

Knowledge Check​

Question 1 of 6

MCP Servers and Skills Knowledge Check

Q1. What is the primary purpose of MCP servers in Claude Code?