Installation

Add the MCP server to your project and configure your AI assistant

1. Install the Package

Add the MCP server to your project as a dev dependency:

Install Command

pnpm add -D @opencosmos/mcp
# or
npm install --save-dev @opencosmos/mcp
# or
yarn add -D @opencosmos/mcp

2. Configure Your Client

Claude Desktop

Recommended

Add to your Claude Desktop config file:

~/Library/Application Support/Claude/claude_desktop_config.json

Claude Config

{
  "mcpServers": {
    "sds": {
      "command": "npx",
      "args": ["@opencosmos/mcp"]
    }
  }
}
⚠️ Important: Restart Claude Desktop after adding this configuration.

Cursor

Create or update in your project root:

.cursor/mcp.json

Cursor Config

{
  "mcpServers": {
    "sds": {
      "command": "npx",
      "args": ["@opencosmos/mcp"]
    }
  }
}

VS Code

Create or update in your project root:

.vscode/mcp.json

VS Code Config

{
  "servers": {
    "sds": {
      "command": "npx",
      "args": ["@opencosmos/mcp"]
    }
  }
}

Local Development Setup

If you're contributing to the OpenCosmos UI or want to use the latest unreleased MCP server, follow these steps:

1. Clone the Repository

Clone Repository

git clone https://github.com/opencosmos-ai/opencosmos-ui.git
cd ecosystem

2. Install Dependencies

Install Dependencies

pnpm install

3. Build the MCP Server

Build Server

pnpm build --filter @opencosmos/mcp

4. Configure Your Client

Update your config to point to the local build:

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json

Claude Local Config

{
  "mcpServers": {
    "sds-local": {
      "command": "node",
      "args": ["/absolute/path/to/ecosystem/packages/mcp/dist/index.js"]
    }
  }
}

⚠️ Replace /absolute/path/to/ with your actual clone location.

Cursor

.cursor/mcp.json (in your project root)

Cursor Local Config

{
  "mcpServers": {
    "sds-local": {
      "command": "node",
      "args": ["/absolute/path/to/ecosystem/packages/mcp/dist/index.js"]
    }
  }
}

5. Restart Your Client

  • Claude Desktop: Fully quit and restart the application
  • Cursor: Reload window (Cmd/Ctrl + Shift + P → "Reload Window")

6. Verify Connection

Try asking your AI assistant:

"Show me all OpenCosmos UI components"

If it lists components, you're connected!

Making Changes

When you modify the MCP server source:

Rebuild Command

# Rebuild
pnpm build --filter @opencosmos/mcp

# Then restart your MCP client to pick up changes

For faster iteration, use watch mode:

Watch Command

pnpm dev --filter @opencosmos/mcp  # Rebuilds on file changes