Files
mcpctl/docs/getting-started.md
Michal 6d9a9f572c feat: replace profiles with kubernetes-style secrets
Replace the confused Profile abstraction with a dedicated Secret resource
following Kubernetes conventions. Servers now have env entries with inline
values or secretRef references. Env vars are resolved and passed to
containers at startup (fixes existing gap).

- Add Secret CRUD (model, repo, service, routes, CLI commands)
- Server env: {name, value} or {name, valueFrom: {secretRef: {name, key}}}
- Add env-resolver utility shared by instance startup and config generation
- Remove all profile-related code (models, services, routes, CLI, tests)
- Update backup/restore for secrets instead of profiles
- describe secret masks values by default, --show-values to reveal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:40:58 +00:00

2.4 KiB

Getting Started with mcpctl

Prerequisites

  • Node.js >= 20.0.0
  • pnpm >= 9.0.0
  • PostgreSQL (for mcpd)
  • Docker or Podman (for container management)

Installation

# Clone the repository
git clone <repo-url>
cd mcpctl

# Install dependencies
pnpm install

# Generate Prisma client
pnpm --filter @mcpctl/db exec prisma generate

# Build all packages
pnpm build

Quick Start

1. Start the Database

# Start PostgreSQL via Docker Compose
pnpm db:up

# Run database migrations
pnpm --filter @mcpctl/db exec prisma db push

2. Start the Daemon

cd src/mcpd
pnpm dev

The daemon starts on http://localhost:4444 by default.

3. Use the CLI

# Check daemon status
mcpctl status

# Register an MCP server
mcpctl apply config.yaml

# Or use the interactive wizard
mcpctl setup my-server

# List registered servers
mcpctl get servers

# Start an instance
mcpctl instance start <server-id>

# Check instance status
mcpctl instance list

# View instance logs
mcpctl instance logs <instance-id>

4. Generate .mcp.json for Claude

# Create a project
mcpctl project create my-workspace

# Assign profiles to project
mcpctl project set-profiles <project-id> <profile-id-1> <profile-id-2>

# Generate .mcp.json
mcpctl claude generate <project-id>

# Or manually add servers
mcpctl claude add my-server -c npx -a -y @my/mcp-server

Example Configuration

Create a config.yaml file:

servers:
  - name: slack
    description: Slack MCP server
    transport: STDIO
    packageName: "@anthropic/slack-mcp"
    env:
      - name: SLACK_TOKEN
        valueFrom:
          secretRef:
            name: slack-secrets
            key: token

  - name: github
    description: GitHub MCP server
    transport: STDIO
    packageName: "@anthropic/github-mcp"

profiles:
  - name: default
    server: slack
    envOverrides:
      SLACK_TOKEN: "xoxb-your-token"

projects:
  - name: dev-workspace
    description: Development workspace

Apply it:

mcpctl apply config.yaml

Running Tests

# Run all tests
pnpm test:run

# Run tests for a specific package
pnpm --filter @mcpctl/cli test:run
pnpm --filter @mcpctl/mcpd test:run
pnpm --filter @mcpctl/local-proxy test:run

# Run tests with coverage
pnpm test:coverage

# Typecheck
pnpm typecheck

# Lint
pnpm lint

Development

# Watch mode for tests
pnpm test

# Build in watch mode
cd src/cli && pnpm dev