swit-mcp: Instructions file for Claude Code

CLAUDE.md

swit-mcp CLAUDE.md is an instructions file for Claude Code from TykanN/swit-mcp. It costs 2,148 tokens per session, scanned A, original, MIT.

Project instructions for developing a Swit MCP server, which connects an AI agent to the Swit collaboration platform. They document commands, package management, authentication, and testing.

In plain words
What is it for?
Use them when installing dependencies, building, testing, linting, formatting, or changing the Swit MCP server.
Why use it?
They tell an agent how this particular project is built and tested, reducing mistakes such as using the wrong package manager or API settings.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is TykanN/swit-mcp's own configuration. It tells Claude Code how to work on swit-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything swit-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TykanN/swit-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/TykanN/swit-mcp/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/TykanN/swit-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swit-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tykann/swit-mcp/claude-md.svg)](https://agentmods.dev/instructions/tykann/swit-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/tykann/swit-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/tykann/swit-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,148 This file is loaded in full into every session.
When invoked 2,148 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02148 $0.02148
Opus 5 $0.01074 $0.01074
Sonnet 5 $0.00430 $0.00430
Haiku 4.5 $0.00215 $0.00215

Measured 7d ago against content hash 1f895b25398d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

swit-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 249 lines

How it starts

The opening of the file, as written. The whole thing — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Swit MCP Server

Swit 협업툴과 연동하는 Model Context Protocol (MCP) 서버 프로젝트입니다.

필수 명령어

패키지 관리

중요: 이 프로젝트는 PNPM을 사용합니다. npm 대신 pnpm을 사용하세요.

pnpm install           # 의존성 설치
pnpm run build         # TypeScript를 dist/로 빌드
pnpm run dev           # 개발 서버 실행 (hot reload)
pnpm test              # 테스트 실행 (Jest + nock)
pnpm run test:watch    # 테스트 워치 모드
pnpm run lint          # ESLint 검증
pnpm run format        # Prettier 포맷팅

개발 테스트

pnpm test -- swit-client.test.ts    # 특정 테스트 파일 실행
pnpm test -- --coverage             # 커버리지 포함 테스트

핵심 아키텍처

다층 인증 시스템

OAuth 2.0 플로우 (우선순위)

  • OAuthSettings - 환경 변수 검증 포함 설정 관리
  • OAuthManager - @swit-api/oauth 라이브러리 사용한 핵심 OAuth 연산
  • OAuthWebServer - OAuth 콜백 처리용 Express 서버 (기본 포트 3000)
  • TokenCache - 파일 시스템 지속성 (~/.swit-mcp-token.json)
  • AuthHelper - 고수준 인증 코디네이터

Bearer Token 대체 방식

  • OAuth 실패 시 SWIT_API_TOKEN 환경변수 사용
  • OAuth 초기화 실패 시 자동 대체

MCP 통합 패턴

서버 구조 (src/index.ts):

  • 6개 MCP 도구: OAuth 관리 2개 + Swit API 연산 4개
  • 모든 입출력에 대한 Zod 스키마 검증
  • 원본 API 컨텍스트 포함 구조화된 에러 응답

도구 카테고리:

  • OAuth: swit-oauth-status, swit-oauth-start
  • API: swit-workspace-list, swit-channel-list, swit-message-create, swit-message-comment-create

API 클라이언트 아키텍처

SwitClient 패턴:

  • 토큰 주입용 request interceptor가 있는 Axios 기반
  • 자동 OAuth 토큰 갱신 (만료 5분 전 버퍼)
  • 에러 보존 - API 응답이 에러 컨텍스트에 포함
  • OAuth와 대체 인증 간 깔끔한 분리

타입 안정성 시스템

스키마 관리 (src/schemas.ts):

  • OpenAPI 명세서(specs/swit-main.yaml)와 일치하는 Zod 스키마
  • 중요: OpenAPI 스펙이 스키마 구조의 Single Source of Truth
  • 런타임 검증에서 완전한 TypeScript 타입 생성
  • 페이지네이션, 필터링, 에러 응답 타이핑 포괄

중요한 구현 세부사항

ES 모듈 설정

  • TypeScript 소스임에도 모든 import는 .js 확장자 사용 필수
  • 타겟: ES2022 with ES modules
  • 빌드 출력: 선언 파일 포함 dist/ 디렉토리

환경 변수 설정

# OAuth 인증 (권장)
SWIT_CLIENT_ID=your-client-id
SWIT_CLIENT_SECRET=your-client-secret
SWIT_REDIRECT_URI=http://localhost:3000/callback  # 선택사항
OAUTH_PORT=3000                                   # 선택사항

# 대체 인증
SWIT_API_TOKEN=your-bearer-token
SWIT_API_BASE_URL=https://openapi.swit.io/v1     # 선택사항

Read the full file on GitHub · 249 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 249 lines · 2,148 tokens per session scan A 1f895b25398d

Subscribe to this mod's changes

swit-mcp CLAUDE.md is an instructions file published in the GitHub repository TykanN/swit-mcp (0 stars, last pushed 1y ago), licensed MIT. It adds 2,148 tokens to every session, about $0.0107 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens