Tag: Claude

  • Claude Code Getting Started: Installation, Firs (2026)

    Claude Code Getting Started: Installation, Firs (2026)

    Claude Code is Anthropic’s official CLI for Claude — a terminal-based agent you can point at any codebase and have it read, write, test, and ship code. It’s different from the Claude.ai chat interface in one key way: Claude Code can act, not just answer. It reads your actual files, runs your actual commands, and makes changes that stick.

    This guide walks you through installation, first run, and the commands that cover 90% of what you’ll do daily.

    What Claude Code Is (and Isn’t)

    Side-by-side cards defining what Claude Code is and is not
    Claude Code is a terminal agent — not a chat website.

    Claude Code runs in your terminal. It gives Claude access to your local machine — file system, shell, and any MCP servers you configure — so it can do real engineering work: implement features, fix bugs, write tests, explain unfamiliar codebases, and run multi-step agentic workflows.

    It is not a code autocomplete plugin (that’s what GitHub Copilot does). Claude Code is a conversational agent that works at the task level, not the token level. You describe what you want; it figures out the steps and executes them.

    Installation

    Claude Code requires Node.js 18 or later. Install via npm:

    npm install -g @anthropic-ai/claude-code

    Verify the install:

    claude --version

    That’s the only dependency. Claude Code is a Node.js CLI — no Docker, no Python env, no platform-specific setup beyond Node.

    First-Run Authentication

    The first time you run claude, it walks you through authentication. You have two options:

    Option 1: Claude subscription (Pro, Max, Team, Enterprise)
    Run claude, select “Login with Claude.ai,” and it opens a browser window to authorize. Your subscription covers Claude Code usage — no separate API billing.

    Option 2: Anthropic API key
    Set your API key as an environment variable before running:

    export ANTHROPIC_API_KEY="sk-ant-..."
    claude

    Or on Windows:

    $env:ANTHROPIC_API_KEY = "sk-ant-..."
    claude

    API key usage is billed per token at standard API rates. For heavy daily use, a Max subscription ($100–$200/month) is usually more economical than API billing.

    Your First Session

    Navigate to a project directory and start Claude Code:

    cd ~/projects/my-app
    claude

    Claude Code reads your directory automatically. At the > prompt, describe what you want:

    > What does this codebase do? Give me a 3-paragraph overview.
    

    Claude reads the files it needs and responds. No configuration required for basic usage — Claude Code infers context from the directory you’re in.

    The 5 Commands You’ll Use Daily

    Five stacked panels of daily Claude Code command habits
    The five commands you’ll use daily.

    1. claude — Start an interactive session

    claude

    Launches the REPL (read-eval-print loop). This is where you spend most of your time. Claude has access to your current directory’s files, can run bash commands, and can call any MCP servers you’ve configured.

    Within a session, you can:

    • Ask questions about the codebase
    • Request implementations (“add a rate limiter to the auth middleware”)
    • Have Claude run tests and fix failures
    • Use /help to see available slash commands
    • Use /clear to reset context without leaving the session
    • Press Escape twice to interrupt a running task

    2. claude -p "prompt" — One-shot non-interactive mode

    claude -p "What are all the API endpoints in this codebase?"

    Runs a single prompt and exits. No REPL. Good for scripting, CI pipelines, or quick one-off queries you don’t want to interrupt a workflow for. Output goes to stdout — pipe it wherever you need it.

    claude -p "Summarize the changes in the last 10 commits" | pbcopy

    3. claude mcp add — Connect an external tool

    claude mcp add github -- npx -y @modelcontextprotocol/server-github

    Adds an MCP server to your Claude Code configuration. After running this, Claude can call the server’s tools in any session. Common additions:

    # File system access (scoped to a directory)
    claude mcp add files -- npx -y @modelcontextprotocol/server-filesystem ~/Documents
    
    # GitHub integration
    claude mcp add github -- npx -y @modelcontextprotocol/server-github
    
    # Web search
    claude mcp add search -- npx -y @modelcontextprotocol/server-brave-search

    The GitHub and Brave Search servers need API tokens — set them as environment variables before the server starts, or pass them via the --env flag in the mcp add command.

    4. claude -c — Continue the last conversation

    claude -c

    Resumes your most recent Claude Code conversation, including all prior context. Essential for multi-session work on a feature. If you closed the terminal mid-task, claude -c picks up exactly where you left off.

    For a specific prior conversation:

    claude --resume SESSION_ID

    5. claude --model — Select the model for a session

    claude --model claude-opus-4-8

    Claude Code defaults to the most capable available model for your plan. You can override this per session. Current options:

    • claude-fable-5 — Highest capability, complex tasks (2x cost vs Opus 4.8)
    • claude-opus-4-8 — Default for most work, strong balance of quality and speed
    • claude-sonnet-4-6 — Faster responses, good for routine tasks
    • claude-haiku-4-5-20251001 — Fastest, lowest cost, short tasks

    Slash Commands Inside a Session

    While in a Claude Code session (> prompt), these slash commands are available:

    CommandWhat It Does
    /helpShow all available commands
    /clearClear conversation context (keep the session open)
    /compactCompress prior context to save tokens while preserving essential memory
    /costShow token usage and estimated cost for the current session
    /modelSwitch the model mid-session
    /reviewRequest a multi-agent code review of the current branch
    /initGenerate a CLAUDE.md file with project context for this repo
    /exitEnd the session

    CLAUDE.md — Project-Level Context

    Drop a CLAUDE.md file in your project root and Claude Code reads it automatically at session start. Use it to encode project-specific context Claude shouldn’t have to re-derive every session:

    # My Project
    
    ## Architecture
    - Backend: FastAPI + PostgreSQL
    - Frontend: React + TypeScript
    - Deployed to: AWS ECS
    
    ## Development
    - Tests: `pytest tests/`
    - Local server: `./scripts/start-dev.sh`
    - Database migrations: `alembic upgrade head`
    
    ## Rules
    - Never modify migration files directly
    - All API routes go in `src/routes/`
    - Use `httpx` not `requests` for HTTP calls

    Generate a starter CLAUDE.md for an existing project with /init.

    Permission Modes

    Five-step path: account, API keys, billing, usage, workspaces
    Permission modes — decide what the agent may touch.

    Claude Code asks for confirmation before running bash commands, creating files, or making other changes — unless you grant it broader permissions. There are three ways to control this:

    • Default: Claude asks before each tool use that modifies files or runs commands
    • --dangerously-skip-permissions: Skip all confirmations. Use only in isolated environments (Docker containers, CI). Not for everyday use on your primary machine.
    • Session-level allowlist: During a session, you can approve individual tools for the rest of the session by selecting “Allow always” when prompted

    For most work, the default confirmation behavior is the right trade-off — it keeps you in the loop on changes without requiring you to pre-define a permission policy.

    IDE Integration

    Claude Code integrates with VS Code and JetBrains IDEs. Install the extension from each marketplace, then launch Claude Code from inside the IDE. This keeps the terminal panel visible alongside your editor without alt-tabbing between windows.

    The IDE extensions also add shortcuts for common actions like opening Claude Code in the current file’s directory and running one-shot queries against the selected code.

    Related on Tygart Media: Claude Code billing · Claude Code vs Cursor · Claude Code tutorial.

    Frequently Asked Questions

    What’s the difference between Claude Code and Claude.ai?
    Claude.ai is the web chat interface — good for questions, document analysis, and writing. Claude Code is a terminal CLI that can access your local files, run commands, and act autonomously on multi-step tasks. Claude.ai can’t modify files on your machine; Claude Code can.

    Does Claude Code cost extra on top of my Claude subscription?
    No. Claude Pro, Max, Team, and Enterprise subscriptions include Claude Code access. You use the same account. Heavy agentic usage counts toward the plan’s usage limits, but there’s no separate Claude Code fee.

    Can Claude Code access the internet?
    Not by default. Claude Code’s built-in WebFetch tool can fetch content from a specific URL when you provide it. For live web search, add the Brave Search or similar MCP server. Claude can’t browse freely without explicit tool access.

    What does Claude Code do with my code?
    Claude Code sends the file contents and context it needs to the Anthropic API for inference. Standard Anthropic API data policies apply — if you’re using an API key, you can configure zero data retention. If you’re using a subscription, default Anthropic retention policies apply. Review Anthropic’s privacy policy for current details.

    Is Claude Code open source?
    Claude Code itself (the CLI client) is not open source — it’s an Anthropic product. The MCP server ecosystem it connects to includes many open-source servers, and the MCP specification itself is open.

    What version of Node.js do I need?
    Node.js 18 or later. Run node --version to check. The Long-Term Support (LTS) version is always a safe choice.

    Last verified: June 12, 2026. Claude Code is updated frequently — run npm update -g @anthropic-ai/claude-code to stay current.

  • What Is Model Context Protocol (MCP)? The Complete Guid (2026)

    What Is Model Context Protocol (MCP)? The Complete Guid (2026)

    Model Context Protocol (MCP) is the reason Claude can read your files, query your database, search the web, and push code to GitHub — all from inside a single conversation. Without it, Claude would be limited to whatever you paste in manually. With it, Claude connects to almost any external system.

    Quick answer: MCP is an open standard developed by Anthropic that lets AI models securely connect to external tools, data sources, and services through a standard client-server architecture (MCP getting started). You install an MCP server for the system you want Claude to access. Claude becomes a client that calls that server. The server executes the action and returns results.

    The Problem MCP Solves

    Flow from app/IDE through MCP to servers and data APIs
    The problem MCP solves: one protocol, many tools.

    Before MCP, connecting an AI model to external data meant one of two things: either the AI company built a native integration (slow, expensive, proprietary), or you cobbled together a pipeline that passed data manually between systems.

    Neither approach scales. If Claude natively supported every database, every API, every file format, and every SaaS tool on the planet, the model would be perpetually behind. And manual copy-paste workflows aren’t agentic — they require you to do all the coordination work the AI should be doing.

    MCP solves this with a universal adapter layer. Instead of building individual integrations, Anthropic defined a standard. Now any developer can build an MCP server for any system, and any MCP-compatible AI client (like Claude) can use it automatically.

    How MCP Works

    Three stacked layers: chat UI, tools, agent runtime
    How MCP works as a layer between tools and agents.

    MCP uses a client-server model over two transport mechanisms:

    • stdio: The MCP server runs as a local subprocess on your machine. Claude Code spawns it, communicates via standard input/output. This is the most common setup.
    • HTTP/SSE: The MCP server runs as a network service. Claude connects over HTTP with Server-Sent Events for streaming. Better for remote or shared servers.

    The communication protocol underneath is JSON-RPC 2.0 — a lightweight, well-understood standard for calling methods and getting results.

    Each MCP server exposes one or more of three primitives:

    • Tools: Functions Claude can call. Example: read_file(path), create_issue(title, body), run_query(sql). Claude decides when to call them based on context.
    • Resources: Data sources Claude can read. Example: the contents of a directory, a database schema, a project’s README. Resources are passive — they don’t take actions, they expose information.
    • Prompts: Reusable prompt templates that servers can provide to standardize how Claude interacts with them.

    When Claude sees a task that could benefit from an available tool, it calls the tool, receives the result, and incorporates it into the response. This happens automatically — you don’t have to tell Claude when to use MCP. Claude decides based on what the server exposes.

    MCP in Claude Code vs Claude Desktop

    Both Claude Code (the CLI tool) and Claude Desktop support MCP, but they configure servers differently.

    Claude Code

    Claude Code has built-in MCP management via the claude mcp command family:

    claude mcp add my-server -- npx -y @modelcontextprotocol/server-filesystem /path/to/directory
    claude mcp list
    claude mcp remove my-server

    Servers added with claude mcp add are stored in your Claude Code config (~/.claude.json or the project-level .claude/settings.json). Project-level configs let you commit MCP server setups to source control so the whole team gets them automatically.

    Claude Code also ships with a set of built-in tools that behave like MCP servers but don’t require separate installation: file read/write/edit, bash execution, glob search, grep, web fetch, and the agent spawning tools you’re reading about in this article.

    Claude Desktop

    Claude Desktop reads MCP server configuration from a JSON file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    A typical config entry looks like this:

    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/Documents"]
        },
        "github": {
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-github"],
          "env": {
            "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
          }
        }
      }
    }

    Restart Claude Desktop after editing the config. Each server you add appears in the Claude Desktop interface with a hammer icon, and Claude can access its tools in any conversation.

    The Most Useful MCP Servers

    Anthropic maintains a reference set of official MCP servers. These are the ones worth knowing:

    ServerWhat It DoesPackage
    FilesystemRead/write files and directories on your local machine@modelcontextprotocol/server-filesystem
    GitHubRead repos, create issues, open PRs, push code@modelcontextprotocol/server-github
    PostgreSQLRead-only SQL queries against a Postgres database@modelcontextprotocol/server-postgres
    SQLiteRead/write a local SQLite database file@modelcontextprotocol/server-sqlite
    Brave SearchLive web search via Brave’s Search API@modelcontextprotocol/server-brave-search
    PuppeteerHeadless browser — screenshot pages, scrape, fill forms@modelcontextprotocol/server-puppeteer
    SlackRead channels, send messages, search workspace@modelcontextprotocol/server-slack
    Google DriveRead and search Google Drive files@modelcontextprotocol/server-google-drive
    GitGit operations — log, diff, commit, branch management@modelcontextprotocol/server-git
    MemoryPersistent key-value knowledge graph across conversations@modelcontextprotocol/server-memory

    Beyond the official set, hundreds of community-built MCP servers cover everything from Notion and Linear to AWS and Docker. The MCP ecosystem grew faster than almost anyone expected after the November 2024 launch.

    Installing Your First MCP Server

    The fastest path is Claude Code with the filesystem server. This gives Claude read/write access to a directory you specify — useful for any project work.

    Prerequisites: Node.js installed (the server runs via npx).

    In your terminal:

    claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/Documents/projects

    That’s it. Open a Claude Code session. Claude can now list, read, write, and search files inside ~/Documents/projects. Try: “List all Python files in this directory and summarize what each one does.”

    For Claude Desktop, edit the claude_desktop_config.json file directly (see format above), then restart the app.

    What MCP Cannot Do

    Five red warning rows of MCP limitations
    What MCP cannot do — permissions and review still matter.

    A few things worth understanding before you build on MCP:

    MCP servers don’t persist between conversations. Each Claude session starts fresh. If you need state persistence, you need a server with its own storage layer (the Memory server handles this specifically).

    MCP doesn’t bypass Claude’s safety guidelines. Claude still decides whether to execute a tool call based on safety and ethics reasoning. Connecting a filesystem server doesn’t give Claude unlimited license to delete files — Claude will still confirm before destructive operations.

    Subprocess MCP servers are local. The stdio transport runs servers on your machine. This means they only work when you’re running Claude Code locally. For remote or team-shared access, you need HTTP/SSE transport with a hosted server.

    Security Considerations

    MCP servers have real permissions. The filesystem server can read and write files. The GitHub server can push code to your repos. The Postgres server can run SQL queries.

    Apply the principle of least privilege:

    • Scope filesystem servers to the directory you actually need, not /
    • Use read-only database credentials where you don’t need writes
    • Create GitHub tokens with minimum required scope (e.g., repo for private repos, not org-level admin)
    • Never commit environment variables containing API keys to source control, even in .claude/settings.json — use env var references instead

    MCP servers run with the permissions of the user running Claude. If something goes wrong with a tool call, it can have real consequences. The upside: everything runs locally and through your own credentials — there’s no MCP cloud intermediary with access to your data.

    MCP and Claude Code’s Agentic Workflows

    The full power of MCP shows up in Claude Code’s multi-step agentic mode. When Claude Code has access to git, a filesystem, a browser, and a search tool simultaneously, it can execute workflows like:

    1. Search the web for a library’s current API (Brave Search)
    2. Read your existing code to understand the integration point (filesystem)
    3. Write the updated code (filesystem write)
    4. Run tests (bash)
    5. Create a PR (GitHub)

    Each of these steps would require a separate tool in a traditional automation stack. With MCP, Claude orchestrates all of them within a single session, using whatever servers are available.

    This is what makes MCP the infrastructure layer for agentic AI — not a feature, but the foundation that makes complex AI-driven workflows possible.

    Related on Tygart Media: Claude MCP · Skills vs MCP vs plugins · how to use Claude.

    Frequently Asked Questions

    What does MCP stand for?
    Model Context Protocol. It’s an open standard for connecting AI models to external tools, data sources, and services through a standard client-server interface.

    Who created MCP?
    Anthropic created MCP and released it as an open standard in November 2024. The specification and reference servers are open-source on GitHub. While Claude is the primary client, other AI systems can implement MCP clients too.

    Do I need to install MCP to use Claude?
    No. Claude works without any MCP servers. MCP is an extension layer — you add servers when you want Claude to access specific external systems. Claude Code also ships with a set of built-in tools (file operations, bash, web fetch) that don’t require MCP installation.

    Is MCP available on Claude.ai (the web app)?
    MCP server support is primarily in Claude Desktop and Claude Code. The Claude.ai web interface has its own tool integrations (web search, document analysis) but doesn’t support custom MCP servers in the same way.

    What’s the difference between MCP tools and Claude’s native tools in Claude Code?
    Claude Code’s native tools (Read, Write, Bash, Glob, Grep, WebFetch, Agent) are built into the application and don’t require a separate server process. MCP servers are external — they run as subprocesses or network services that Claude Code connects to. Both expose tools that Claude can call; the mechanism for loading them is different.

    How do I build my own MCP server?
    Anthropic provides official SDKs for building MCP servers in TypeScript, Python, Go, and other languages. The TypeScript SDK (@modelcontextprotocol/sdk) is the most mature. Start with Anthropic’s MCP documentation and the reference server implementations on GitHub as templates.

    Last verified: June 12, 2026. MCP specification and server ecosystem evolve quickly — check the official Anthropic MCP documentation for the current spec.

  • Claude Fable 5: Capabilities, Pricing (2026)

    Claude Fable 5: Capabilities, Pricing (2026)

    Anthropic released Claude Fable 5 on June 9, 2026 — and it’s the most capable model the company has ever made publicly available. After tracking every Claude release since the original 100K context window dropped, I can say this one is different. Fable 5 isn’t just an incremental update. It’s Anthropic’s Mythos-class model — the one they’d been keeping restricted — now opened up to anyone with an API key or a Claude subscription.

    Here’s what you need to know: the pricing, the benchmarks, and the specific decision framework for when to use Fable 5 versus sticking with Opus 4.8.

    Quick answer: Fable 5 costs $10/$50 per million input/output tokens (2x the cost of Opus 4.8). It outperforms Opus 4.8 significantly on complex coding, long-horizon tasks, and scientific research. Use Fable 5 when quality on hard problems justifies the cost. Use Opus 4.8 for high-volume, well-scoped, routine work.

    Current lineup note (October 2026): Fable 5.1 is the current Fable SKU at the same $10/$50 headline rates (cache reads $0.25/MTok). Current Opus is Opus 5.5 at $4/$20; Opus 4.8 remains listed as legacy. The June 2026 comparisons below are the launch record for Fable 5.

    What Is Claude Fable 5?

    Three cards for fast volume, daily workhorse, and deep flagship Claude seats
    What is Claude Fable 5?

    Claude Fable 5 (claude-fable-5) is Anthropic’s first publicly available Mythos-class model. The Mythos line is Anthropic’s highest capability tier — models that were previously restricted to research and select enterprise partners because of their raw power. Fable 5 is the version Anthropic deemed safe enough to release broadly.

    The name shift (from the Opus/Sonnet/Haiku tier naming) signals something intentional. Fable 5 sits above the Opus line entirely. It’s a new ceiling.

    Key specs:

    • Context window: 1M tokens (same as Opus 4.8)
    • Max output: 128K tokens per request
    • Thinking: Adaptive (always on — not a separate “thinking mode”)
    • Vision: Yes
    • Tool use / function calling: Yes
    • Available: Claude API, AWS Bedrock, Vertex AI, Microsoft Foundry

    Claude Fable 5 Pricing

    Infographic ladder of Claude plans: Free, Pro, Max, Team, and Enterprise
    Fable 5 pricing — no sticky dollar stickers.
    ModelInput (per MTok)Output (per MTok)Context
    Claude Fable 5$10.00$50.001M tokens
    Claude Opus 4.8$5.00$25.001M tokens
    Claude Sonnet 4.6$3.00$15.001M tokens
    Claude Haiku 4.5$1.00$5.00200K tokens

    Fable 5 costs exactly 2x Opus 4.8 on API. On subscription plans (Pro, Max, Team, Enterprise seat-based), Fable 5 is included at no extra cost through June 22, 2026.

    The free-until-June-22 window matters if you’re evaluating whether to route your workloads to Fable 5. Use that window to benchmark it against your actual tasks before the 2x cost kicks in.

    Benchmark Performance: Where Fable 5 Pulls Away

    The benchmarks that matter most are the ones that measure what the model can do on real engineering work, not trivia:

    BenchmarkClaude Fable 5Claude Opus 4.8Delta
    SWE-bench Verified95.0%88.6%+6.4 pts
    SWE-bench Pro80.0%69.2%+10.8 pts
    FrontierCode29.3%13.4%~2.2x
    Senior Engineer benchmark91/100~63/100+45% absolute

    The Senior Engineer benchmark is the one I find most telling. It’s designed to be hard for people who write code for a living — and Fable 5 scores 45 percentage points higher than Opus 4.8. That gap is significant enough that it changes the calculus for serious engineering work.

    When to Use Claude Fable 5 (vs Opus 4.8)

    Decision fork between maximum capability when stakes are high and shipping daily when speed and cost matter
    When to use Fable 5 vs Opus.

    I’ve been routing tasks between models for long enough to have a framework. Here’s how I think about it:

    Use Fable 5 when:

    • You’re running a large migration, refactor, or multi-stage software project
    • Quality on a hard problem matters more than per-token cost
    • You’re doing deep research, complex analysis, or long-horizon agentic work
    • The task would otherwise take a senior engineer half a day or more
    • You’re in the free evaluation window (through June 22) and want to benchmark

    Use Opus 4.8 when:

    • The task is well-scoped and routine
    • You’re running high-volume pipelines where 2x cost compounds fast
    • Latency matters — Fable 5 can take 60 seconds to several minutes on complex tasks vs 3–15 seconds for Opus 4.8
    • The task falls in Fable 5’s restricted domains (cybersecurity, biology, chemistry, distillation) — in those categories, Fable 5 routes to Opus 4.8 anyway, so you’d pay Fable 5 prices for Opus 4.8 output

    The smart routing strategy: Fable 5 for the hard jobs, Opus 4.8 for the rest. Don’t use Fable 5 as your default model — the cost and latency delta aren’t worth it for routine tasks.

    Important Limitations to Know Before You Switch

    Two limitations that don’t get enough coverage:

    1. Safety classifier routing. Fable 5 includes enhanced safety classifiers. For prompts touching cybersecurity, biology, chemistry, and distillation, those classifiers route the request to a Claude Opus 4.8 fallback. You pay Fable 5 API rates ($10/$50) but get Opus 4.8 output. If your use case is in these domains, Fable 5 is not the upgrade it appears to be.

    2. Data retention requirement. Fable 5 carries a mandatory 30-day data retention policy — Anthropic needs retained prompts and outputs to operate the safety classifiers. Claude Opus 4.8 is available under zero data retention (ZDR). If your use case requires ZDR (healthcare, legal, finance with strict data handling), stick with Opus 4.8 until Anthropic updates Fable 5’s data policy.

    Availability

    Claude Fable 5 is generally available as of June 9, 2026 on:

    • Claude API (claude-fable-5)
    • Claude Platform on AWS / Amazon Bedrock
    • Google Cloud Vertex AI
    • Microsoft Azure AI Foundry / GitHub Copilot

    Subscription access (free through June 22, 2026): Claude Pro ($20/mo), Max 5x ($100/mo), Max 20x ($200/mo), Team, and seat-based Enterprise plans all include Fable 5 access at no extra charge during the launch window. After June 22, the plan-tier access picture may change — check Anthropic’s pricing page for updates.

    How This Changes the Claude Model Decision Tree

    Before Fable 5, the Claude decision tree was straightforward:

    • Need the best? → Opus 4.8
    • Need balance? → Sonnet 4.6
    • Need speed/cost? → Haiku 4.5

    Now it’s:

    • Hard problems, complex projects, long-horizon work → Fable 5
    • Everyday work, high-volume pipelines → Opus 4.8
    • Balance of cost and capability → Sonnet 4.6
    • Speed and cost optimization → Haiku 4.5

    The introduction of a model tier above Opus 4.8 doesn’t replace the existing lineup — it creates a new ceiling for the work that genuinely needs it.

    Related on Tygart Media: Fable 5 complete guide · Fable 5 firsthand · how to use Claude.

    Frequently Asked Questions

    Is Claude Fable 5 better than Opus 4.8?
    For complex coding, multi-stage tasks, and long-horizon work: yes, significantly. On SWE-bench Pro, Fable 5 scores 80.0% vs Opus 4.8’s 69.2% — a 10+ point gap. For routine, well-scoped tasks: the gap narrows enough that Opus 4.8’s 2x cost advantage makes it the smarter choice.

    What is the Claude Fable 5 API model ID?
    claude-fable-5. This is the API string you pass to model in your API calls.

    Does Fable 5 cost more than Opus 4.8?
    Yes — exactly 2x. Fable 5 is $10 input / $50 output per million tokens. Opus 4.8 is $5/$25. Through June 22, 2026, Fable 5 is included in Claude subscription plans at no extra cost.

    Can I use Claude Fable 5 for free?
    On Pro, Max, Team, and Enterprise subscription plans, yes — through June 22, 2026. API access is metered at $10/$50 per MTok from day one.

    Does Claude Fable 5 support zero data retention (ZDR)?
    No. Fable 5 carries a mandatory 30-day data retention requirement. If your use case requires ZDR, use Claude Opus 4.8, which supports it.

    What’s the difference between Claude Fable 5 and Claude Mythos 5?
    Mythos 5 is Anthropic’s fully restricted research model — not publicly available. Fable 5 is the Mythos-class model that Anthropic has prepared for general availability, with safety classifiers and the 30-day retention policy. You can think of Fable 5 as “Mythos for the real world.”

    Last verified: October 5, 2026. Anthropic pricing and availability subject to change — check Anthropic’s pricing page for current rates.

  • How to Get an Anthropic API Key (2026 Quick Guide)

    How to Get an Anthropic API Key (2026 Quick Guide)

    Last verified: September 26, 2026 (Pacific Time)

    Direct Answer (September 2026): To obtain an Anthropic API key: 1) Register at console.anthropic.com, 2) Navigate to Settings > Plans & Billing and deposit $5+ for Tier 1 activation, 3) Go to ‘API Keys’, click ‘Create Key’, and copy your secure sk-ant-api03-... key token.

    macOS / Linux:
    export ANTHROPIC_API_KEY="sk-ant-YOUR_KEY_HERE"
    Windows (PowerShell):
    setx ANTHROPIC_API_KEY "sk-ant-YOUR_KEY_HERE"

    Replace YOUR_KEY_HERE with the key shown once at creation — Anthropic never shows it again.

    An Anthropic API key is the secret token that authenticates your requests to Claude models over the API. It starts with sk-ant-, is created in the Anthropic Console at console.anthropic.com under API Keys → Create Key, and is displayed exactly once — requests only succeed after you add a payment method.

    Official links:Create a key (console) · API docs · API rates · Help center

    Quick answer: sign in at console.anthropic.com (it now redirects to the same developer console as platform.claude.com), add a payment method under Settings → Billing, click API Keys → Create Key, name it, and copy it immediately – Anthropic shows the key exactly once. Keys start with sk-ant-. The whole process takes about five minutes.

    Below is the full walkthrough, where to put the key so it doesn’t leak, the newer no-static-key option most tutorials haven’t caught up with, and the errors that account for nearly every failed first request. For the full reference – pricing tiers, key rotation, security, and workspace and organization keys – see our Anthropic API key reference and management guide.

    What you need before you start

    Desk with laptop, checklist notebook, and billing card ready before creating an Anthropic API key
    • An email address (or Google / SSO login)
    • A payment method – your key will not work until billing is set up, even though you can create one
    • Five minutes

    One distinction that confuses almost everyone: a Claude.ai subscription is not API access. Claude Pro, Max, and Team plans cover the Claude apps (web, desktop, mobile). The API is billed separately, by usage, through the developer console. You can have either one without the other – see our complete Claude pricing guide for how the two systems differ.

    Step 1: Create your account

    Open the Anthropic console ?

    Go to console.anthropic.com – Anthropic’s developer console. (Both console.anthropic.com and platform.claude.com land in the same place in 2026; older tutorials treat them as different sites.) Sign up with email, Google, or SSO, and answer the brief onboarding questions about whether you’re an individual or an organization. For a tour of everything inside the console, see our Anthropic Console guide.

    Step 2: Add billing

    Open billing settings ?

    In the console, open Settings → Billing and add a credit card (self-serve accounts typically purchase prepaid usage credits). Skipping this step is the #1 reason a brand-new key returns errors – the key exists, but requests are rejected until the account can be billed.

    Step 3: Create the key

    Create the key in the console ?

    Click API Keys in the left sidebar (direct link: platform.claude.com/settings/keys), then Create Key. Give it a descriptive name like my-app-dev – future you will thank present you when it’s time to rotate or revoke. If your organization uses multiple workspaces, note that keys are scoped to a workspace: the key only sees resources in the workspace it was created in.

    Step 4: Copy it immediately

    Developer copying a new API key into a password vault; secret string not readable

    The key is displayed exactly once. It starts with sk-ant- followed by a long string. Copy it straight into a password manager, a .env file, or your secrets manager. If you lose it, there is no way to view it again – you revoke it and create a new one (takes a minute, harms nothing).

    Where to put the key (and where never to put it)

    Diagram contrasting never places for API keys versus vault, env file, and secrets manager

    Set it as an environment variable named ANTHROPIC_API_KEY – every official Anthropic SDK reads that variable automatically, so your code never contains the key:

    • macOS / Linux:export ANTHROPIC_API_KEY=sk-ant-...
    • Windows (PowerShell):setx ANTHROPIC_API_KEY "sk-ant-..."
    • Python:client = anthropic.Anthropic() – no key argument needed
    • TypeScript:const client = new Anthropic() – same

    Never hardcode the key in source files, never commit it to a repository, and never paste it into a system prompt or chat message. Leaked Anthropic keys get scraped and drained like any other credential.

    The 2026 no-key option: OAuth login

    Newer than most guides: Anthropic’s CLI can authenticate without any static key. Run ant auth login and a browser window authorizes a short-lived OAuth profile on your machine – the SDKs and Claude Code pick it up automatically, and there is no permanent secret to leak or rotate. For CI servers and production workloads, Workload Identity Federation serves the same purpose. If you’re setting up a personal development machine in 2026, this is arguably the better default; create a static key when you need one for a deployed service.

    Test your key

    One request confirms everything works (Haiku keeps the test nearly free):

    curl https://api.anthropic.com/v1/messages 
     -H "x-api-key: $ANTHROPIC_API_KEY" 
     -H "anthropic-version: 2023-06-01" 
     -H "content-type: application/json" 
     -d '{"model": "claude-haiku-4-5", "max_tokens": 32, "messages": [{"role": "user", "content": "Say hello"}]}'

    A JSON response with a content array means you’re live.

    Troubleshooting the four common errors

    • 401 authentication_error – the key is missing, mistyped, or revoked. Subtle 2026 variant: if both ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN are set, the SDK sends both and the API rejects the request – unset one.
    • 403 permission_error – the key works but lacks access to that model or feature; check your key’s workspace and your organization’s model access.
    • 429 rate_limit_error – you’re sending faster than your usage tier allows. The response includes a retry-after header; official SDKs retry automatically. For tier details and fixes, see our Claude rate limits guide.
    • Key created but every request fails – almost always billing not completed (Step 2).

    FAQ

    Is the Anthropic API free? No – it’s usage-priced per million tokens with no permanent free tier (current rates in our Claude pricing guide and API token rates schedule, including the September 2026 lineup).

    Where do I find my existing API key? You can’t – Anthropic shows keys only at creation. Revoke the old one and create a replacement.

    Where is the API Keys page in console.anthropic.com? Sign in at console.anthropic.com, choose API Keys in the left navigation — or go straight to platform.claude.com/settings/keys — then click Create Key.

    Does my Claude Pro or Max subscription include an API key? No. App subscriptions and API billing are separate systems; an API account starts at $0 and bills per token used.

    Lineup currency (Sept 2026, verified): Sonnet 5 ($2/$10), Opus 5.5 ($4/$20), Haiku 4.5 ($1/$5), Fable 5.1 ($10/$50). Legacy (still listed): Opus 4.8 ($5/$25), Sonnet 4.6 ($3/$15).

    Sources

    >Part of the complete guide: Claude Pricing, Plans & Limits

  • Claude AI Updates (June 2026): Fable 5 & Features

    Claude AI Updates (June 2026): Fable 5 & Features

    Last verified: August 26, 2026 (Pacific Time)May 2026 edition covered the Opus 4.8 launch, the SpaceX compute deal, and Managed Agents memory features.

    Direct Answer (August 2026 Update): Major mid-2026 Anthropic releases introduced Claude Fable 5, native Model Context Protocol (MCP) tool integration in Claude Desktop, extended 1M context beta on Vertex AI/AWS Bedrock, and decoupled Enterprise seat pricing.

    June 2026 is one of the biggest months for Anthropic since the Claude 4 launch: a new top-tier model is generally available, two workhorse models retire in four days, and Managed Agents can now run inside infrastructure you control. Here is everything that changed, with dates and migration paths.

    Claude Fable 5 — the Mythos-class model goes public (June 9, 2026)

    Abstract milestone timeline from early Claude eras through today without version numbers
    Fable 5 launch — keep the timeline abstract.

    Anthropic released Claude Fable 5 on June 9, 2026 — the public version of what had been known as its Mythos-class model tier. It is positioned as a new tier above Opus, and it is Anthropic’s most capable generally available model. According to CNBC’s launch coverage, Fable 5 scored more than 10% higher than Claude Opus 4.8 on some benchmarks, with exceptional performance across software engineering and knowledge work. Anthropic credits new safeguards that block responses in specific high-risk areas for making a broad release possible.

    The practical details developers need:

    • Model ID: claude-fable-5
    • Availability: enterprise customers and paid subscribers
    • Context window: 1 million tokens; maximum output 128K tokens
    • API pricing: $10 per million input tokens / $50 per million output tokens
    • API surface: adaptive thinking only — temperature, top_p, top_k, and budget_tokens are not accepted, and unlike Opus 4.8, an explicit thinking: {type: "disabled"} returns a 400 error. Omit the thinking parameter entirely if you do not want it.

    For where Fable 5 sits against every other Claude model on price, see our continuously updated Claude AI pricing guide, and our complete Fable 5 guide for capabilities and use cases.

    June 15 deadline: Claude Opus 4 and Sonnet 4 retire in four days

    If you are still calling claude-opus-4-20250514 or claude-sonnet-4-20250514, those models retire from the Claude API on June 15, 2026. Requests after retirement return 404 errors. The drop-in replacements:

    • claude-opus-4-20250514 → claude-opus-4-8
    • claude-sonnet-4-20250514 → claude-sonnet-4-6

    Note that both replacements use adaptive thinking rather than manual thinking budgets, and the 4.6+ models reject assistant-turn prefills — so this is a small migration, not just a string swap. Anthropic also deprecated Claude Opus 4.1 this month, with API retirement scheduled for August 5, 2026 — worth adding to your migration calendar now.

    Current Claude model lineup and API pricing (June 2026)

    Three cards for fast volume, daily workhorse, and deep flagship Claude seats
    Current lineup by job — no sticky version stickers on art.
    Model Model ID Context Max output Input $/1M Output $/1M
    Claude Fable 5 claude-fable-5 1M 128K $10.00 $50.00
    Claude Opus 4.8 (legacy — still listed) claude-opus-4-8 1M 128K $5.00 $25.00
    Claude Opus 4.8 (legacy — still listed) claude-opus-4-8 1M 128K $5.00 $25.00
    Claude Sonnet 4.6 (legacy — still listed) claude-sonnet-4-6 1M 64K $3.00 $15.00
    Claude Haiku 4.5 claude-haiku-4-5 200K 64K $1.00 $5.00

    Opus 4.7, 4.6, 4.5, and 4.1 and Sonnet 4.5 remain active for pinned workloads. We track which model is current at any moment in our current Claude model version reference.

    Managed Agents: self-hosted sandboxes and private MCP servers

    Three stacked layers: chat UI, tools, agent runtime
    Managed Agents and private MCP servers.

    Claude Managed Agents — Anthropic’s server-managed agent platform — can now execute tools inside a sandbox you control. The agent loop still runs on Anthropic’s orchestration layer, but bash commands, file operations, and code execution happen in your own container, behind your own firewall, with your own egress rules. Your worker long-polls Anthropic’s work queue over outbound-only connections; Anthropic never dials into your network. Managed Agents can also now connect to private MCP servers, which matters for any organization whose internal tools are not on the public internet.

    For regulated industries — healthcare, finance, legal — this is the missing piece that lets you adopt hosted agents while keeping data residency: files and tool output never leave infrastructure you own.

    Claude Code: nested sub-agents and plugin search

    Claude Code shipped a steady stream of updates in June: nested sub-agents (agents can now spawn their own sub-agents for deeper task decomposition), smarter model and region handling, a new plugin search, and improved Chrome, VS Code, and terminal workflows.

    Legal expansion: 20+ MCP connectors and 12 practice-area plugins

    Anthropic released more than 20 new legal MCP connectors and 12 practice-area plugins, covering research, contracts, discovery, matter management, and legal aid. The pattern to note: Anthropic is increasingly shipping vertical integration bundles rather than leaving connector-building entirely to the ecosystem.

    Claude Corps: $150M for nonprofit AI adoption

    Anthropic announced Claude Corps, a $150 million fellowship program that will embed roughly 1,000 trained fellows inside nonprofit organizations for a year to help them use AI effectively. Applications and program details are rolling out through Anthropic’s newsroom.

    Apple Foundation Models integration

    Claude support is coming to Apple’s Foundation Models framework on iOS 27, iPadOS 27, macOS 27, and visionOS 27 — meaning third-party Apple developers will be able to call Claude through Apple’s native AI framework rather than integrating the API directly.

    What to watch for in July

    • August 5, 2026: Claude Opus 4.1 retires from the API — migrate to claude-opus-4-8 before then.
    • Fable 5 ecosystem: expect Claude Code, Cowork, and Managed Agents to expose Fable 5 more broadly through July as capacity scales.
    • Apple rollout: developer betas of the iOS 27 family will show what Claude-via-Foundation-Models actually looks like in practice.

    Sources

    💼 Deploying Claude or AI Infrastructure in Your Business?

    At Tygart Media, we engineer custom Model Context Protocol (MCP) servers, multi-model content pipelines, and AI operational systems. Explore our Claude AI Team Implementation Services or check out our complete Restoration Operations & AI Kit.

  • Claude Fable 5 Complete Guide

    Claude Fable 5 Complete Guide

    
    New in 2026

    Everything you need to know about Anthropic’s new frontier tier — pricing, context window, model comparisons, and how to route the right work to the right model.

    Updated June 2026 · ~14 min read · Includes interactive calculators
    Lineup update (September 2026): Since this guide was last fully updated, Anthropic shipped Opus 5.5 ($4/MTok in, $20/MTok out) and Sonnet 5 ($2/MTok in, $10/MTok out) as its current flagship and mid-tier models. Fable 5.1 remains the top-tier model referenced throughout, at the same $10/$50 pricing shown below. Opus 4.8 and Sonnet 4.6 are now legacy — still supported, no longer current default.

    What Is Claude Fable 5?

    Three cards for fast volume, daily workhorse, and deep flagship Claude seats
    What is Claude Fable 5?

    Claude Fable 5 is Anthropic’s new frontier model tier — positioned above Opus in the lineup and designed for tasks where raw capability, extended reasoning depth, and massive context handling matter more than cost. Where Opus 4.8 set the bar for complex multi-step reasoning, Fable 5 raises it with a 1-million-token context window, enhanced agentic autonomy, and improved performance on long-horizon software engineering, research synthesis, and cross-domain analysis tasks.

    The “Fable” naming signals a new generation of model architecture rather than an incremental update. Anthropic positions it as the model you reach for when a task exceeds what Opus can do reliably — not as a replacement for Opus, Sonnet, or Haiku in their respective cost tiers.

    Quick Facts — Claude Fable 5

    Context Window
    1M
    tokens (~750K words)
    Max Output
    32K
    tokens per response
    Input Price
    $10
    per million tokens
    Output Price
    $50
    per million tokens
    Cache Write
    $12.50
    per million tokens
    Cache Read
    $1.00
    per million tokens
    Key positioning: Fable 5 is the model for tasks where Opus 4.8 produces reliable but imperfect results — long codebase audits, full-document analysis, complex multi-agent orchestration, and strategic synthesis across large corpora. For most production workflows, Sonnet remains the value pick.
    Before you price this out: The table below reflects the June 2026 lineup (Fable 5, Opus 4.8, Sonnet 4.6, Haiku 4.5). As of September 2026, Opus 5.5 ($4/$20) and Sonnet 5 ($2/$10) are Anthropic’s current models — priced lower than the legacy Opus 4.8 / Sonnet 4.6 rows shown here.

    Full Model Lineup Comparison

    Pyramid diagram of Claude tiers: fast volume base, production workhorse middle, deep flagship peak
    Full model lineup comparison.

    Here’s how the complete 2026 Claude lineup stacks up across every dimension that matters for production usage:

    Model Input $/M Output $/M Context Max Out Vision Tool Use Extended Think Best For
    ◆ Fable 5 $10 $50 1M 32K ✓ ✓ ✓ Deep Max-capability tasks, 1M+ context
    ◆ Opus 4.8 $5 $25 200K 32K ✓ ✓ ✓ Complex reasoning, agentic workflows
    ◆ Sonnet 4.6 $3 $15 200K 16K ✓ ✓ ✓ Production apps, content at scale
    ◆ Haiku 4.5 $1 $5 200K 8K ✓ ✓ — High-volume, latency-sensitive tasks

    Prices are per million tokens. Cache read is 90% cheaper than standard input across all models. Batch API provides an additional 50% discount on both input and output.

    Capability Matrix — What Each Model Can Do

    Capability Fable 5 Opus 4.8 Sonnet 4.6 Haiku 4.5
    Full codebase analysis (>500K tokens)✓ Native⚠ Chunked✗✗
    Extended thinking / chain-of-thought✓ Deep✓✓✗
    Multi-step agentic orchestration✓ Best✓GoodLimited
    Computer use✓✓✓✗
    MCP tool integration✓✓✓✓
    Prompt caching✓✓✓✓
    Batch API (50% discount)✓✓✓✓
    PDF / document analysis✓✓✓Limited
    Real-time streaming✓✓✓✓
    Structured JSON output✓✓✓✓

    Interactive Cost Calculator

    Estimate your monthly API spend across the full model lineup. Enter your token volumes below — the calculator models prompt caching and Batch API discounts automatically.

    Token Cost Calculator

    Estimated Monthly Cost
    $0.00

    Which Claude Model Should You Use?

    Decision diagram from task shape to deep reasoning, daily shipping, or high-volume cheap calls
    Which Claude model should you use?

    Answer three questions to get a model recommendation tailored to your use case.

    Model Picker — 3 Questions
    1. How large is your context? (document/codebase size)
    Under 50K tokens
    50K–200K tokens
    200K–1M tokens
    2. How complex is the task?
    Simple / structured (classify, extract, format)
    Moderate (draft, summarize, QA)
    Complex (reason, plan, code, orchestrate)
    3. How cost-sensitive is this workload?
    Very — high volume, every cent counts
    Moderate — quality matters more than cost
    Not sensitive — quality and capability first

    How We Actually Use Each Model

    These are real production workflows mapped to the right tier — built from running Claude in content operations, publishing automation, and knowledge management at scale. No hypotheticals.

    Haiku 4.5 — High Volume
    Daily SEO Refresh Pipeline
    • 25-post-per-day SEO metadata refresh
    • Article classification and tag assignment
    • Structured data extraction from web pages
    • Keyword density checks across large post archives
    • Link validation and redirect flagging
    Sonnet 4.6 — Production Default
    Editorial Content at Scale
    • Desk article writing (1,200–2,500 words)
    • Content brief execution from keyword clusters
    • FAQ and schema markup generation
    • Cross-site content adaptation and localization
    • Monthly client update drafts and summaries
    Opus 4.8 — Complex Reasoning
    Workers & Deep Refreshes
    • Agentic Notion Workers (multi-step pipelines)
    • Deep content refresh with competitive gap analysis
    • Multi-database synthesis and reporting
    • Strategy documents requiring extended reasoning
    • Code generation for automation scripts
    Fable 5 — Max Capability
    Portfolio Audits & Strategy
    • Full-site content audits (500+ posts in single context)
    • Cross-domain strategy synthesis across large corpora
    • Complex multi-agent orchestration at the flagship tier
    • Long-horizon planning requiring deep reasoning depth
    • Codebase-wide analysis and architecture review
    Routing principle: The right model is the cheapest one that reliably completes the task. Haiku handles volume. Sonnet handles production. Opus handles complexity. Fable 5 handles scale + complexity together — specifically the cases where you’d need Opus and more context than Opus can hold.

    The Economics: Routed vs All-Fable

    Smart model routing is where API costs get controlled. Here’s a real-world comparison of a mixed content-and-automation workload at scale — routed vs running everything on Fable 5.

    Workload Monthly Volume Routed Model Routed Cost All-Fable 5 Cost Savings
    SEO metadata batch refresh750 posts/moHaiku 4.5 + Batch$1.20$18.7593% less
    Article drafting90 articles/moSonnet 4.6$8.10$67.5088% less
    Agentic worker runs200 runs/moOpus 4.8$22.50$45.0050% less
    Full-site portfolio audits4 audits/moFable 5$24.00$24.00—
    Total—Routed$55.80$155.2564% less

    Stacking Discounts: Caching + Batch API

    Two discount mechanisms compound independently:

    • Prompt caching: Cache your system prompt and shared context once. Subsequent requests pay ~10% of the input price for cache reads. On Fable 5, that’s $1.00/M instead of $10.00/M on cached tokens — a 90% reduction on your largest cost lever.
    • Batch API: Submit requests asynchronously (results within 24 hours) for a flat 50% discount on both input and output. Works on all four models. Best for non-real-time workloads like overnight refreshes, audits, or bulk classification.
    • Stacked: Caching + Batch combined can bring effective Fable 5 input cost from $10/M to ~$0.50/M on cached tokens — making it economically viable for high-volume tasks that previously only fit Haiku’s budget.

    See our Claude context window guide for more on how to structure prompts to maximize cache hit rates.

    Claude Fable 5 FAQ

    Claude Fable 5 sits above Opus 4.8 in the lineup. The primary difference is context window size — Fable 5 offers 1 million tokens vs Opus 4.8’s 200K — and the depth of extended reasoning for highly complex tasks. Opus 4.8 remains the right choice for most complex agentic workflows at half the cost. Fable 5 is best when you need both maximum context and maximum reasoning depth simultaneously, or when a task has routinely hit the limits of what Opus can do reliably.
    Claude Fable 5 is priced at $10 per million input tokens and $50 per million output tokens — 2× Opus 4.8 ($5/$25), 3.3× Sonnet 4.6 ($3/$15), and 10× Haiku 4.5 ($1/$5). Prompt caching drops the effective input cost to $1.00/M on cache reads, and the Batch API adds a 50% discount on all tokens for non-real-time workloads. Stacking both discounts makes Fable 5 viable for higher-volume use cases than the base price suggests.
    Claude Fable 5 has a 1-million-token context window — approximately 750,000 words or roughly 1,500 pages of text. This is 5× the context window of Opus 4.8, Sonnet 4.6, and Haiku 4.5 (all 200K). In practice, a 1M context window lets you pass entire codebases, long research corpora, or full document archives in a single API call without chunking or retrieval workarounds. For more on context window mechanics, see our full context window guide.
    Yes. Claude Fable 5 is available through the Anthropic API using the model ID claude-fable-5-20260101 (check the Anthropic documentation for the exact identifier). It supports the same API surface as the rest of the Claude family — streaming, tool use, prompt caching, vision, the Batch API, and MCP server integration. Access requires an Anthropic API account with Fable 5 enabled on your usage tier.
    Fable 5 is available in Claude.ai on the Pro and Team plans. The interface lets you select it from the model picker when starting a conversation. Like Opus, Fable 5 in claude.ai has message limits that reset on a rolling window — it’s designed for individual complex tasks rather than high-volume API workloads. For production-scale usage, the API with the Batch API discount is the more economical path.
    Yes — and Fable 5’s extended thinking is the deepest in the lineup. Where Opus 4.8 supports extended thinking for complex reasoning tasks, Fable 5 uses a more capable reasoning engine designed for tasks that require longer chains of inference, more working memory, and more reliable self-correction. It’s particularly effective on math, logic, long-horizon planning, and tasks where the model needs to hold and manipulate many interdependent concepts simultaneously.
    For most content production — articles, blog posts, social copy, summaries, SEO content — Sonnet 4.6 is the right call. It produces high-quality output at 3.3× less cost than Fable 5, and for typical content lengths (500–3,000 words), the quality difference is minimal. Reach for Fable 5 when you need to synthesize across a very large corpus (e.g., auditing 200+ posts simultaneously), when the content requires deep domain reasoning that benefits from extended thinking, or when the task involves both large-context ingestion and complex output generation in a single pass.
    Three levers in order of impact: (1) Model routing — only use Fable 5 when the task genuinely requires it; route everything else to Opus, Sonnet, or Haiku based on complexity and volume. (2) Prompt caching — structure your system prompt and shared context so it can be cached; cache reads cost $1.00/M instead of $10.00/M on Fable 5. (3) Batch API — submit non-real-time workloads via the Batch API for a flat 50% discount. Stacking all three — routing + caching + batch — can reduce effective per-task costs by 85–95% compared to unoptimized Fable 5 calls.

    More Claude Guides from Tygart Media

    We run Claude in production every day. These are the guides that come from using it, not just writing about it.

    Related on Tygart Media: Claude Fable 5 overview · Fable 5 firsthand · Claude pricing.

  • Connect Claude Code to Postgres via MCP: The Right Way (2026)

    Connect Claude Code to Postgres via MCP: The Right Way (2026)

    The most useful thing you can wire into Claude Code isn’t a new model or a clever prompt — it’s your actual database. When Claude Code can read your schema, it stops guessing at table names, column types, and relationships. It starts writing queries that work the first time.

    This is the practical walkthrough for connecting Claude Code to a Postgres database via MCP: the command, the credential setup, the safety pattern, and what the workflow actually looks like once it’s running.

    Last refreshed: October 8, 2026 (Pacific)

    What the Postgres MCP server does

    Flow from app/IDE through MCP to servers and data APIs
    What the Postgres MCP server does.

    The official @modelcontextprotocol/server-postgres package (maintained in the MCP reference implementations repo) gives Claude Code four tools: schema inspection, query execution inside a read-only transaction, table detail lookup, and relationship traversal. The server cannot write data — it’s read-only by design in the reference implementation, though third-party variants like postgres-mcp-pro add configurable write access if you need it.

    For the majority of development workflows — debugging, writing migrations, generating queries — read-only is exactly what you want. Claude Code can see the shape of your data without being able to touch it.

    The fastest path: single command setup

    Side-by-side cards defining what Claude Code is and is not
    Fastest path — single command setup.

    If you just want it running against a local database:

    claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres "postgresql://USER:PASSWORD@localhost:5432/mydb"

    The -y flag on npx auto-accepts the package install so the command doesn’t hang on first run. Verify with:

    claude mcp list

    You should see postgres with a connected status. That’s it — Claude Code now has schema access in the current project.

    Don’t do this for a production database. The connection string above is hardcoded. It goes into ~/.claude.json as plaintext. Use a dedicated local or staging database during development, and use env vars for anything that matters.

    The right way: env vars and a read-only user

    Five security domains: identity, data, code governance, audit, agents
    Right way — env vars and a read-only user.

    Two things to do before connecting to any real database:

    1. Create a read-only Postgres user:

    CREATE USER claude_readonly WITH PASSWORD 'your-password-here';
    GRANT CONNECT ON DATABASE your_db TO claude_readonly;
    GRANT USAGE ON SCHEMA public TO claude_readonly;
    GRANT SELECT ON ALL TABLES IN SCHEMA public TO claude_readonly;
    ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO claude_readonly;

    This user can see everything in public and do nothing else. If something goes wrong — a rogue tool call, a compromised session — blast radius is zero.

    2. Reference the connection string via env var in .mcp.json:

    {
      "mcpServers": {
        "db": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-postgres"],
          "env": {
            "POSTGRES_CONNECTION_STRING": "${DATABASE_URL}"
          }
        }
      }
    }

    Set DATABASE_URL in your shell environment or in a .env file (not committed). Add .mcp.json to the repo — everyone on the team gets the same server config — but the actual connection string lives in each developer’s local environment. This is the same pattern you already use for application config. It’s the right pattern here too.

    Add the server at project scope so it’s committed:

    claude mcp add --scope project --transport stdio db -- npx -y @modelcontextprotocol/server-postgres

    Then edit .mcp.json to replace the hardcoded connection string with the ${DATABASE_URL} env var reference shown above.

    What Claude Code can actually do with schema access

    Once the server is connected, the workflow changes significantly. A few real examples:

    Schema exploration: Ask Claude Code “what tables are in this database and how are they related?” and it traverses foreign keys, describes join paths, and builds a mental model of your data layer. No more copy-pasting \dt output.

    Query generation: “Write a query that finds users who signed up in the last 30 days but haven’t completed onboarding” produces accurate SQL because Claude Code knows your actual column names. With a generic prompt and no schema access, you’d get plausible-looking SQL that fails because user_status is actually onboarding_state.

    Migration drafting: “I need to add a last_login_at column to users — show me the migration and check for existing timestamp patterns in the schema.” Claude Code inspects the schema first, matches your existing column naming conventions, and produces a migration that fits your codebase.

    Debugging: “This query is returning the wrong count — here’s the query, check it against the schema.” Claude Code can spot that you’re joining on a nullable column, missing a filter on a soft-delete flag, or aggregating before filtering.

    Neon and cloud Postgres

    If you’re on Neon, there’s a first-party MCP server with additional capabilities: branch management, database creation, and schema migrations via Neon’s branching model. Set it up with:

    npx neonctl mcp add

    This runs OAuth through your browser and configures Claude Code automatically. The Neon MCP server is intended for local development and IDE workflows — not production automation — same caution applies.

    Debugging when it doesn’t connect

    Three commands for when the server shows as disconnected:

    claude mcp list          # check registered servers and status
    claude mcp test db       # test a specific server
    claude --debug           # tail logs including MCP stderr output

    Most connection failures are either a wrong connection string, a missing env var, or Node version issues with npx. The debug log shows the exact error from the server process — read it before assuming the problem is Claude Code.

    The practical baseline

    Five minutes to set up. The productivity delta on any codebase larger than a few tables is immediate — Claude Code stops making column-name mistakes and starts being genuinely useful for data-layer work. Wire up the read-only user, commit the .mcp.json, and add DATABASE_URL to your team’s .env.example. Done.

    The model doing the work in a typical Claude Code session is claude-sonnet-5-5 (workhorse) — it handles schema-aware query generation well without burning through Opus 5.5 credits on every lookup.

    Related Reading

    Frequently Asked Questions

    How do I connect Claude Code to a Postgres database via MCP?

    Run: claude mcp add postgres — npx -y @modelcontextprotocol/server-postgres “postgresql://USER:PASSWORD@localhost:5432/mydb”. The -y flag auto-accepts the package install so the command doesn’t hang. Then run claude mcp list and confirm postgres shows a connected status. Use a local or staging database for this quick path, not production.

    Is the Postgres MCP server read-only?

    Yes. The official @modelcontextprotocol/server-postgres package is read-only by design — it exposes schema inspection, query execution inside a read-only transaction, table detail lookup, and relationship traversal. It cannot write data. Third-party variants like postgres-mcp-pro add configurable write access if you need it.

    What’s the safe way to connect Claude Code to a production database?

    Create a dedicated read-only Postgres user (GRANT SELECT only), and reference the connection string through an environment variable in .mcp.json using ${DATABASE_URL} rather than hardcoding it. Commit .mcp.json so the team shares the server config, but keep the actual connection string in each developer’s local .env. If a session is ever compromised, the blast radius is zero.

    Why does schema access make Claude Code more accurate?

    With schema access, Claude Code reads your real table names, column types, and relationships, so it writes queries that work the first time instead of guessing. Without it, you get plausible-looking SQL that fails because user_status is actually onboarding_state. It also improves migration drafting and query debugging by matching your existing conventions.

    How do I debug a Postgres MCP server that won’t connect?

    Use three commands: claude mcp list to check registered servers and status, claude mcp test db to test a specific server, and claude –debug to tail logs including MCP stderr. Most failures are a wrong connection string, a missing env var, or a Node version issue with npx — the debug log shows the exact server error.

  • Claude Code vs Codex CLI (2026): A Hands-On Head-to-Head

    Claude Code vs Codex CLI (2026): A Hands-On Head-to-Head

    Last verified: June 2026.

    Both Claude Code and OpenAI Codex CLI are terminal-native coding agents: you run them inside a repo, they read your files, edit code, run commands, and iterate. I run both daily on real projects. This is the head-to-head I wish existed when I was deciding which one to make my default. No benchmarks-chasing, just install commands, config files, pricing math, and where each one actually earns its keep. For the broader toolchain these slot into, see our AI operator’s stack.

    Claude Code vs Codex CLI: the short answer

    Side-by-side cards defining what Claude Code is and is not
    Claude Code vs Codex CLI — the short answer.

    If you want one sentence: Claude Code is the more mature agentic harness (subagents, hooks, skills, deep MCP, a flat-rate plan that makes heavy use affordable), while Codex CLI is the leaner, cheaper-per-token option with strong raw coding from the GPT-5.x line and a tight sandbox model. Most teams that live in the terminal all day end up on Claude Code for the workflow tooling; people who want a fast, low-cost agent on top of an existing OpenAI subscription reach for Codex.

    The honest version: they are closer than tribal arguments suggest. The deciding factors are almost never “which model is smarter this week” and almost always pricing structure, sandbox defaults, and how much workflow scaffolding you need.

    How do you install each one?

    Five stacked panels of daily Claude Code command habits
    How do you install each one?

    Claude Code installs from npm and runs as the claude command:

    npm install -g @anthropic-ai/claude-code
    cd your-project
    claude

    First run walks you through OAuth login (Pro/Max plan) or an ANTHROPIC_API_KEY. On Windows it runs natively in PowerShell now, though a lot of operators still prefer it under WSL for fewer path headaches.

    Codex CLI ships an install script and is also on npm:

    # Mac / Linux
    curl -fsSL https://chatgpt.com/codex/install.sh | sh
    
    # Windows (PowerShell)
    powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
    
    # or via npm
    npm install -g @openai/codex

    Then codex in your repo. Auth is either a ChatGPT login (Plus/Pro/Business) or an OpenAI API key via codex login. Both tools are open-source clients hitting hosted models, so the install is the easy part; the model access is what you are really buying.

    Which models do they run in 2026?

    Claude Code defaults to the current Claude flagship. As of June 2026 that is Opus 4.8 (legacy — still listed) for the hardest reasoning, with Sonnet 4.6 (legacy — still listed) as the fast everyday workhorse and Haiku 4

    Lineup currency (Sept 2026): Current API list (Sept 2026, verified): Sonnet 5 $2/$10, Opus 5.5 $4/$20, Haiku 4.5 $1/$5, Fable 5.1 $10/$50. Legacy (still listed on Anthropic’s card): Opus 4.8 $5/$25, Sonnet 4.6 $3/$15.

    .5 for cheap, high-volume calls. You switch in-session with /model. Opus 4.8 also exposes reasoning-effort levels (high is the default; xhigh and max push deeper on gnarly problems at higher token cost).

    Codex CLI runs the GPT-5.x coding line. GPT-5.5 is the current recommended default for complex coding and agentic work, GPT-5.4-mini is the faster/cheaper option for light tasks and subagents, and GPT-5.3-Codex remains a strong coding-tuned choice. Pick the model with codex -m gpt-5.5 or set it in your config.

    Practical read: on a clean, well-specified function both produce good code. The gap shows up on long, multi-file refactors where the agent has to hold a lot of context and recover from its own mistakes. That is a harness problem as much as a model problem, which is the next section.

    What about workflow features: subagents, hooks, and config?

    This is where Claude Code is currently ahead, and it is the real reason it tends to win for power users.

    • Subagents – Claude Code spawns isolated sub-sessions with their own context window, tool restrictions, and prompts. Great for “go research this in parallel while the main thread keeps coding.” Codex has a lighter subagent concept (often pointed at GPT-5.4-mini to keep cost down) but it is less fleshed out.
    • Hooks – Claude Code fires deterministic scripts at lifecycle points (PreToolUse, UserPromptSubmit, and more). These run real code, so they cannot hallucinate: you can hard-block a dangerous command, auto-format on every edit, or inject context before the model sees a prompt. Codex leans on its approval/sandbox policy and execpolicy rules instead of a general hook system.
    • Skills and slash commands – In Claude Code, custom slash commands have merged into skills; /your-command still works and skills add reusable, packaged capabilities. Codex uses prompt files and profiles rather than a skills layer.
    • Project memory – Both read a project instruction file. Claude Code uses CLAUDE.md; Codex uses AGENTS.md (checked in a fallback order including AGENTS.override.md and .agents.md). Keep these tight: architecture, conventions, and the few rules the agent keeps forgetting.

    Codex’s config story is clean if you like a single file: ~/.codex/config.toml holds your model, approval policy, sandbox mode, MCP servers, and named profiles you switch with codex --profile work. Claude Code spreads config across ~/.claude/ and .claude/settings.json plus per-project files, which is more surface area but more granular control.

    How do the sandbox and approval models compare?

    This matters more than most comparisons admit, because it governs how much the agent can do without asking.

    Codex CLI has an explicit, well-documented sandbox. Sandbox modes run from read-only to workspace-write (edit files in the project, network off by default) up to full access, paired with approval policies like untrusted and on-request. On Windows the native sandbox can run unelevated or elevated. The mental model is clear: pick how much rope, then approve escalations.

    Claude Code manages permissions through allow/deny rules and modes (including a plan mode that reasons without touching files, and an auto-accept mode for trusted loops). Combined with PreToolUse hooks you can build a strict policy, but it is more “assemble it yourself” than Codex’s preset sandbox tiers.

    If you are dropping an agent onto an unfamiliar or sensitive repo, start read-only in both. Codex makes that posture a one-flag default; Claude Code gives you finer-grained control once you invest in the config.

    Do both support MCP?

    Flow from app/IDE through MCP to servers and data APIs
    Do both support MCP?

    Yes, and this is a genuine tie that matters. Both speak the Model Context Protocol, so you can wire in the same external tools, databases, and APIs. Codex registers STDIO or streaming-HTTP MCP servers in ~/.codex/config.toml and launches them at session start. Claude Code adds servers via claude mcp add or JSON config. If you have already built MCP integrations, neither tool locks you out. New to MCP, start with our Claude MCP setup guide and the Notion MCP setup walkthrough.

    What does each one cost?

    Pricing is where the decision often gets made, so here are the real numbers as of June 2026.

    Claude Code plans:

    • Pro – $20/mo: Sonnet 4.6 plus some Opus, roughly enough for focused daily sessions, not all-day heavy use.
    • Max 5x – $100/mo: much larger windows, real Opus headroom.
    • Max 20x – $200/mo: the heavy-user tier; effectively flat-rate firehose access.
    • API pay-as-you-go: Opus 4.7 about $5/$15 per million input/output… (legacy (still listed) Opus tier runs higher), Sonnet 4.6 (legacy — still listed) $3/$15, Haiku 4.5 $1/$5.

    Codex CLI: Included in ChatGPT Plus/Pro/Business plans (usage g

    Lineup currency (Sept 2026): Current API list (Sept 2026, verified): Sonnet 5 $2/$10, Opus 5.5 $4/$20, Haiku 4.5 $1/$5, Fable 5.1 $10/$50. Legacy (still listed on Anthropic’s card): Opus 4.8 $5/$25, Sonnet 4.6 $3/$15.

Codex CLI: Included in ChatGPT Plus/Pro/Business plans (usage governed by your plan’s limits), or pay-as-you-go on the API. GPT-5.3-Codex runs about $1.75 per million input / $14 per million output, with cheaper input on cached tokens. The mini model is far cheaper for light work.

The structural difference: Claude Code’s Max plans are flat-rate, which is why heavy users love them. People have tracked billions of tokens that would cost five figures on API metering but ran around a few hundred dollars on Max. Codex’s per-token rates are lower per unit and great if your usage is bursty or already bundled into a ChatGPT subscription, but a true all-day agent habit can run up metered cost faster than a flat plan. Estimate your monthly token volume honestly, then do the arithmetic both ways.

So which coding agent should you actually use?

Pick Claude Code if you want the deepest agentic workflow (subagents, hooks, skills), you are a heavy daily user who benefits from the flat-rate Max plan, or you need fine-grained, scriptable control over what the agent can do. It is the more complete operator’s harness in 2026.

Pick Codex CLI if you want lower per-token cost, you already pay for ChatGPT and want to use that allowance, you like the clean preset sandbox/approval model, or you simply prefer the GPT-5.x output style. It is lean, fast to stand up, and genuinely capable.

The move a lot of us make: run both. They are cheap relative to engineer time, they share MCP servers, and they have different failure modes. When one gets stuck in a loop on a hard bug, handing the same task to the other with fresh context often breaks the logjam. If you are weighing terminal agents against IDE-native ones, our Claude Code vs Cursor breakdown covers that axis.

Related on Tygart Media: Claude Code vs Cursor · Claude Code getting started · coding benchmarks.

Frequently asked questions

Is Claude Code or Codex CLI better for large refactors?

Claude Code tends to hold up better on long multi-file refactors, mostly because of subagents and hooks that keep context organized and catch mistakes deterministically. Codex can do it too, especially with GPT-5.5, but you lean harder on tight AGENTS.md instructions and approval gates.

Can I use Codex CLI without a ChatGPT subscription?

Yes. Run codex login with an OpenAI API key and you pay per token instead of through a ChatGPT plan. Same for Claude Code with an ANTHROPIC_API_KEY if you would rather meter than subscribe.

Do they work on Windows natively?

Both do in 2026. Claude Code runs in PowerShell (many operators still prefer WSL for cleaner paths), and Codex CLI has a native Windows installer plus a Windows sandbox with unelevated/elevated modes. Watch out for shells that mangle /tmp or C: style paths in arguments.

What is the single biggest difference?

Pricing structure and workflow depth. Claude Code offers flat-rate Max plans and a richer harness (subagents, hooks, skills); Codex offers lower per-token rates and a cleaner preset sandbox. Model quality is close enough that those two factors usually decide it.

Which model do they run by default?

Claude Code defaults to the legacy (still listed) Claude flagship (Opus 4.8 (legacy — still listed) as of June 2026, with Sonnet 4.6 (legacy — still listed) for everyday speed). Codex CLI recommends GPT-5.5 for complex work, with GPT-5.4-mini and GPT-5.3-Codex as alternatives

Lineup currency (Sept 2026): Current API list (Sept 2026, verified): Sonnet 5 $2/$10, Opus 5.5 $4/$20, Haiku 4.5 $1/$5, Fable 5.1 $10/$50. Legacy (still listed on Anthropic’s card): Opus 4.8 $5/$25, Sonnet 4.6 $3/$15.

. Switch in-session with /model or the -m flag.

How do I get either tool cited or surfaced by AI engines for my own docs?

That is a content question, not a tooling one. The same structure that makes this page answerable, short factual answers, question-shaped headers, and a visible FAQ, is what AI engines reward. See how AI engines cite content for the full playbook.

>Part of the complete guide: Claude vs the Field

  • Claude Code vs Cursor: Which AI Editor Wins in 2026?

    Claude Code vs Cursor: Which AI Editor Wins in 2026?

    Last verified: October 13, 2026.

    Claude Code and Cursor are the two tools most working developers actually reach for in 2026, and they are not the same kind of thing. Cursor is an AI-native code editor (a VS Code fork) where the model lives inside your IDE. Claude Code is a terminal agent that lives in your shell and edits files, runs commands, and drives git from the command line. This is the honest version: what each one is good at, what they cost right now, and a simple rule for picking.

    Claude Code vs Cursor: what is the actual difference?

    Side-by-side cards defining what Claude Code is and is not
    Claude Code vs Cursor — what is the actual difference?

    The short answer: Cursor is an editor you type in; Claude Code is an agent you delegate to. Cursor keeps you in the driver’s seat with autocomplete, inline edits, and a chat sidebar that sees your open files. Claude Code takes a goal and works the repo autonomously in the terminal, asking permission before it touches things.

    Dimension Claude Code Cursor
    Form factor Terminal CLI (plus IDE extension, web, desktop) Full IDE (VS Code fork)
    Primary loop Delegate a task, approve actions Type code, accept suggestions
    Models Claude only Multi-model: Grok included on higher tiers; Claude/GPT/Gemini at API list on Premium+
    Best at Multi-file refactors, scripted/headless runs, git workflows Tight edit loops, autocomplete, staying in one window
    Entry price $20/mo (Pro) or $17 annual Free limited / Plus $8 (Grok only) / Premium $30
    Billing model Usage windows (5-hour + weekly) Shared AI usage pool; third-party models at API list on Premium and above

    How does each one actually work?

    Five stacked panels of daily Claude Code command habits
    How each one actually works.

    Claude Code (terminal agent)

    You install it and run it from inside a project directory. Official claude.com copy: Claude Code is included in all paid Claude plans and shares the same usage pool as chat.

    npm install -g @anthropic-ai/claude-code
    cd my-project
    claude

    From there you talk to it in plain language. It reads files, proposes edits as diffs, and runs shell commands only after you approve them. Drop a CLAUDE.md in the repo root. Headless mode: claude -p "...".

    Cursor (AI IDE)

    Cursor is a download. Tab completion, inline edit, agent mode, and a model picker. Official cursor.com/pricing (checked October 13, 2026) lists Free, Plus $8/mo (Grok models only), Premium $30/mo (4x Plus; third-party models at API list price), Super $100/mo (15x), Ultra $200/mo (50x), Teams from $30+/user. Docs at cursor.com/docs/models-and-pricing still reference older Pro $20 / Pro+ $60 / Ultra $200 pools. Quote both; do not average.

    What does Claude Code cost in 2026?

    As of October 13, 2026, official claude.com / platform.claude.com:

    • Pro: $20/month, or $17/month billed annually ($200 up front). Includes Claude Code.
    • Max 5x: $100/month. 5x Pro usage. Includes $100/month API credits.
    • Max 20x: $200/month. 20x Pro usage. Includes $200/month API credits.
    • API: Haiku 5.5 $0.10 / $0.50 per MTok under 100k prompt tokens ($0.50 / $2.50 over); Sonnet 5.5 $2 / $10 with cache reads $0.10; Opus 5.5 $4 / $20 (cache read $0.20); Fable 5.1 $10 / $50 (cache read $0.25). Batch 50% off. US-only inference 1.1x on Claude 4.6+.

    There is a 5-hour rolling session window plus weekly limits on paid plans. Chat and Claude Code draw from one pool. Confirm in Settings > Usage.

    What does Cursor cost in 2026?

    • Free: Limited.
    • Plus: $8/month. Grok models only.
    • Premium: $30/month. 4x Plus usage. Third-party models (Claude, GPT, Gemini) at API list price.
    • Super: $100/month. 15x Plus.
    • Ultra: $200/month. 50x Plus. Earliest access.
    • Teams: From $30+/user/month.

    On the live pricing page, third-party model usage is not included in the monthly price and is billed separately at API list. Docs still describe older Pro/Pro+/Ultra usage pools for Cursor Models vs Other Models. Existing subscribers may keep prior plans.

    Which models do you actually get?

    • Claude Code is Claude-only.
    • Cursor includes Grok on Plus and above; Premium and higher add third-party models at API list price.

    Which one is better for big refactors and automation?

    Claude Code for repo-wide delegate work and headless claude -p runs. Cursor agent is strong inside the IDE; it is not a cron target.

    Which one is better for everyday coding flow?

    Cursor for most people who want tab completion and one window, especially if Grok covers the loop.

    Can you use both together?

    Yes. Common setup: Cursor as the editor, Claude Code in the integrated terminal. Claude Pro is $20; Cursor Premium is $30 if you need Claude models inside Cursor at API rates.

    Bottom line

    • Pick Claude Code if you want an autonomous terminal agent and you are happy with Claude as your one model. Entry is Pro at $20/$17.
    • Pick Cursor if you want autocomplete, Grok included, and a model picker. Entry for third-party is Premium at $30 plus API list.
    • Pick both if the seats are cheaper than the hours you lose switching contexts.

    FAQ

    Is Claude Code or Cursor cheaper?

    Claude Code starts at Pro $20/mo ($17 annual). Cursor Free is limited; Plus is $8 (Grok only); Premium is $30 with third-party models billed at API list on top. Claude Code meters by 5-hour plus weekly windows. Cursor meters a shared pool then on-demand / API list.

    Does Cursor use Claude?

    Yes, on Premium and above, at API list price (not included in the seat). You do not need a Claude Pro seat to use Claude models inside Cursor, but you pay the list rate for them.

    Related reading: Claude API rates · Claude Code vs Codex.

    Start here: Claude Code vs Cursor: Which AI Coding Tool is Better? — the full head-to-head comparison.

  • Notion MCP Setup with Claude: Complete Config + the Errors Nobody Documents

    Notion MCP Setup with Claude: Complete Config + the Errors Nobody Documents

    Last verified: October 2026.

    There are two ways to connect Notion to Claude over the Model Context Protocol (MCP), and almost every tutorial only covers one of them. Worse, none of them tell you why the connection succeeds but Claude still says it cannot find any of your pages. This guide covers both paths – the hosted OAuth connector and the self-hosted token route – with the exact config, the scopes that matter, the rate limit you will hit, and the specific error strings that show up when something is wrong. It is written from actually running this, not from reading the docs.

    Which Notion MCP should you use: hosted or self-hosted?

    Comparing hosted versus self-hosted Notion MCP server options
    Hosted vs self-hosted Notion MCP.

    Short answer: use the hosted MCP at https://mcp.notion.com/mcp for almost everything. It uses OAuth, so you never handle a token, and it respects your existing Notion permissions automatically. Use the self-hosted npm server with an internal integration token only when you need headless, unattended automation (a cron job, a server with no human to click “Allow”), because the hosted server requires an interactive OAuth approval that a background process cannot complete.

    Factor Hosted (mcp.notion.com) Self-hosted (npm + token)
    Auth OAuth (interactive) Internal integration token (ntn_)
    Permissions Inherits your full Notion access Only pages you explicitly share
    Setup time ~2 minutes ~10 minutes
    Headless / cron No (needs a human to approve) Yes
    Best for Claude Desktop, Claude Code, daily use Servers, scripts, multi-user backends

    Notion MCP config generator

    Answer two questions, get your exact setup. No guessing, no stale docs.



    Rolling this out across a team? One person’s MCP setup is a weekend project. Ten people’s is an IT ticket queue. We set up AI workflows for businesses — Notion, Claude, and the glue between them. Tell us what you’re connecting →

    How do I connect Notion to Claude using the hosted MCP?

    Connecting Notion to Claude with the official hosted MCP server over OAuth
    Connect Notion to Claude via hosted MCP.

    This is the fast path. No token, no npm.

    Claude Desktop / Claude.ai: Open Settings > Connectors, click Add custom connector (or pick Notion if it appears in the directory), and paste the URL https://mcp.notion.com/mcp. A Notion OAuth window opens. Approve it, choose which workspace and which top-level pages the connector may see, and you are done. The scope you pick in that OAuth screen is the whole ballgame – see the gotcha below.

    Claude Code (CLI): one command.

    claude mcp add --transport http notion https://mcp.notion.com/mcp

    Then run /mcp inside Claude Code to trigger the OAuth login. After approving, verify it is live:

    claude mcp list

    You should see notion with a connected status. If it shows failed or needs auth, run /mcp again and complete the browser flow – the CLI cannot proceed past OAuth on its own.

    How do I set up the self-hosted Notion MCP with an integration token?

    Use this when you need automation that runs without a human. Three steps: create the integration, get the token, then wire it into your MCP config.

    1. Create the integration and copy the token

    1. Go to https://www.notion.so/my-integrations and click New integration. You must be a Workspace Owner – if the button is greyed out, that is why.
    2. Name it, select the workspace, and choose Internal integration type.
    3. On the integration’s settings page, set Capabilities: Read content, plus Update/Insert content if you want Claude to write. If you only grant Read, every write attempt fails with a permission error later – this is a common self-inflicted wound.
    4. Click Show, then copy the Internal Integration Token. New tokens start with ntn_ (older ones start with secret_ and still work). Treat it like a password.

    2. Add it to your MCP config

    For Claude Desktop, edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/; Windows: %APPDATA%\\Claude\\). Add:

    {
      "mcpServers": {
        "notion": {
          "command": "npx",
          "args": ["-y", "@notionhq/notion-mcp-server"],
          "env": {
            "NOTION_TOKEN": "ntn_your_token_here"
          }
        }
      }
    }

    Restart Claude Desktop completely (quit, do not just close the window). On Windows, if npx is not found, use the full path to npx.cmd or run via cmd /c – the config does not inherit your shell PATH.

    3. The step everyone forgets: share the pages

    An internal integration starts with access to nothing. Creating it and pasting the token is not enough. For every page or database you want Claude to touch, open it in Notion, click the … menu (top right), choose Connections (or Add connections), and select your integration. Access is inherited by child pages, so sharing a top-level page covers its whole subtree. Skip this and Claude will connect cleanly and then truthfully report that it cannot see any content.

    What are the most common Notion MCP errors and how do I fix them?

    Troubleshooting common Notion MCP connection errors
    Common Notion MCP errors and fixes.

    These are the failure messages you will actually see, and what each one means.

    “Could not find page” / Claude returns zero results from a workspace that clearly has pages

    Cause, in order of likelihood: (1) you did not share the page with the integration (self-hosted), or you scoped the OAuth grant too narrowly (hosted); (2) the page is in a different workspace than the one the integration is tied to. Fix: re-check the Connections menu on the specific page, or re-run the OAuth flow and widen the page selection. An integration token is bound to one workspace – it cannot see another.

    API token is invalid (HTTP 401 unauthorized)

    The token is wrong, was regenerated, or has a stray space/newline from copy-paste. Re-copy it with the Show button, paste it into the env block with no surrounding whitespace, and restart the client. If you rotated the token in Notion, the old one dies immediately – update every config that used it.

    Validation error / “body failed validation” (HTTP 400)

    Claude tried to write a property type that does not match the database schema – for example sending plain text into a Select, or a malformed date. This is not a connection problem. Tell Claude the exact property names and types, or ask it to fetch the database schema first before writing.

    “Rate limited” / HTTP 429

    Notion enforces roughly 3 requests per second per integration (averaged, with short bursts tolerated). Bulk operations – “update 200 rows,” “scan every page” – blow straight through this. The fix is pacing, not a bigger plan: have Claude batch in small groups and add a short delay between calls. If you are scripting around the MCP, honor the Retry-After header on a 429 instead of hammering.

    spawn npx ENOENT (server will not start, self-hosted)

    Node/npx is not on the PATH the client sees. Install Node, then point command at the absolute path to npx (or npx.cmd on Windows). This is the number-one self-hosted startup failure.

    MCP server shows “failed” in claude mcp list right after adding it

    For the hosted server this almost always means OAuth was never completed – run /mcp and approve in the browser. For the self-hosted server it means the process crashed on launch; run the npx command manually in a terminal to see the real stack trace.

    Notion MCP Configuration Checklist

    Run this before you call the setup done. Every box is a real failure mode from the guide above.

    Setup completeness
    0 of 10

    Check each item as you verify it.

    What can Claude actually do with Notion once connected?

    With read + write capabilities granted, Claude can search your workspace, read pages and databases, create pages, append blocks, and update properties on existing rows. Practical things that work well: “summarize this Notion doc,” “create a row in my tasks database with these fields,” “find every page mentioning X and list the links,” “turn this conversation into a meeting-notes page.” Things that get awkward: very large pages (the response can get truncated – verify the write actually landed by fetching it back), and bulk edits that trip the rate limit. A reliable habit is to treat Notion as the source of truth and have Claude verify by re-fetching after any write, because timeouts on big pages can commit silently and still return a malformed response.

    What is the connection worth to you?

    Operators who wire Claude into Notion typically cut manual capture, entry, and doc-hunting time by roughly 30% — an illustrative estimate, not a guarantee. Put in your own numbers:


    Saved per week
    1.5 hrs
    Saved per year
    78 hrs
    Value per year
    $5,850

    Illustrative math: 30% of your manual information-work hours, × 52 weeks. Real savings depend on your workflows.

    Security notes from running this in production

    • Scope the OAuth grant tightly. The hosted connector inherits whatever you approve. If you only need one project area, share only that top-level page, not the whole workspace.
    • Never hardcode the token in a file you might commit. Keep ntn_ tokens in an env var or your OS secret store, and reference them from config. If a token leaks, revoke it in my-integrations immediately – revocation is instant.
    • Grant the minimum capability. If Claude only needs to read, do not enable insert/update. You can always widen it later.
    • Audit which integrations have access to sensitive databases periodically; the Connections menu on each page shows the current list.

    If you are wiring up several connectors at once, the mechanics generalize – see our broader Claude MCP setup guide for the config patterns that apply across servers, and the AI operator’s stack for how Notion fits alongside the other tools day to day. If your reason for connecting Notion is to get your own content cited by AI systems, the structure of the pages matters as much as the wiring – see how AI engines cite content.

    Frequently Asked Questions

    Do I need a paid Notion plan to use the MCP?

    No. The API and integrations work on free Notion workspaces. You do need to be a Workspace Owner to create an internal integration.

    Why does Claude say it can’t find my Notion pages after connecting?

    The most common reason is that you haven’t shared the specific pages or databases with your Notion integration. Notion’s permission model requires explicit page-level grants — a successful connection does not automatically give access to all your content. Go to the page in Notion, click the three-dot menu, choose ‘Add connections’, and select your integration.

    What rate limits does the Notion API have?

    Notion’s API enforces a rate limit of 3 requests per second per integration. For typical conversational use this is invisible, but if you ask Claude to crawl a large database or process many pages in sequence, you may see 429 errors. The fix is to add a short sleep between bulk operations or use Notion’s pagination to fetch in smaller batches.

    What does the ntn_ prefix mean on my token?

    It is the current internal integration token format. Tokens created today start with ntn_; older secret_ tokens still function and do not need to be replaced.

    Can the hosted Notion MCP run in a headless cron job?

    No. The hosted server requires interactive OAuth approval, which an unattended process cannot complete. Use the self-hosted npm server with an ntn_ token for headless automation.

    How do I let Claude write to Notion, not just read?

    Enable Update content and Insert content under the integration’s Capabilities (self-hosted), or approve write scope during OAuth (hosted). Read-only is the default and will reject every write with a permission error.

    Where do I put the Notion MCP config for Claude Desktop?

    In claude_desktop_config.json – ~/Library/Application Support/Claude/ on macOS, %APPDATA%\\Claude\\ on Windows. Add a notion entry under mcpServers and fully restart the app.

    Can one integration access two workspaces?

    No. An internal integration is bound to the single workspace it was created in. For a second workspace, create a second integration (or a second OAuth grant on the hosted connector).

    What is the Notion MCP server for Claude?

    The Notion MCP server is a connector that lets Claude read, search, and interact with your Notion workspace through the Model Context Protocol. With it connected, you can ask Claude to find pages, summarize databases, draft content into Notion, or retrieve information — all without copying and pasting anything manually.

    What is the difference between the Notion OAuth connector and the self-hosted token route?

    The OAuth connector (available in Claude Desktop’s built-in integrations) is the fastest path — authorize once and Claude gets read access to pages you share with the integration. The self-hosted route uses a Notion Internal Integration token in your claude_desktop_config.json, giving you more control over scopes and works in Claude Code environments where OAuth connectors aren’t available.

    What scopes does the Notion MCP integration need?

    For read operations: Read content and Read user information. For write operations: Update content and Insert content. Avoid requesting more scopes than you need — the minimum set reduces the blast radius if a token is ever compromised. Set scopes when creating your Notion Internal Integration at notion.so/my-integrations.

    Does the Notion MCP integration work with Claude Code?

    Yes. Add it via ‘claude mcp add notion npx @notionhq/notion-mcp-server’ and set your NOTION_API_KEY as an environment variable. Claude Code picks it up on the next session. The self-hosted token route works in both Claude Desktop and Claude Code; the OAuth connector is currently Desktop-only.

    Related reading from operators who run AI tooling daily: Claude Code vs Cursor, Claude Code vs Codex, and Claude in Chrome for LinkedIn automation.

    What is the Notion MCP server and how do I set it up?

    The Notion MCP server is a connector that lets Claude read, search, and write to your Notion workspace through the Model Context Protocol — no copy-pasting between apps. Two setup routes: the hosted route (Claude Desktop → Settings → Connectors → Notion → authorize via OAuth, about two minutes) or the self-hosted route (create a Notion internal integration, copy the token, add it to your MCP config, then share your pages with the integration — the step almost everyone forgets).

    How do I connect Claude to Notion?

    Use the hosted MCP connector: in Claude Desktop, open Settings → Connectors, choose Notion, and authorize via OAuth. For Claude Code, add Notion’s remote MCP server with the claude mcp add command. After connecting, verify Claude can actually see your pages — if it returns zero results on a workspace that clearly has pages, you skipped the page-sharing step.

    Can Claude read and write my Notion databases?

    Yes. Reading works as soon as the connection is live — Claude can search pages, query databases, and pull property values. Writing needs the integration to carry write scopes and the target pages shared with it; then Claude can append database rows, update properties, and draft pages directly. Keep the approval habit for shared workspaces: Claude drafts, you approve.