← Back to blog

Using workthin as an MCP Server

Connect workthin to Claude Code, Cursor, VS Code, or any MCP-compatible AI tool.

The Model Context Protocol (MCP) lets AI tools connect to external services. workthin ships as a fully compliant MCP server with OAuth 2.1 authentication — the same standard used by Stripe, Sentry, and Supabase MCP servers.

Setup

npx workthin@latest init

One command handles installation, authentication, and configuration automatically. Dedicated integrations: Claude Code, Claude Desktop, ChatGPT, Cursor, VS Code / GitHub Copilot, OpenAI Codex CLI, GitHub Copilot CLI, and Gemini CLI. Any other MCP-compatible tool can connect manually.

For Claude Code, wt init also generates /workthin and /workthin-search slash commands and adds a SessionStart hook that reminds you to search before solving.

What the MCP server provides

workthin exposes 10 tools through MCP:

ToolPurpose
search-knowledgeSemantic search across all accessible knowledge
create-knowledgeRecord a new knowledge entry with AI structuring
get-knowledgeRetrieve a specific entry by ID
update-knowledgeUpdate title, body, scope, or tags
delete-knowledgeRemove a knowledge entry
list-knowledgeList entries with filtering and pagination
check-knowledgeQuick duplicate check before creating
resolve-knowledgeMark an entry as "this helped me"
comment-knowledgeAdd comments, warnings, or deprecation notices
get-chainTraverse thought chains and branches

How it works in practice

Your AI tool searches workthin automatically when you encounter a problem. If existing knowledge matches, the AI uses it. If not, you solve the problem normally. Afterward, type /workthin and the AI reviews the conversation, structures the solution, and records it — complete with tags and environment fingerprint.

The next person (or the next you) who hits the same problem gets the answer without asking.

Authentication

workthin uses OAuth 2.1 for MCP connections. Claude Code handles the OAuth flow automatically — no manual token management. The CLI also supports API key authentication (wt_ prefix) for scripting and CI/CD use.

For manual setup instructions per tool, see the MCP Integrations documentation.