1. Conduid
  2. Developer Tools
  3. Spellbook
MCP server · Developer Tools

Spellbook

Multi-platform AI assistant skills and workflows. Serious engineering. Also fun.

39Low

Scored 11 days ago · breakdown

About Spellbook

Spellbook is an MCP server in the Developer Tools category: multi-platform AI assistant skills and workflows. Serious engineering. Also fun.

The repository has 10 stars and 0 forks.

Install

From source
git clone https://github.com/zilhak/spellbook

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (40)

batch_edit_metadata필터에 매칭되는 청크의 메타데이터를 일괄 패치 (예: 배너 8개의 category 일괄 교정). 빈 필터 거부. lore 미지정 시 Canon.

Parameters not published.

batch_erase필터에 매칭되는 청크를 일괄 삭제 (안전을 위해 빈 필터 거부). lore 미지정 시 Canon.

Parameters not published.

chronicleLore에 청크 저장 (REST 모드 필수)

Parameters not published.

copy_chunk청크를 다른 저장소로 복사 (출발지 유지, 재임베딩). from_lore/to_lore 미지정 시 Canon.

Parameters not published.

delete_loreLore 삭제 (전체 컬렉션 삭제, 복구 불가)

Parameters not published.

delete_scrollScroll 문서 삭제

Parameters not published.

edit_metadata청크의 text는 그대로 두고 메타데이터(keywords/category/importance 등)만 수정. 카운트 정합성 자동 갱신. lore 미지정 시 Canon.

Parameters not published.

eraseCanon에서 청크 삭제

Parameters not published.

erase_loreLore에서 청크 삭제

Parameters not published.

exportCanon JSON 백업 내보내기

Parameters not published.

Show all 40 tools
export_loreLore 전체를 JSON으로 백업 내보내기 (임베딩 제외, id/text/metadata 포함)

Parameters not published.

filter_guide필터 사용법 가이드 조회

Parameters not published.

findCanon에서 키워드 기반 검색 (기본: 순수 필터 매칭, 벡터 threshold 게이팅 없음)

Parameters not published.

get_indexCanon 메타 목차 조회

Parameters not published.

get_scroll_indexScroll 인덱스 조회 (카테고리, 서브카테고리, 라벨 목록과 개수)

Parameters not published.

get_topicCanon에서 특정 토픽의 모든 청크 조회

Parameters not published.

health저장소 정합성 진단 (total_count vs vector_count 불일치, 고아 메타데이터 감지). lore 미지정 시 Canon.

Parameters not published.

importCanon JSON 백업 가져오기

Parameters not published.

import_loreLore JSON 백업 가져오기 (재임베딩 후 복원, 없으면 생성)

Parameters not published.

list_chunksCanon의 모든 청크를 검색 없이 나열 (스크롤). memorize/find로 누락될 수 있는 청크까지 전부 반환. id는 revise/erase에 사용 가능.

Parameters not published.

list_lores모든 Lore 목록 조회

Parameters not published.

lore_stats특정 Lore 통계 조회

Parameters not published.

memorizeCanon에서 의미 기반 검색 (벡터 유사도)

Parameters not published.

modify_scrollScroll 문서 수정

Parameters not published.

move_chunk청크를 다른 저장소로 이동 (출발지에서 제거, 재임베딩). from_lore/to_lore 미지정 시 Canon.

Parameters not published.

read_scrollScroll 문서 조회 (ID 단건 또는 필터 조회)

Parameters not published.

recallLore에서 의미 기반 검색

Parameters not published.

recall_findLore에서 키워드 기반 검색 (기본: 순수 필터 매칭, 벡터 threshold 게이팅 없음)

Parameters not published.

recall_listLore의 모든 청크를 검색 없이 나열 (스크롤). recall/recall_find는 벡터 유사도 기반이라 누락될 수 있는 청크까지 전부 반환. id는 revise_lore/erase_lore에 사용 가능.

Parameters not published.

recall_topicLore에서 특정 토픽의 모든 청크 조회 (Canon get_topic의 Lore 대응)

Parameters not published.

reindex대상 저장소의 모든 청크를 현재 임베딩 모델로 재생성 (모델 교체/vector_count:0/손상 복구). lore 미지정 시 Canon.

Parameters not published.

rename_loreLore 이름 변경 (신규 컬렉션 생성 → 벡터 포함 이관 → 구 컬렉션 삭제). 데이터/설명/생성일 보존.

Parameters not published.

restREST 모드 진입, 청킹 가이드 로드

Parameters not published.

rest_endREST 모드 종료

Parameters not published.

reviseCanon에서 청크 수정

Parameters not published.

revise_loreLore에서 청크 수정

Parameters not published.

scribeCanon(기본 컬렉션)에 청크 저장 (REST 모드 필수)

Parameters not published.

statsCanon 저장소 통계

Parameters not published.

update_loreLore 설명 수정

Parameters not published.

write_scrollScroll에 문서 저장

Parameters not published.

Ask AI

✦

Ask AI about Spellbook

Powered by Claude · Grounded in docs

I know everything about Spellbook. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Spellbook v1.0 🔮

VectorDB 기반 AI Agent 메모리 MCP 서버

개요

AI 에이전트 개인화 과정에서 축적되는 정보들을 VectorDB에 저장하고 의미 기반으로 검색합니다.

Canon (메인 저장소):

  • Scribe: Canon에 정보 저장 (REST 모드에서만)
  • Memorize: Canon 의미 기반 검색
  • Find: Canon 키워드 기반 검색

Lore (서브 저장소):

  • Chronicle: Lore에 정보 저장 (REST 모드에서만, Lore 이름 지정)
  • Recall: Lore 의미 기반 검색
  • Recall Find: Lore 키워드 기반 검색

Canon과 Lore의 API는 완전히 분리되어 있습니다. Canon API로 Lore 데이터에 접근할 수 없고, 그 반대도 마찬가지입니다.

Spellbook은 단순한 저장소입니다. 무엇을 저장하고 언제 검색할지는 사용자가 결정합니다.

핵심 특징

  • ✅ Canon + Lore: 메인 저장소와 용도별 서브 저장소 분리
  • ✅ REST 상태 관리: 청킹 일관성 보장 (scribe/chronicle 공용)
  • ✅ 이중 검색: 의미 기반 + 키워드 기반 (Canon/Lore 각각)
  • ✅ nomic-embed-text: 768차원, 한글/영어 우수
  • ✅ HTTP/SSE MCP: Docker로 간편 배포
  • ✅ Bun 런타임: 빠른 시작, TypeScript 네이티브 실행

빠른 시작

📖 상세 설치 가이드:

  • 👤 사람: INSTALL.md - 대화형 설치 스크립트 사용
  • 🤖 AI Agent: INSTALL_AI.md - 환경 변수 설정 가이드

방법 1: Docker Compose (권장) ⭐

사전 요구사항: Docker, Ollama

git clone https://github.com/zilhak/spellbook.git
cd spellbook
./scripts/setup.sh   # 환경 확인 + 모델 다운로드 + 이미지 빌드
docker compose up -d

setup.sh가 Docker, Ollama 확인 및 임베딩 모델 다운로드, 이미지 빌드를 처리합니다. 첫 실행 시 시스템 가이드 seed가 자동으로 수행됩니다.

설정 커스터마이징 (선택):

cp .env.example .env
nano .env
환경 변수 기본값 설명
PORT 17950 Spellbook 서버 포트
QDRANT_PORT 17951 Qdrant 외부 포트
QDRANT_DATA_PATH ./data/qdrant 데이터 저장 경로
OLLAMA_HOST http://host.docker.internal:11434 Ollama 주소

방법 2: Bun 직접 실행 (개발용)

git clone https://github.com/zilhak/spellbook.git
cd spellbook
bun install

# Qdrant + Ollama 준비
docker run -d -p 17951:6333 qdrant/qdrant
ollama pull nomic-embed-text

# 개발 모드 (hot reload)
bun run dev

필요 조건: Bun (curl -fsSL https://bun.sh/install | bash)


Claude Code 설정

방법 1: CLI 명령어 (권장)

claude mcp add --transport http spellbook http://localhost:17950/mcp

방법 2: 수동 설정

~/.claude/mcp.json:

{
  "mcpServers": {
    "spellbook": {
      "url": "http://localhost:17950/mcp"
    }
  }
}

AI Agent 시스템 프롬프트 설정 (권장)

Spellbook을 효과적으로 활용하려면, AI Agent의 시스템 프롬프트(CLAUDE.md 등)에 다음과 같은 지침을 추가하는 것을 권장합니다:

## Spellbook 활용 규칙

- 모르는 개념, 프로젝트 컨벤션, 과거 결정 사항이 나오면 먼저 Spellbook에서 검색하라
- 세션 시작 시 get_index()로 어떤 정보가 저장되어 있는지 확인하라
- Canon 검색 (범용 지식):
  - 맥락/개념이 궁금할 때: memorize(query)
  - 정확한 용어를 알 때: find(keywords)
- Lore 검색 (프로젝트별 정보):
  - 맥락/개념이 궁금할 때: recall(lore, query)
  - 정확한 용어를 알 때: recall_find(lore, keywords)
- 중요한 결정, 새로운 패턴, 사용자 선호도가 확인되면 REST 모드로 저장하라
  - 범용 지식 → scribe (Canon)
  - 프로젝트 한정 정보 → chronicle (Lore)

이를 통해 Agent가 이전 세션에서 축적한 지식을 자연스럽게 활용하게 됩니다.


사용법

Canon 워크플로우 (메인 저장소)

// 1. REST 모드 진입
const session = await rest();

// 2. Canon에 청크 저장
await scribe({
  chunk: {
    text: "Docker Compose는...",
    metadata: {
      topic_id: "인프라",
      category: "technology",
      keywords: ["Docker", "Compose"],
      questions: ["Docker Compose 설정 방법은?"],
      entities: [{name: "Docker", type: "technology"}],
      importance: "high"
    }
  },
  session_id: session.session_id
});

// 3. REST 종료
await rest_end(session.session_id);

// Canon 검색
await memorize({query: "Docker 컨테이너 설정"});
await find({keywords: ["Docker", "Qdrant"]});

Lore 워크플로우 (서브 저장소)

// 1. REST 모드 진입
const session = await rest();

// 2. Lore에 청크 저장 (Lore가 없으면 자동 생성)
await chronicle({
  lore: "my-project",
  lore_description: "My Project 기술 결정사항",
  chunk: {
    text: "인증은 JWT 기반으로...",
    metadata: {
      topic_id: "auth",
      category: "architecture",
      keywords: ["JWT", "인증"],
      questions: ["프로젝트 인증 방식은?"],
      entities: [{name: "JWT", type: "technology"}],
      importance: "high"
    }
  },
  session_id: session.session_id
});

// 3. REST 종료
await rest_end(session.session_id);

// Lore 검색
await recall({lore: "my-project", query: "인증 방식"});
await recall_find({lore: "my-project", keywords: ["JWT"]});

// Lore 관리
await list_lores();              // 모든 Lore 목록 + 설명
await lore_stats("my-project");  // 특정 Lore 통계

데이터 관리

영속성 (Persistence)

Docker Compose 사용 시:

  • 호스트 경로 직접 사용 (.env의 QDRANT_DATA_PATH)
  • 컨테이너 재시작/재생성 시에도 데이터 자동 유지
# .env 파일에서 설정
QDRANT_DATA_PATH=/your/data/path

# 데이터 확인
ls -la /your/data/path

✅ 안전한 종료 (데이터 유지):

docker-compose down     # 컨테이너만 삭제, 데이터 유지
docker-compose restart  # 데이터 그대로 복구

백업/복원 (export/import)

export 도구 (백업)

# MCP 세션 초기화 후 export 호출
curl -X POST http://localhost:17950/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"initialize","params":{"clientInfo":{"name":"test"},"protocolVersion":"2024-11-05"},"id":1}'

# 세션 ID로 export
curl -X POST http://localhost:17950/mcp \
  -H "Content-Type: application/json" \
  -H "mcp-session-id: YOUR_SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"export","arguments":{}},"id":2}'

import 도구 (복원)

curl -X POST http://localhost:17950/mcp \
  -H "Content-Type: application/json" \
  -H "mcp-session-id: YOUR_SESSION_ID" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "import",
      "arguments": {
        "data": {
          "chunks": [
            {"text": "복원할 내용", "category": "knowledge"}
          ]
        }
      }
    },
    "id": 1
  }'

특징:

  • REST 세션 없이 직접 복원 가능
  • 각 청크에 대해 임베딩 자동 재생성
  • 성공/실패 개수 반환

개발

로컬 실행

# 의존성 설치
bun install

# Qdrant만 Docker로
docker-compose up -d qdrant

# 개발 모드 (hot reload)
bun run dev

# 타입체크
bun run typecheck

시스템 가이드 seed

# 최초 1회
bun run seed

MCP 도구

공용

도구 설명 제약
rest REST 모드 시작 -
rest_end REST 모드 종료 -
get_index 메타 목차 -
stats Canon 통계 -
filter_guide 필터 사용법 가이드 -
export Canon JSON 백업 -
import Canon JSON 복원 -

Canon (메인 저장소)

도구 설명 제약
scribe Canon에 청크 저장 REST 모드 필수
memorize Canon 의미 검색 -
find Canon 키워드 검색 -
get_topic 토픽 조회 -
erase Canon 청크 삭제 -
revise Canon 청크 수정 -

Lore (서브 저장소)

도구 설명 제약
chronicle Lore에 청크 저장 REST 모드 필수
recall Lore 의미 검색 -
recall_find Lore 키워드 검색 -
erase_lore Lore 청크 삭제 -
revise_lore Lore 청크 수정 -
list_lores 모든 Lore 목록 -
delete_lore Lore 삭제 (복구 불가) -
lore_stats Lore 통계 -
update_lore Lore 설명 수정 -

아키텍처

Claude Code
    │ HTTP/SSE (MCP Protocol)
    ▼
Spellbook (Bun + MCP SDK)
    │
    ├─ REST 세션 관리 (scribe/chronicle 공용)
    ├─ Canon 도구 (scribe, memorize, find)
    ├─ Lore 도구 (chronicle, recall, recall_find)
    ├─ Lore 관리 (list_lores, delete_lore, lore_stats, update_lore)
    ├─ 임베딩 (Ollama + nomic-embed-text)
    └─ VectorDB (Qdrant)
         ├─ Canon: chunks + chunks_metadata
         └─ Lore: lore_{name} + lore_{name}_metadata (각각)

기술 스택

구성요소 선택
런타임 Bun
언어 TypeScript (네이티브 실행)
MCP @modelcontextprotocol/sdk
VectorDB Qdrant
임베딩 Ollama + nomic-embed-text
HTTP Express

상세 문서

라이선스

MIT

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Spellbook

How do I install Spellbook?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Spellbook safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Spellbook still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.