# 045 MCP 82e722ba

> Configure MCP servers in .claude/.mcp.json with examples for memory, filesystem, search, and browser automation, plus environment variable handling and validation rules.

- Skill: `tools-only/045-mcp-82e722ba` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds add tools-only/045-mcp-82e722ba`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/045-mcp-82e722ba/raw
- Safety review: PASS (external: skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML, MCP Servers
- Tags: Brave Search, Configuration, Environment Variables, Filesystem Server, Json, Mcp, Memory Server, Puppeteer
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-08-22
- Page: https://skillmd.com/skills/tools-only/045-mcp-82e722ba

---

# MCP Configuration Guide

## Configuration File Structure

MCP servers are configured in `.claude/.mcp.json`:

```json
{
  "mcpServers": {
    "server-name": {
      "command": "executable",
      "args": ["arg1", "arg2"],
      "env": {
        "API_KEY": "value"
      }
    }
  }
}
```

## Common Server Configurations

### Memory Server

Store and retrieve key-value data:

```json
{
  "memory": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-memory"]
  }
}
```

### Filesystem Server

File operations with restricted access:

```json
{
  "filesystem": {
    "command": "npx",
    "args": [
      "-y",
      "@modelcontextprotocol/server-filesystem",
      "/allowed/path"
    ]
  }
}
```

### Brave Search Server

Web search capabilities:

```json
{
  "brave-search": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-brave-search"],
    "env": {
      "BRAVE_API_KEY": "${BRAVE_API_KEY}"
    }
  }
}
```

### Puppeteer Server

Browser automation:

```json
{
  "puppeteer": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
  }
}
```

## Environment Variables

Reference env vars with `${VAR_NAME}` syntax:

```json
{
  "api-server": {
    "command": "node",
    "args": ["server.js"],
    "env": {
      "API_KEY": "${MY_API_KEY}",
      "BASE_URL": "${API_BASE_URL}"
    }
  }
}
```

## Configuration Loading Order

Scripts check for config in this order:

1. `process.env` (runtime environment)
2. `.claude/skills/mcp-management/.env`
3. `.claude/skills/.env`
4. `.claude/.env`

## Validation

Config must:
- Be valid JSON
- Include `mcpServers` object
- Each server must have `command` and `args`
- `env` is optional but must be object if present

