Skip to content

Latest commit

 

History

History
94 lines (64 loc) · 2.22 KB

quick-start.md

File metadata and controls

94 lines (64 loc) · 2.22 KB

Home > Tutorials > Quick Start

Quick Start

Get KnowStack running locally and make your first query via MCP.

Prerequisites

  • Node.js 20+
  • pnpm (npm install -g pnpm)
  • Docker & Docker Compose

Installation

git clone <repository-url>
cd knowstack
pnpm install

Configure Environment

cp .env.example .env

The default .env works for local development. See .env.example for all available options.

Start Services

# Start PostgreSQL and Redis
docker compose up -d db redis

Setup Database

pnpm prisma generate
pnpm prisma migrate dev

Start the Server

pnpm start:dev

The server runs at http://localhost:3100.

Seed Data

With the server running, use the SDK CLI to create your organization, project, ingest documentation, and seed instructions:

npx @knowstack/sdk --init

Follow the interactive prompts. The CLI prints MCP connection config at the end. See SDK Setup Guide for full options.

Connect via MCP

Use the config printed by the SDK to connect any MCP-compatible tool. Example for a CLI tool:

# Example: Claude Code (adapt for your MCP client)
claude mcp add knowstack \
  --transport http http://localhost:3100/api/v1/mcp \
  -H "x-ks-org: your-org-slug" \
  -H "x-ks-project: your-project-slug"

For IDE-based clients, see MCP Reference — Client Configuration.

Common Scripts

Script Description
npx @knowstack/sdk --init Setup org, project, docs
pnpm start:dev Start with hot reload
pnpm build Build for production
pnpm prisma studio Open database GUI
pnpm test Run unit tests

Next Steps

See Also