Skip to content

Getting Started

Welcome to the Cosmic MCP Server! This guide will help you get up and running quickly.

Prerequisites

Before you begin, ensure you have:

  • Node.js 18+ installed
  • A Cosmic.js account and bucket
  • Your Cosmic API credentials

Installation

The easiest way to get started is using npx:

bash
npx -y cosmic-mcp

Via NPM

You can also install the package globally:

bash
npm install -g cosmic-mcp
cosmic-mcp

Configuration

Create a .env file in your project directory with your Cosmic credentials:

bash
COSMIC_BUCKET_SLUG=your-bucket-slug
COSMIC_READ_KEY=your-read-key
COSMIC_WRITE_KEY=your-write-key

First Steps

  1. Test the connection: Run the server and verify it connects to your Cosmic bucket
  2. Explore the tools: Use the MCP client to see available tools
  3. Try some examples: Check out the AI Assistant Prompts for inspiration

Next Steps

Need Help?