Copied to clipboard!

Estimated Time: 15-20 minutes Difficulty: Beginner Prerequisites: Claude Code CLI available


šŸ“– What You'll Learn

By the end of this chapter, you will:

  • āœ… Understand what MCP servers are and why they matter
  • āœ… Successfully install the Vibe CMS MCP server
  • āœ… Configure authentication with your Vibe CMS project
  • āœ… Verify the installation is working correctly
  • āœ… Troubleshoot common installation issues

šŸŽÆ Overview

What is MCP?

MCP (Model Context Protocol) is a standardized protocol that allows Claude Code to interact with external tools and services. Think of it as a bridge that connects Claude to your Vibe CMS project.

Why MCP for Vibe CMS?

  • šŸ¤– AI-Native: Work with content using natural language
  • ⚔ Fast: Direct API access without manual operations
  • šŸ”’ Secure: Scoped access with API authentication
  • šŸŽÆ Context-Aware: Claude understands your content structure

What is the Vibe CMS MCP Server?

The Vibe CMS MCP server provides Claude Code with tools to:

  • Query and list collections
  • Create and manage content items
  • Upload and organize files
  • Handle translations and locales
  • Update field schemas
  • Perform content operations

Real-world example: Instead of manually:

  1. Opening your CMS dashboard
  2. Clicking through menus
  3. Filling out forms
  4. Uploading files one by one

You can simply tell Claude:

"Create a blog post collection with title, content, author, and featured image fields, then add 3 sample posts in English and German"

And Claude will handle it all using the MCP server!


šŸ“¢ Important Note: Claude Desktop vs Claude Code

āš ļø KNOWN ISSUE / FUTURE FEATURE:

This guide currently covers MCP server installation for Claude Code (the CLI/API version). If you have Claude Desktop (the desktop application) installed, you can also add Vibe CMS MCP to it using a similar configuration approach.

Status: šŸ“‹ Documentation Pending

The Claude Desktop MCP installation guide will be added in a future update. The configuration process is similar but uses a different config file location:

  • Claude Code: Project-specific .mcp.json files
  • Claude Desktop: ~/.config/claude/claude_desktop_config.json (global configuration)

For now: This guide focuses on Claude Code integration. Claude Desktop instructions coming soon!


āœ… Prerequisites Checklist

Before starting, ensure you have:

  • Claude Code or Claude Desktop App installed (version 1.0.0 or higher)
  • Vibe CMS Project created
  • API Token generated for your project
    • Found in: Project Settings → API Keys
  • Text Editor for editing JSON files
    • VS Code, Sublime Text, or any text editor
  • Terminal Access (macOS/Linux) or Command Prompt (Windows)

šŸ’” TIP: Have your Project ID and API Token ready - you'll need them during configuration!


šŸ“„ Installation Methods

There are three ways to install the Vibe CMS MCP server:

Method 1: NPX (Recommended for Most Users)

Best for: Quick setup without manual installation Pros: Automatic updates, minimal configuration Cons: Requires Node.js installed

Method 2: Global NPM Install

Best for: Users who want a permanent installation Pros: Faster startup, works offline after install Cons: Manual updates required

Method 3: Local Development Setup

Best for: Developers contributing to Vibe CMS Pros: Full source code access, easy debugging Cons: More complex setup

For this guide, we'll use Method 1 (NPX) - it's the most straightforward and recommended approach.


šŸš€ Step-by-Step Installation

Step 1: Locate Claude Configuration File

The Claude Code CLI stores its MCP server configuration in a JSON file. The location depends on your project:

macOS/Linux:

project-root/.mcp.json

Windows:

project-root\.mcp.json

šŸ’” TIP: If the file doesn't exist, create it! It's normal for new installations.


Step 2: Open Configuration File

Option A: Using Terminal (macOS/Linux)

# Navigate to your project directory
cd /path/to/your/project

# Open with your default text editor
open .mcp.json

# Or use a specific editor
code .mcp.json  # VS Code
nano .mcp.json  # Nano

Option B: Using File Explorer (Windows)

# Navigate to your project directory
cd C:\path\to\your\project

# Open with Notepad
notepad .mcp.json

Option C: Manual Navigation

  1. Open your file manager
  2. Navigate to your project root directory
  3. Right-click the file → Open with your preferred editor

Step 3: Add Vibe CMS MCP Server Configuration

Copy the following configuration into your .mcp.json file:

{
  "mcpServers": {
    "vibe-cms-prod": {
      "command": "npx",
      "args": [
        "-y",
        "vibe-cms-mcp-server"
      ],
      "env": {
        "VIBE_PROJECT_ID": "your-project-id-here",
        "VIBE_API_TOKEN": "your-api-token-here"
      }
    }
  }
}

āš ļø IMPORTANT: Replace the placeholder values:

  • your-project-id-here → Your actual Vibe CMS project ID
  • your-api-token-here → Your actual API token

Step 4: Get Your Credentials

Finding Your Project ID

  1. Log in to your Vibe CMS dashboard
  2. Navigate to Project Settings
  3. Look for Project ID (usually at the top)
  4. Copy the value (format: proj_abc123xyz)

Example: proj_67890abcdef12345

Generating an API Token

  1. In Vibe CMS dashboard, go to Settings → API Keys
  2. Click "Generate New Token"
  3. Give it a name (e.g., "Claude MCP Access")
  4. Select permissions:
    • āœ… Read content
    • āœ… Write content
    • āœ… Manage files
    • āœ… Manage schema
  5. Click "Generate"
  6. Copy the token immediately - you won't see it again!

šŸ”’ SECURITY NOTE:

  • Treat API tokens like passwords
  • Never commit them to version control
  • Store them securely (password manager recommended)
  • Rotate tokens periodically

Step 5: Complete Configuration Example

Here's what your final configuration should look like:

{
  "mcpServers": {
    "vibe-cms-prod": {
      "command": "npx",
      "args": [
        "-y",
        "vibe-cms-mcp-server"
      ],
      "env": {
        "VIBE_PROJECT_ID": "proj_67890abcdef12345",
        "VIBE_API_TOKEN": "vibe_token_abcdef123456789xyz"
      }
    }
  }
}

Configuration Options Explained

Field Description Required
mcpServers Container for all MCP server configurations āœ… Yes
vibe-cms-prod Server name (can be customized) āœ… Yes
command Execution command (npx, node, etc.) āœ… Yes
args Arguments passed to command āœ… Yes
env Environment variables āœ… Yes
VIBE_PROJECT_ID Your Vibe CMS project identifier āœ… Yes
VIBE_API_TOKEN Authentication token for API access āœ… Yes

Working with Multiple Vibe CMS Projects

šŸ’” IMPORTANT: You can configure multiple Vibe CMS MCP servers to work with different projects simultaneously!

Common use cases:

  • Production vs. Staging environments
  • Different websites (e.g., main site + documentation site)
  • Multiple client projects
  • Personal vs. Team projects

How to add multiple projects:

Step 1: Create a new project in Vibe CMS

  1. Log in to vibecms.ai
  2. Click "New Project" in the dashboard
  3. Give it a name (e.g., "Documentation Site", "Staging Environment")
  4. Note the new Project ID

Step 2: Generate an API token for the new project

  1. Open the new project in Vibe CMS
  2. Go to Settings → API Keys
  3. Click "Generate New Token"
  4. Select appropriate permissions
  5. Copy the token immediately

Step 3: Add to your Claude configuration

Each project gets its own entry with a unique name and credentials:

{
  "mcpServers": {
    "vibe-cms-prod": {
      "command": "npx",
      "args": ["-y", "vibe-cms-mcp-server"],
      "env": {
        "VIBE_PROJECT_ID": "proj_production_id",
        "VIBE_API_TOKEN": "vibe_token_production_xxx"
      }
    },
    "vibe-cms-docs": {
      "command": "npx",
      "args": ["-y", "vibe-cms-mcp-server"],
      "env": {
        "VIBE_PROJECT_ID": "proj_docs_id",
        "VIBE_API_TOKEN": "vibe_token_docs_xxx"
      }
    },
    "vibe-cms-staging": {
      "command": "npx",
      "args": ["-y", "vibe-cms-mcp-server"],
      "env": {
        "VIBE_PROJECT_ID": "proj_staging_id",
        "VIBE_API_TOKEN": "vibe_token_staging_xxx"
      }
    }
  }
}

Step 4: Use specific servers in Claude

When working with Claude, specify which server to use:

"Using vibe-cms-prod, show me all collections"

"In vibe-cms-docs, create a user guide collection"

"With vibe-cms-staging, upload this test image"

Best practices for multiple projects:

  • āœ… Use descriptive server names (vibe-cms-docs, vibe-cms-client-acme)
  • āœ… Keep production and staging separate
  • āœ… Use different API tokens for each project
  • āœ… Document which server is for which purpose
  • āœ… Rotate tokens independently

āš ļø Important: Each MCP server name must be unique, and each should have its own Project ID and API Token from different Vibe CMS projects.


Step 6: Save and Validate Configuration

  1. Save the file (Ctrl+S or Cmd+S)
  2. Validate JSON syntax using an online validator:

Common JSON errors to watch for:

  • āŒ Missing commas between entries
  • āŒ Extra commas after last entry
  • āŒ Missing quotes around strings
  • āŒ Unclosed brackets { or }

āœ… Valid JSON example:

{
  "key": "value",
  "another": "value"
}

āŒ Invalid JSON examples:

{
  "key": "value"
  "another": "value"  // Missing comma!
}
{
  "key": "value",
  "another": "value",  // Extra comma!
}

Step 7: Reload Claude Code Window

For changes to take effect:

All Platforms:

# Reload the window in Claude Code
# Use the command palette or restart your session

šŸ’” TIP: In Claude Code, you can reload the window to pick up configuration changes without fully restarting the application.


āœ“ Verification

Quick Test: Check MCP Server Status

  1. Open Claude Code
  2. Start a new conversation
  3. Type: "List all MCP servers"
  4. Claude should respond with a list including vibe-cms-prod

Functional Test: Query Vibe CMS

Try this simple command:

"Show me all collections in my Vibe CMS project"

Expected response: Claude will list your collections (or confirm there are none if it's a new project)

Detailed Verification Checklist

  • Claude Code opens without errors
  • No MCP connection errors in Claude's status
  • Claude recognizes Vibe CMS tools when asked
  • Can successfully query collections
  • Can fetch project information

šŸ› Troubleshooting

Issue 1: "MCP Server Not Found"

Symptoms: Claude doesn't recognize Vibe CMS tools

Possible Causes & Solutions:

  1. Configuration file not loaded

    • āœ… Verify file location is correct (project root)
    • āœ… Check file name is exactly .mcp.json
    • āœ… Ensure file has .json extension (not .json.txt)
  2. Claude not reloaded

    • āœ… Reload the window in Claude Code
    • āœ… Restart your Claude Code session if needed
  3. JSON syntax error

    • āœ… Validate JSON at https://jsonlint.com
    • āœ… Check for missing/extra commas
    • āœ… Verify all brackets are closed

How to diagnose:

# Check if config file exists (macOS/Linux)
ls -la .mcp.json

# View file contents
cat .mcp.json

# Validate JSON syntax (if jq installed)
cat .mcp.json | jq .

Issue 2: "Authentication Failed"

Symptoms: Claude finds the server but can't access Vibe CMS

Possible Causes & Solutions:

  1. Invalid API token

    • āœ… Verify token was copied completely (no extra spaces)
    • āœ… Check token hasn't expired
    • āœ… Generate a new token if needed
  2. Wrong Project ID

    • āœ… Confirm Project ID in Vibe CMS dashboard
    • āœ… Ensure no typos or extra characters
  3. Insufficient permissions

    • āœ… Check token has required permissions:
      • Read content
      • Write content
      • Manage files
      • Manage schema

How to test:

# Test API access directly (replace with your credentials)
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
     https://api.vibecms.com/v1/projects/YOUR_PROJECT_ID

Expected: JSON response with project details If error: Check credentials and permissions


Issue 3: "NPX Command Not Found"

Symptoms: Error about npx not being available

Possible Causes & Solutions:

  1. Node.js not installed

    • āœ… Install Node.js from https://nodejs.org
    • āœ… Recommended: Use LTS (Long Term Support) version
    • āœ… Verify installation: node --version
  2. NPX not in PATH

    • āœ… Check PATH includes Node.js binaries
    • āœ… Try full path to npx: /usr/local/bin/npx

How to diagnose:

# Check Node.js installation
node --version
npm --version
npx --version

# Find npx location
which npx

Alternative solution: Use global install method instead:

npm install -g vibe-cms-mcp-server

Then update config to:

{
  "command": "vibe-cms-mcp-server",
  "args": []
}

Issue 4: "Connection Timeout"

Symptoms: Requests to Vibe CMS hang or timeout

Possible Causes & Solutions:

  1. Network connectivity

    • āœ… Check internet connection
    • āœ… Try accessing https://vibecms.com in browser
    • āœ… Check firewall/proxy settings
  2. Vibe CMS API issues

    • āœ… Check Vibe CMS status page
    • āœ… Try again in a few minutes
    • āœ… Contact support if persistent
  3. Rate limiting

    • āœ… Wait a few minutes between requests
    • āœ… Check API usage in dashboard
    • āœ… Upgrade plan if hitting limits

Issue 5: "Unexpected Token" or JSON Errors

Symptoms: Claude reports configuration errors on startup

Possible Causes & Solutions:

  1. Invalid JSON syntax

    • āœ… Use JSON validator: https://jsonlint.com
    • āœ… Check for smart quotes ("" vs "")
    • āœ… Verify all strings are in double quotes
  2. Copy-paste issues

    • āœ… Copy from raw text, not formatted docs
    • āœ… Remove any extra characters
    • āœ… Type manually if issues persist

Common JSON pitfalls:

// āŒ WRONG: Single quotes
{
  'key': 'value'
}

// āœ… CORRECT: Double quotes
{
  "key": "value"
}

// āŒ WRONG: Comments in JSON
{
  "key": "value" // This breaks JSON!
}

// āœ… CORRECT: No comments
{
  "key": "value"
}

// āŒ WRONG: Trailing comma
{
  "key": "value",
}

// āœ… CORRECT: No trailing comma
{
  "key": "value"
}

Issue 6: "Permission Denied"

Symptoms: Can't save configuration file

Possible Causes & Solutions:

  1. File permissions

    # macOS/Linux: Fix permissions
    chmod 644 .mcp.json
    
    # Check permissions
    ls -la .mcp.json
    
  2. Running as wrong user

    • āœ… Don't use sudo to edit project config
    • āœ… Edit as your normal user account

Issue 7: MCP Server Crashes

Symptoms: Server starts but immediately stops

Possible Causes & Solutions:

  1. Check Claude logs

    • Look for error messages in Claude Code output
    • Check terminal/console for diagnostic information
  2. Version compatibility

    • āœ… Update Claude Code to latest version
    • āœ… Clear NPX cache: npx clear-npx-cache
    • āœ… Try specifying version: npx -y vibe-cms-mcp-server@latest
  3. Conflicting installations

    • āœ… Remove global installs: npm uninstall -g vibe-cms-mcp-server
    • āœ… Use only NPX method

Getting Help

If you're still experiencing issues:

  1. Check Logs

    • Claude Code console output
    • Terminal output when starting Claude
  2. Gather Information

    • Operating system and version
    • Claude Code version
    • Node.js version (node --version)
    • Full error messages
  3. Contact Support

When reporting issues, include:

  • Steps to reproduce the problem
  • Expected vs actual behavior
  • Relevant log excerpts (redact API tokens!)
  • System information

šŸŽ“ Understanding the Configuration

Environment Variables Deep Dive

The env section passes environment variables to the MCP server process. These are like settings that tell the server how to connect to your Vibe CMS project.

Required Variables:

"env": {
  "VIBE_PROJECT_ID": "proj_xxx",  // Identifies which project
  "VIBE_API_TOKEN": "vibe_xxx"     // Authenticates requests
}

Optional Variables (advanced use cases):

"env": {
  "VIBE_PROJECT_ID": "proj_xxx",
  "VIBE_API_TOKEN": "vibe_xxx",
  "VIBE_API_URL": "https://custom-api.example.com",  // Custom API endpoint
  "VIBE_TIMEOUT": "30000",                            // Request timeout (ms)
  "VIBE_DEBUG": "true"                                // Enable debug logging
}

šŸ’” TIP: For most users, only VIBE_PROJECT_ID and VIBE_API_TOKEN are needed!


Command and Args Explanation

"command": "npx",
"args": ["-y", "vibe-cms-mcp-server"]

Breaking this down:

  • command: The executable to run (npx)
  • args: Arguments passed to the command
    • -y: Auto-approve prompts (don't ask "install package?")
    • vibe-cms-mcp-server: Package name to execute

Alternative configurations:

Global installation:

"command": "vibe-cms-mcp-server",
"args": []

Specific version:

"command": "npx",
"args": ["-y", "vibe-cms-mcp-server@0.2.1"]

Local development:

"command": "node",
"args": ["/path/to/local/vibe-cms-mcp-server/dist/index.js"]

šŸŽÆ Best Practices

Security

  1. Protect Your API Token

    • āœ… Never share tokens publicly
    • āœ… Use environment-specific tokens (prod vs. staging)
    • āœ… Rotate tokens every 90 days
    • āœ… Revoke tokens immediately if compromised
  2. Principle of Least Privilege

    • āœ… Grant only necessary permissions
    • āœ… Create separate tokens for different purposes
    • āœ… Use read-only tokens where write access isn't needed
  3. Secure Configuration Storage

    • āœ… Keep config file permissions restricted
    • āœ… Don't commit config to version control
    • āœ… Use secret management tools for teams

Organization

  1. Naming Conventions

    {
      "mcpServers": {
        "vibe-cms-prod": { /* ... */ },
        "vibe-cms-staging": { /* ... */ },
        "vibe-cms-dev": { /* ... */ }
      }
    }
    
  2. Documentation

    • Add comments in a separate README (JSON doesn't allow comments)
    • Document which projects each server connects to
    • Note token generation dates for rotation tracking
  3. Version Control

    • Create a template config without sensitive data
    • Share template with team
    • Each developer adds their own credentials locally

Maintenance

  1. Regular Updates

    # Check for updates
    npm view vibe-cms-mcp-server version
    
    # Update (if globally installed)
    npm update -g vibe-cms-mcp-server
    
    # NPX automatically uses latest unless pinned
    
  2. Health Checks

    • Periodically verify MCP server is responding
    • Test with simple queries
    • Monitor for deprecation warnings
  3. Backup Configuration

    # Create backup before changes
    cp .mcp.json .mcp.json.backup
    

āœ… Verification Checklist

Before moving to Chapter 2, confirm:

  • Configuration file created and saved
  • Project ID and API Token correctly set
  • JSON syntax is valid
  • Claude Code window reloaded
  • MCP server appears in Claude's available tools
  • Can query collections successfully
  • No error messages in Claude
  • Understand how to troubleshoot common issues
  • Know where to get help if needed

šŸ“š What's Next?

Congratulations! You've successfully installed and configured the Vibe CMS MCP server.

In Chapter 2, you'll learn:

  • Creating your first collection
  • Adding content with translations
  • Managing files and media
  • Understanding the content workflow

Recommended next steps:

  1. āœ… Test the installation thoroughly
  2. āœ… Bookmark this chapter for troubleshooting reference
  3. āœ… Familiarize yourself with Claude Code basics
  4. āœ… Move on to Chapter 2: First Steps with Vibe CMS

šŸŽ“ Key Takeaways

After completing this chapter, you should understand:

  1. MCP bridges Claude and Vibe CMS - enabling natural language content management
  2. Configuration is JSON-based - stored in project root as .mcp.json
  3. Authentication requires two pieces - Project ID and API Token
  4. NPX is the recommended method - simplest setup with automatic updates
  5. Troubleshooting is systematic - check configs, credentials, and connectivity in order

šŸ“– Additional Resources


šŸ’¬ Feedback

Help us improve this chapter! Send feedback to:


Ready to start working with content? → Continue to Chapter 2: First Steps


Chapter 1 - MCP Server Installation | Vibe CMS User Manual v1.0