Claude Code Insider - Tygart Media

Category: Claude Code Insider

Practitioner-level guides, comparisons, workflows, and real-world patterns for Claude Code — the agentic AI coding tool from Anthropic.

  • Claude Code Getting Started: Installation, First Run, and the 5 Commands You’ll Use Daily

    Claude Code Getting Started: Installation, First Run, and the 5 Commands You’ll Use Daily

    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)

    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

    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:

    Command What It Does
    /help Show all available commands
    /clear Clear conversation context (keep the session open)
    /compact Compress prior context to save tokens while preserving essential memory
    /cost Show token usage and estimated cost for the current session
    /model Switch the model mid-session
    /review Request a multi-agent code review of the current branch
    /init Generate a CLAUDE.md file with project context for this repo
    /exit End 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

    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.

    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 Guide for Claude Users

    What Is Model Context Protocol (MCP)? The Complete Guide for Claude Users

    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. 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

    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

    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:

    Server What It Does Package
    Filesystem Read/write files and directories on your local machine @modelcontextprotocol/server-filesystem
    GitHub Read repos, create issues, open PRs, push code @modelcontextprotocol/server-github
    PostgreSQL Read-only SQL queries against a Postgres database @modelcontextprotocol/server-postgres
    SQLite Read/write a local SQLite database file @modelcontextprotocol/server-sqlite
    Brave Search Live web search via Brave’s Search API @modelcontextprotocol/server-brave-search
    Puppeteer Headless browser — screenshot pages, scrape, fill forms @modelcontextprotocol/server-puppeteer
    Slack Read channels, send messages, search workspace @modelcontextprotocol/server-slack
    Google Drive Read and search Google Drive files @modelcontextprotocol/server-google-drive
    Git Git operations — log, diff, commit, branch management @modelcontextprotocol/server-git
    Memory Persistent 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

    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.

    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.

  • 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.

    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

    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

    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-4-6 (workhorse) — it handles schema-aware query generation well without burning through Opus 4.8 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

    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?

    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 for the hardest reasoning, with Sonnet 4.6 as the fast everyday workhorse and Haiku 4.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?

    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… (current Opus tier runs higher), Sonnet 4.6 $3/$15, Haiku 4.5 $1/$5.

    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.

    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 current Claude flagship (Opus 4.8 as of June 2026, with Sonnet 4.6 for everyday speed). Codex CLI recommends GPT-5.5 for complex work, with GPT-5.4-mini and GPT-5.3-Codex as alternatives. 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.

  • Claude Code vs Cursor: An Honest 2026 Comparison

    Claude Code vs Cursor: An Honest 2026 Comparison

    Last verified: June 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. I run both every day. 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?

    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 (“add rate limiting to the upload endpoint and run the tests”) 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 (Sonnet 4.6, Opus 4.8) Multi-model: Claude, GPT, Gemini
    Best at Multi-file refactors, scripted/headless runs, git workflows Tight edit loops, autocomplete, staying in one window
    Entry price $20/mo (Pro) Free (Hobby) / $20/mo (Pro)
    Billing model Usage windows (5-hour + weekly) Credit pool ($ equal to plan price)

    How does each one actually work?

    Claude Code (terminal agent)

    You install it globally and run it from inside a project directory:

    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. A few patterns I use constantly:

    • Project memory: drop a CLAUDE.md file in the repo root with build commands, conventions, and “do not touch” rules. Claude Code reads it on every run, so you stop re-explaining the same context.
    • Headless / scripted runs: claude -p "bump all deps and run the test suite" runs one-shot and exits, which is what makes it scriptable in CI or cron jobs. This is the single biggest thing Cursor cannot do.
    • Permission control: by default it asks before edits and commands. You can pre-approve safe tools so it stops prompting on every npm test.
    • Plan mode: ask it to plan before it writes, review the plan, then let it execute. This is how you avoid a runaway agent rewriting half the codebase.

    Cursor (AI IDE)

    Cursor is a download, not a package install. You open your folder and the AI is wired into the editing surface:

    • Tab completion: multi-line, context-aware autocomplete that predicts your next edit, not just the next token. This is the feature people stay for.
    • Inline edit (Cmd/Ctrl+K): select code, describe the change, get a diff in place.
    • Agent mode: a chat panel that can edit multiple files and run terminal commands, closing the gap with Claude Code from inside the IDE.
    • Model picker: switch between Claude Sonnet, GPT, and Gemini per request from a dropdown. Useful when one model is stuck and you want a second opinion without leaving the window.

    What does Claude Code cost in 2026?

    Claude Code is billed by usage windows, not per-request credits. As of June 2026:

    • Pro: $20/month. Sonnet 4.6 and Opus 4.6, roughly 10 to 40 prompts per 5-hour window depending on repo size.
    • Max 5x: $100/month. ~5x Pro limits and access to Opus 4.8.
    • Max 20x: $200/month. ~20x Pro limits, all models including Opus 4.8.
    • API (pay-per-token): Opus 4.7 at $5 input / $25 output per million tokens; Sonnet 4.6 at $3 / $15.

    The mechanic to understand: there is a 5-hour rolling session window (your budget resets from your first prompt) plus a weekly active-compute cap that only counts time the model is actually reasoning. If you hit a wall mid-afternoon, you are usually waiting for the 5-hour window to roll, not the week.

    What does Cursor cost in 2026?

    Cursor moved to a credit-pool model (the switch happened in mid-2025). Every paid plan includes a monthly credit pool equal to the plan price in dollars, and each request burns credits based on which model you pick and how heavy the request is. As of June 2026:

    • Hobby: Free. Limited tab completions and agent requests, plus a one-week Pro trial on signup.
    • Pro: $20/month ($16 annual). Frontier model access, MCP support, cloud agents, and a $20 credit pool.
    • Pro+: $60/month. ~3x the credits.
    • Ultra: $200/month. ~20x usage and priority features.
    • Teams: $40/user/month with SSO and admin controls.

    Practical note on the credit pool: model choice matters a lot. Roughly, $20 of credits buys about 225 Claude Sonnet requests or about 550 Gemini requests, because Anthropic models cost more per call than Gemini in Cursor’s pricing. If you run Claude on everything, the $20 pool drains faster than newcomers expect. This is the source of most “what happened to Cursor pricing” confusion.

    Which models do you actually get?

    This is the cleanest dividing line.

    • Claude Code is Claude-only. You get Anthropic’s frontier coding models (Sonnet 4.6 for speed/cost, Opus 4.8 for the hardest agentic work on Max). No GPT, no Gemini. If you trust Claude for code, the single-vendor integration is tighter and the agent behavior is tuned end to end.
    • Cursor is multi-model. Claude, OpenAI, and Google models from one dropdown. The advantage is hedging: if one model whiffs on a problem, switch and retry in seconds. The trade-off is that no single model is integrated as deeply as Claude is in its own first-party tool.

    Which one is better for big refactors and automation?

    Claude Code, clearly. Two reasons. First, the terminal-agent loop is built for “go do this across the whole repo” tasks, and plan mode plus CLAUDE.md keep it on rails. Second, headless mode (claude -p "...") means you can wire it into scripts, pre-commit hooks, and scheduled jobs. Cursor’s agent mode is strong inside the IDE, but it is fundamentally an interactive editor, not a thing you call from a cron line.

    Which one is better for everyday coding flow?

    Cursor, for most people. If your day is reading, editing, and iterating on code you understand, Cursor’s tab completion and inline edits keep you in one window with near-zero friction. You never leave the editor to get help. Developers who are uneasy handing a whole task to an autonomous agent also tend to prefer Cursor because they stay in control of every keystroke.

    Can you use both together?

    Yes, and a lot of people do. The common setup: Cursor as the editor, Claude Code in Cursor’s integrated terminal. You get Cursor’s autocomplete and visual diff review for hands-on work, and you drop into Claude Code when you want to delegate a multi-file job or run something headless. They do not conflict. If you are building a broader operator setup around these tools, see our AI operator’s stack for how the pieces fit, and our Claude MCP setup guide for wiring external tools and data into Claude Code via MCP.

    Claude Code vs Cursor vs Codex?

    Codex is the third option people weigh, and it sits closer to Claude Code as an agent than to Cursor as an editor. The decision usually comes down to which model family and which workflow you trust. We break that specific matchup down in Claude Code vs Codex.

    Bottom line: when to pick which

    • Pick Claude Code if you want an autonomous agent for refactors, you live in the terminal and git, you need scriptable/headless runs, and you are happy with Claude as your one model.
    • Pick Cursor if you want best-in-class autocomplete, you prefer staying inside a visual editor, you value swapping between Claude/GPT/Gemini, and you want to keep your hands on the keyboard.
    • Pick both if you can swing two subscriptions: Cursor for the edit loop, Claude Code in the terminal for delegation. Start each on the $20 tier and only upgrade the one you hit limits on.

    FAQ

    Is Claude Code or Cursor cheaper?

    Both start at $20/month (Cursor also has a free Hobby tier). The difference is the meter: Claude Code limits you by 5-hour usage windows plus a weekly cap, while Cursor gives you a $20 credit pool that drains per request based on the model. Heavy Claude usage in Cursor burns the pool faster than people expect.

    Does Cursor use Claude?

    Yes. Cursor offers Anthropic’s Claude models alongside OpenAI and Google models, selectable per request. But you are using Claude through Cursor’s integration, not Anthropic’s first-party Claude Code agent, so the agentic behavior differs.

    Can Claude Code edit files and run commands like an IDE agent?

    Yes. Claude Code reads and writes files, runs shell commands, and drives git directly from the terminal. By default it asks permission before edits and commands, and you can pre-approve safe tools to cut down the prompts.

    Which is better for beginners?

    Cursor. The visual editor, inline diffs, and autocomplete are more forgiving than a terminal agent, and the free Hobby tier lets you learn before paying. Claude Code rewards people who are already comfortable in the shell and with git.

    Do I need to know the command line to use Claude Code?

    Largely yes. Claude Code is a CLI-first tool, and while it does most of the git and shell work for you, you will be living in a terminal. There is also an IDE extension and a desktop app, but the terminal is where it is strongest.

    Can I run Claude Code in CI or on a schedule?

    Yes, via headless mode: claude -p "your task" runs once and exits, which makes it usable in CI pipelines, git hooks, and scheduled jobs. Cursor has no equivalent because it is an interactive editor.

    Will using both at once cause conflicts?

    No. A common and stable setup is Cursor as your editor with Claude Code running in Cursor’s integrated terminal. They operate on the same files without stepping on each other, as long as you are not having both edit the exact same file simultaneously.

    Related reading: how AI engines cite content and Claude in Chrome for LinkedIn automation.

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

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

    Last verified: June 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?

    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

    How do I connect Notion to Claude using the 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?

    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.

    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.

    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.

    FAQ

    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 connected but can’t find my pages?

    Almost always the page-sharing step. A self-hosted integration has access to nothing until you add it via the page’s Connections menu. For the hosted connector, you scoped the OAuth approval too narrowly – re-run it and select more pages.

    What is the Notion API rate limit?

    About 3 requests per second per integration, averaged over time with small bursts allowed. Exceeding it returns HTTP 429. Pace bulk operations and respect the Retry-After header.

    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).

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

    Frequently Asked Questions

    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.

    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 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.

    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.


  • How to Connect Any Tool to Claude with MCP: Complete Setup Guide

    How to Connect Any Tool to Claude with MCP: Complete Setup Guide

    Last verified: June 2026

    MCP (Model Context Protocol) is how you give Claude hands. Out of the box Claude can talk; with an MCP server connected, it can read your files, query a database, hit an API, or drive a browser. This guide covers the two places you actually wire servers up: the claude_desktop_config.json file for the Claude Desktop app, and the claude mcp add command for Claude Code (the terminal/IDE tool). It ends with the troubleshooting section the official docs skip: path problems, JSON syntax traps, servers that silently never load, and the Windows quirks that cost people an afternoon.

    Everything below is checked against the current Claude Code MCP docs and tested commands. If you want the wider picture of how MCP fits into a working setup, see the AI operator’s stack.

    What is MCP and what is an MCP server?

    MCP transport options at a glance

    Transport Use case Config location Works with
    stdio Local tools, CLIs, scripts claude_desktop_config.json or claude mcp add Claude Desktop, Claude Code
    SSE (HTTP) Remote servers, cloud services URL in config Claude Desktop, Claude Code
    Streamable HTTP Production remote MCP URL in config Claude Desktop, Claude Code

    MCP is an open standard for connecting AI models to external tools and data. An MCP server is a small program that exposes a set of tools (functions Claude can call) over that protocol. Claude is the client; the server is the thing that actually does the work, like reading a Postgres table or creating a GitHub issue.

    There are two transport types you will deal with in practice:

    • stdio (local): the server runs as a process on your machine. Claude talks to it over standard input/output. Best for filesystem access, local databases, and custom scripts. This is what most “install this MCP server” instructions mean.
    • HTTP (remote): the server lives on the internet at a URL. Best for cloud services (Notion, Sentry, Stripe, GitHub). Often uses OAuth. SSE is the older remote transport and is now deprecated; use HTTP for new remote servers.

    The same server can usually be added to both Claude Desktop and Claude Code. The mechanics differ: Desktop uses a JSON file you edit by hand, Claude Code gives you a CLI that writes the config for you.

    How do I add an MCP server to Claude Desktop?

    Claude Desktop reads a single JSON file. You edit it, fully quit the app, and reopen. There is no in-app “add server” button for custom servers as of June 2026, so the file is the source of truth.

    Where is claude_desktop_config.json?

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json (paste that into the File Explorer address bar; it expands to C:\Users\YOU\AppData\Roaming\Claude\)

    The fastest way to open it: in Claude Desktop go to Settings > Developer > Edit Config. That button creates the file if it does not exist and opens the folder. If the file is brand new it may be empty or just {}.

    The config file structure

    Everything lives under a top-level mcpServers object. Each key is a name you choose; each value describes how to launch the server. Here is a complete, working file with a local filesystem server and a remote Notion server:

    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "C:\\Users\\YOU\\Documents"
          ]
        },
        "notion": {
          "command": "npx",
          "args": ["-y", "@notionhq/notion-mcp-server"],
          "env": {
            "NOTION_TOKEN": "secret_your_token_here"
          }
        }
      }
    }

    Three fields do all the work:

    • command the executable to run (npx, node, python, uvx, or an absolute path to a binary).
    • args an array of arguments. Each flag and value is its own array element. "--port 8080" as a single string will not work; use "--port", "8080".
    • env an object of environment variables (API keys, tokens). Optional.

    After saving, completely quit Claude Desktop (on Windows, right-click the system tray icon and choose Quit; closing the window is not enough) and reopen it. You should see a tools/connector indicator in the chat input. For a full Notion walkthrough including the token, see connecting Notion to Claude with MCP.

    How do I add an MCP server to Claude Code (CLI)?

    Claude Code does not make you hand-edit JSON. The claude mcp command manages servers for you and writes to the right file. This is the part people get wrong most often, so here is the exact, verified syntax.

    claude mcp add

    The general form for a local (stdio) server is:

    claude mcp add [options] <name> -- <command> [args...]

    The -- is load-bearing. Everything before it is for Claude Code; everything after it is the command that launches your server. Real examples:

    # Local filesystem server
    claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/Documents
    
    # Local server with an environment variable
    claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY airtable -- npx -y airtable-mcp-server
    
    # Remote HTTP server
    claude mcp add --transport http notion https://mcp.notion.com/mcp
    
    # Remote HTTP server with an auth header
    claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer YOUR_PAT"

    Option ordering matters. All flags (--transport, --env, --scope, --header) must come before the server name. Put a flag after the name and you will get a confusing parse error or the flag will be passed to your server instead of to Claude Code.

    Scopes: local, project, user

    The --scope flag decides where the config is written and who sees it:

    • local (the default) loads only in the current project, private to you. Stored in ~/.claude.json keyed by the project path.
    • project loads in the current project and is shared with your team. Stored in a .mcp.json file at the project root that you commit to git.
    • user loads across all your projects, private to you. Also stored in ~/.claude.json.
    # Available across all your projects
    claude mcp add --scope user --transport http sentry https://mcp.sentry.dev/mcp
    
    # Shared with your team via .mcp.json in the repo
    claude mcp add --scope project filesystem -- npx -y @modelcontextprotocol/server-filesystem .

    When the same server name exists at multiple scopes, local wins over project, which wins over user. The whole entry from the winning scope is used; fields are not merged.

    claude mcp list, get, and remove

    # List every configured server and its connection status
    claude mcp list
    
    # Show the full config for one server
    claude mcp get github
    
    # Remove a server
    claude mcp remove github

    claude mcp list is your first diagnostic. It shows each server as connected, pending, or failed. Project-scoped servers from a .mcp.json you have not approved yet show as Pending approval until you run claude interactively and accept them.

    Other useful commands

    # Add from a raw JSON blob (handy when copying from a server's README)
    claude mcp add-json weather '{"type":"stdio","command":"npx","args":["-y","weather-mcp"]}'
    
    # Import everything you already set up in Claude Desktop (macOS / WSL)
    claude mcp add-from-claude-desktop

    Inside a running Claude Code session, type /mcp to see live server status, tool counts, and to trigger OAuth login for remote servers that need it.

    Troubleshooting: the errors the docs skip

    Most MCP failures are not exotic. They are paths, quoting, and the app not restarting. Work this list top to bottom.

    Server not loading / no tools appear

    1. Did you actually restart? Claude Desktop only reads the config at launch. Fully quit (tray icon > Quit on Windows, Cmd+Q on macOS) and reopen. In Claude Code, run claude mcp list to see the real status instead of guessing.
    2. Is the command on PATH? The single most common stdio failure is npx, node, python, or uvx not being found by the app. GUI apps often have a narrower PATH than your terminal. Fix it by using an absolute path. Find it with which npx (macOS/Linux) or where npx (Windows), then put that full path in command.
    3. Read the logs. Claude Desktop writes per-server logs. macOS: ~/Library/Logs/Claude/. Windows: %APPDATA%\Claude\logs\. Look for mcp-server-NAME.log. The actual error (missing module, bad token, wrong path) is almost always sitting right there.

    spawn ENOENT or “command not found”

    This means the OS could not find the executable named in command. It is a PATH problem, not a Claude problem. Use the absolute path (see above). On Windows specifically, see the npx note below.

    JSON syntax errors (the silent killer)

    If claude_desktop_config.json has a single syntax error, Claude Desktop loads zero servers and usually says nothing. The usual culprits:

    • Trailing commas. JSON forbids a comma after the last item in an object or array. "args": ["a", "b",] is invalid.
    • Smart quotes. If you edited the file in a word processor, curly quotes (the slanted kind) break the parser. Use a code editor and straight quotes only.
    • Unescaped Windows backslashes. In JSON, \ is an escape character, so every backslash in a Windows path must be doubled: C:\\Users\\YOU\\Documents. A single backslash silently corrupts the string.

    Paste the whole file into any JSON validator before restarting. Thirty seconds there saves an hour of staring.

    Claude Code: flag passed to the wrong place

    If claude mcp add behaves strangely, you almost certainly put a flag after the server name or forgot the --. Reread the order: claude mcp add [flags] NAME -- COMMAND ARGS. The -- separates Claude Code’s flags from your server’s command.

    Windows quirks

    • npx needs a wrapper in some setups. If a bare "command": "npx" fails on Windows, launch it through cmd: "command": "cmd" with "args": ["/c", "npx", "-y", "the-server-package"]. This resolves a class of “npx works in my terminal but not in Claude” failures.
    • Use the right config root. It is %APPDATA%\Claude\ (which is AppData\Roaming), not AppData\Local. Mixing these up means you are editing a file the app never reads.
    • Git Bash mangles paths. If you run commands through Git Bash, it can rewrite paths like /c/Users or absolute paths inside arguments. Prefer PowerShell or cmd for claude mcp add, or pass paths exactly as Windows expects them.
    • WSL is a separate world. A server installed inside WSL is not visible to a Windows-native Claude Desktop, and vice versa. Keep both on the same side.

    Remote server returns 401 / 403

    The server needs authentication. In Claude Code, run /mcp and complete the OAuth flow in your browser. If you hardcoded an Authorization header and it is rejected, the token is wrong for that endpoint; remove the header and let OAuth handle it instead.

    Frequently asked questions

    What is an MCP server in one sentence?

    A small program that exposes tools (functions like read-file or query-database) to Claude over the Model Context Protocol, so Claude can take real actions instead of only producing text.

    What is the difference between Claude Desktop and Claude Code for MCP?

    Claude Desktop is the chat app and you configure servers by hand-editing claude_desktop_config.json, then restarting. Claude Code is the terminal/IDE tool and you configure servers with the claude mcp add command, which writes the config for you.

    Where is the Claude Desktop config file?

    macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. Windows: %APPDATA%\Claude\claude_desktop_config.json. The quickest way to open it is Settings > Developer > Edit Config inside the app.

    Why is my MCP server not showing up?

    In order of likelihood: you did not fully restart the app, the command is not on the app’s PATH (use an absolute path), or there is a JSON syntax error such as a trailing comma, a smart quote, or an unescaped Windows backslash. Check the per-server log in the Claude logs folder for the exact error.

    What does the double dash do in claude mcp add?

    The -- separates Claude Code’s own flags from the command that launches your server. Flags like --transport and --env go before it; the actual launch command (npx -y some-server) goes after it.

    What is the default scope for claude mcp add?

    local. The server loads only in the current project and stays private to you. Use --scope user to make it available in every project, or --scope project to share it with your team via a committed .mcp.json.

    Is SSE or HTTP the right transport for remote servers?

    HTTP. SSE still works but is deprecated. Use --transport http for any new remote server unless its documentation specifically requires SSE.

    How do I remove an MCP server?

    In Claude Code, run claude mcp remove NAME. In Claude Desktop, delete that server’s entry from the mcpServers object in claude_desktop_config.json and restart the app.

    Where to go next

    Once your servers connect cleanly, the leverage comes from using them well. For how this fits a daily workflow, read the AI operator’s stack; if you are choosing between coding environments, see Claude Code vs Cursor. And if you want a concrete first server to wire up, the Notion MCP setup is a clean, high-value place to start.

    Frequently Asked Questions

    What is MCP and why does it matter for Claude?

    MCP (Model Context Protocol) is an open standard that lets Claude connect to external tools, databases, APIs, and services. Without MCP, Claude can only work with text in the conversation window. With an MCP server connected, Claude can read your files, query a live database, hit an API, or control a browser — turning it from a chat interface into an autonomous agent.

    How do I add an MCP server to Claude Desktop?

    Edit the claude_desktop_config.json file (found at ~/Library/Application Support/Claude/ on Mac, %APPDATA%/Claude/ on Windows). Add your server under the ‘mcpServers’ key with a ‘command’, ‘args’, and optional ‘env’ block. Save the file and restart Claude Desktop. The server appears in Claude’s tool list if it loaded correctly.

    How do I add an MCP server to Claude Code?

    Run ‘claude mcp add [args…]’ from your terminal. For a remote SSE server use ‘claude mcp add –transport sse ‘. List configured servers with ‘claude mcp list’. Servers added this way are scoped to your user profile unless you use the –project flag.

    Why does my MCP server connect but Claude can’t see my data?

    The most common cause is scope or permission gaps. For Notion, verify your integration has been granted access to the specific pages/databases — the connection succeeds even without page access. For file servers, check that the path in your config resolves correctly from the shell Claude launches (not your interactive shell). For OAuth servers, re-authorize and confirm token scopes.

    What is the difference between stdio and SSE MCP transports?

    stdio runs the MCP server as a local subprocess — Claude launches the command you specify and communicates over stdin/stdout. This is used for local tools and CLIs. SSE (Server-Sent Events) connects to a remote HTTP server. Use stdio for local tools like filesystem access or database clients; use SSE or Streamable HTTP for cloud services or shared team servers.

    Which MCP servers should I start with?

    The highest-value first connections are: filesystem (read/write your local files), a database client for your primary DB, and a service you interact with daily (Notion, Slack, GitHub, Linear). The Notion MCP server is a clean first project — see the dedicated setup guide on this site for the exact config and common errors.


  • How I Made a $400 Laptop More AI-First Than a Copilot+ PC

    How I Made a $400 Laptop More AI-First Than a Copilot+ PC

    All fall, Microsoft has been selling one idea: the future is the AI PC — a Copilot+ machine with a dedicated neural chip (an NPU), Recall, Click to Do, a thousand dollars and up, and your old laptop need not apply.

    I had a $400 budget laptop on my desk — an AMD Ryzen 5 7520U, 16 GB of RAM, no NPU — and a hunch that the whole framing was backwards. The AI-first laptop was never about the chip. It’s about architecture.

    A few hours later, that $400 laptop had a private AI brain, voice control, and a control panel I run from my phone. On the things that actually matter for operating a machine, it does more than the Copilot+ PC it’s supposedly too cheap to be. Here’s the exact build.

    The thesis: AI-first is architecture, not a chip

    The trick is to stop asking your laptop to be the supercomputer. Split the job:

    • The brain lives in the cloud. The heavy reasoning runs on a frontier model (I use Claude) with effectively unlimited horsepower. No NPU on Earth competes with that.
    • The body lives on your laptop. Your machine becomes the always-on hands: it holds your private data, runs small models locally for anything sensitive, and executes the actions the brain decides on.

    An NPU optimizes a handful of on-device Windows features. Architecture gives you an actual operator. Guess which one you feel every day.

    Step 0 — Make it always-on

    An operator rig is a little server, and servers don’t nap. My laptop kept sleeping and killing background jobs, so the first move was to take that off the table (while plugged in):

    powercfg /change monitor-timeout-ac 0
    powercfg /change standby-timeout-ac 0
    powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0
    powercfg /setactive SCHEME_CURRENT

    Screen never blanks, never sleeps, and it keeps running with the lid closed — while still sleeping on battery as a safety. Now it’s a real always-on host.

    Step 1 — A private AI brain that lives on the laptop

    The local engine is Ollama; the chat interface is open-webui (running in Docker). If you want the multi-agent version of this idea, I’ve also written up building a free AI agent army with Ollama and Claude. The only thing standing between me and a private, offline ChatGPT was one wrong setting — open-webui was pointed at a dead address. The fix was to aim it at the host:

    docker run -d --name open-webui --restart always -p 3000:8080 \
      -v open-webui:/app/backend/data \
      -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
      ghcr.io/open-webui/open-webui:main

    The proof: a 3-billion-parameter model (Llama 3.2) introduced itself in about 10 seconds at ~12 tokens/second — on the CPU, no NPU, no discrete GPU. Fast enough for real Q&A, drafting, and summaries. Seven models sit ready on disk, and the whole thing is reachable from my phone over a private network.

    Everything here runs offline. For anything I don’t want leaving the machine, that’s the entire point.

    Step 2 — Voice that never leaves the machine

    A local Whisper speech-to-text container (OpenAI-compatible API) became a push-to-talk dictation tool: hold a key, talk, release, and the text drops into whatever app is focused. I verified the pipeline without even touching the mic — Windows text-to-speech generated a clip, the local Whisper transcribed it, and it round-tripped clean:

    Spoken: “Testing one two three. This is the private local transcription engine.”
    Whisper heard: “Testing 1-2-3. This is the private local transcription engine.”

    Windows has built-in dictation (Win+H) and Copilot voice too — but those ship your audio to the cloud. The local version does the same job, and your voice never leaves the laptop.

    Step 3 — Turn your phone into the control panel

    Using Tailscale (a private mesh network), every service on the laptop is reachable from my phone — without exposing anything to the public internet. I added a tiny web page (one small nginx container) as a mobile operator console: one tap to the local AI, automations, status, and finance dashboards. Pin it to the home screen and the laptop is in your pocket.

    The honest scoreboard vs. a Copilot+ PC

    Capability Copilot+ PC ($1,000+) This $400 laptop
    Private AI running on the device Limited (small NPU models) ✅ Full Ollama stack, 7 models
    An AI that operates the machine ✅ Runs commands, edits files, fixes things
    Private, offline voice dictation ❌ (cloud) ✅ Local Whisper
    Phone control panel ✅ Tailscale operator console
    Recall / Click to Do / Cocreator ✅ (needs the NPU)
    Screenshots everything you do ⚠️ Recall does, by design ✅ No — nothing is recorded

    I’m being fair: the NPU-only features are genuinely off the table on cheap hardware. But for operating your computer — and for privacy — the architecture beats the chip.

    Why this matters more than it looks

    The quiet headline isn’t “I saved money.” It’s where the data lives. Microsoft’s flagship AI-PC feature, Recall, works by screenshotting everything you do. This build does the opposite: the sensitive payload stays on your machine, and the cloud is used only for the heavy thinking that doesn’t need your private files.

    That’s not just a hobbyist’s preference. It’s the exact requirement for anyone in a regulated field — healthcare, legal, finance — who can’t send client data to a third party but still wants real AI leverage. The cheap laptop isn’t the story. The architecture is.

    Frequently asked questions

    Do I need a Copilot+ PC or an NPU to run local AI?

    No. Any laptop with around 16 GB of RAM and a modern CPU can run small local models. An NPU accelerates certain Windows features but is not required for Ollama or local chat.

    Is local AI actually private?

    Yes. With Ollama, the model runs on your own machine and works with no internet connection — nothing is sent to a cloud service.

    What is the difference between Ollama and open-webui?

    Ollama is the engine that runs the models. open-webui is the friendly chat interface that sits in front of it.

    How fast is a local model on a budget laptop?

    On a CPU-only AMD Ryzen 5 with 16 GB of RAM, a 3-billion-parameter model answered at roughly 12 tokens per second — fine for quick questions, drafting, and summaries. Larger models run slower.

    Can I use it from my phone?

    Yes. Over a private Tailscale network you can reach your laptop’s AI and tools from your phone without exposing anything to the public internet.

    Is this better than a Copilot+ PC?

    For operating your machine and for privacy, this setup does more. For NPU-specific Windows features like Recall and Click to Do, a Copilot+ PC is required.

    Want this on your machine?

    Tygart Media builds privacy-first, local-AI operator setups — especially for teams in regulated industries that need real AI leverage without sending data to the cloud. Reach out and we’ll scope it to your hardware.

  • Claude Code vs Cursor in 2026: An Honest Comparison for Developers Who Ship

    Claude Code vs Cursor in 2026: An Honest Comparison for Developers Who Ship

    The conversation about Claude Code vs Cursor has collapsed into lazy takes: Claude Code is smarter, Cursor is friendlier, buy both. That framing is not wrong, but it isn’t useful. If you’re deciding where to put your coding tool budget in 2026, you need to know where each tool wins and loses – with specifics, not vibes.

    Here’s what a year of both tools in production actually looks like.

    The Fundamental Architecture Gap

    Claude Code is a terminal-native CLI agent. You run it with claude in your shell, point it at a codebase, give it a task, and walk away. It has no GUI. It doesn’t autocomplete as you type. What it has is the ability to autonomously execute multi-step tasks – read files, write code, run tests, iterate on failures – without you babysitting it.

    Cursor is an IDE built on VS Code. It has tab autocomplete, an inline chat panel, Agent mode for longer tasks, and a polished visual interface that feels like VS Code with a superpower grafted on. If you already live in VS Code, Cursor’s learning curve is close to zero.

    These are genuinely different tools. The “which one wins” question should really be “which one wins for what.”

    Where Claude Code Wins: Long Autonomous Runs

    The biggest measurable advantage Claude Code has right now is context. Running on Claude Opus 4.6 or 4.7, Claude Code natively supports a 1 million token context window – and that’s a first-class, supported number with no per-token surcharge for long context on the API.

    Cursor’s advertised context is lower, and it draws from multiple model backends depending on which you select. On a large monorepo task – think refactoring an auth system across 40 files – the difference between context limits is the difference between Claude Code holding the whole codebase in view and the alternative having to page through it.

    Claude Opus 4.6 scores 80.84% on SWE-bench Verified, per Anthropic’s published system card. Opus 4.7 improved on that, particularly on the hardest problems in the benchmark set, and on Rakuten-SWE-Bench (a production-task evaluation, not just GitHub issues) it resolves 3x more tasks than Opus 4.6. That is a meaningful gap.

    The autonomous-run workflow looks like this in practice:

    claude "Refactor the payment module to use the new Stripe SDK, update all tests, and make sure existing integration tests still pass"

    Claude Code will read the relevant files, identify the Stripe version mismatch, write the new implementation, run your test suite, and iterate if something fails – often without a single follow-up prompt. That same task in Cursor’s Agent mode typically requires you to approve each file write and re-prompt when the agent stalls on an error.

    Where Cursor Wins: Daily Developer Experience

    Cursor’s tab autocomplete is genuinely good. It’s not a feature Claude Code has at all – Claude Code is not an IDE and doesn’t inject suggestions while you type. If your daily workflow is: open file, write code, open file, write code, Cursor is the better tool for that rhythm.

    Cursor’s @codebase reference and file mention system is also excellent for interactive exploration. You can ask “why does this function fail on null input?” while looking at the code, and Cursor’s inline context makes that conversation fast. Claude Code can answer the same question, but you’re doing it in a terminal with no visual reference.

    For teams on an existing GitHub workflow, GitHub Copilot’s deep integration with PRs, issues, and Actions is hard to match. If your team is standardized on GitHub and your security team needs IP indemnity coverage, Copilot is the defensible enterprise choice – Claude Code and Cursor both require more procurement work.

    The Pricing Reality

    Plan Monthly Cost
    Claude Code via Claude Pro $20/month
    Claude Code via Max 5x $100/month
    Claude Code via Max 20x $200/month
    Cursor Pro $20/month
    GitHub Copilot Individual $10/month

    The entry point is the same for Claude Code (via Claude Pro) and Cursor. At that tier, Claude Code’s usage limits are more restricted. The Max 5x plan at /month is where Claude Code becomes a full autonomous-agent platform – higher rate limits, Opus access, and Claude Code usage limits that are double the Pro tier.

    For individual developers doing heavy autonomous runs, the Max 5x plan at competes directly with a Cursor Pro subscription plus meaningful API spend. For teams, the calculus shifts: Cursor’s team plan pricing is lower per seat than a premium Claude Code subscription, which matters when you’re buying for 20 developers.

    The Honest Call

    Claude Code wins on: autonomous multi-step tasks, large codebase refactors, long-running agents, raw SWE-bench performance, and 1M token context on complex jobs.

    Cursor wins on: daily IDE experience, tab autocomplete, interactive inline chat, onboarding speed for VS Code users, and team-tier pricing.

    The recommendation most senior developers are landing on in 2026 is two tools: Cursor open in the background for interactive work, Claude Code for the tasks you used to put in a Jira ticket and wait two days for. If you can only buy one and you mostly write code file-by-file, get Cursor. If your bottleneck is “I need to refactor three services and I don’t have three days,” Claude Code is the one that changes your output.

    The Max 5x plan makes that bet financially coherent for a senior developer. The Pro tier is a reasonable way to find out if autonomous coding is a workflow you actually use.

    Frequently Asked Questions

    Is Claude Code better than Cursor in 2026?

    It depends on your workflow. Claude Code is a terminal-native CLI agent best for large codebase refactors, multi-file operations, and agentic tasks run from the command line. Cursor is an IDE-first editor with inline completions and a chat sidebar — better for continuous editing with visual feedback. Most developers who ship code daily use both rather than choosing.

    What is the difference between Claude Code and Cursor?

    Claude Code is a CLI tool you run with the ‘claude’ command in your terminal — it acts as an autonomous agent that can read, edit, and run files across a codebase. Cursor is a VS Code fork with AI completions and chat built into the editor interface. Claude Code suits agentic automation; Cursor suits interactive editing.

    Can I use Claude Code and Cursor at the same time?

    Yes. Many developers run Claude Code from the terminal for large refactors or test-writing sessions while keeping Cursor open for active editing. They complement each other: Claude Code for autonomous multi-step tasks, Cursor for line-by-line interactive work.

    How much does Claude Code cost in 2026?

    Claude Code usage is billed through your Anthropic API account against whichever Claude model you select. Claude Opus 4.8 runs $5 per million input tokens and $25 per million output tokens. Claude Sonnet 4.6 runs $3/$15 per million tokens. Claude Haiku 4.5 runs $1/$5 per million tokens. Cursor’s plans start around $20/month for Pro.

    Does Cursor use Claude under the hood?

    Cursor supports multiple underlying models including Claude (Anthropic), GPT-4 (OpenAI), and others. You can select which model Cursor routes to in its settings. Claude Code, by contrast, is a dedicated Anthropic CLI tool that only runs on Anthropic’s Claude models.

    What is Claude Code best used for?

    Claude Code excels at large-scale codebase operations: refactoring across multiple files, writing comprehensive test suites, navigating unfamiliar codebases, and running agentic tasks that chain multiple steps. It is less suited for inline autocomplete as you type — Cursor is better at that.


  • Claude Code’s Rate Limit Doubling: What May 2026 Changed and How to Pick a Plan Now

    Claude Code’s Rate Limit Doubling: What May 2026 Changed and How to Pick a Plan Now

    If you bought a Claude Code subscription in March or April and felt like you were hitting the 5-hour wall every single afternoon, you weren’t imagining it. Anthropic spent six months tightening Claude Code’s quotas — and then, over two weeks in May 2026, gave most of them back. The rate-limit math that drove plan-selection advice on the internet through April is now obsolete. Here’s what actually changed, what the numbers look like today, and how to think about Pro versus Max if you’re picking a plan this week.

    What Anthropic actually did

    On May 6, 2026, Anthropic doubled the 5-hour rate limits on Claude Code across every paid plan — Pro, Max 5x, Max 20x, Team Premium, and seat-based Enterprise. In the same announcement, they removed the peak-hour throttle that had been quietly halving available quota for Pro and Max users during weekday business hours. They also lifted API-side rate limits on the Opus tier.

    One week later, on May 13, 2026, they followed up with a 50% increase to the weekly cap across the same plans. Unlike the 5-hour change, that weekly bump carries an expiration date: July 13, 2026, unless extended. Treat it as a temporary boost, not a permanent feature.

    The trigger Anthropic pointed to is a deal that brings the full capacity of the Colossus 1 data center in Memphis online — over 300 megawatts and roughly 220,000 NVIDIA GPUs. That detail matters less than the practical one: capacity-driven throttling that had been the dominant constraint since late 2025 has loosened.

    The new numbers, by plan

    The shape of the plan ladder hasn’t changed — Pro at $20, Max 5x at $100, Max 20x at $200, Team Premium at $100/seat with a 5-seat minimum. What changed is what each tier actually delivers per window.

    • Pro ($20/mo): Roughly 90 prompts per 5-hour window now (up from a number that, in practice, was hovering around 45 once the peak-hour throttle kicked in). No peak penalty. Weekly cap is 50% higher through July 13.
    • Max 5x ($100/mo): Same doubled 5-hour window. Weekly Opus 4.7 budget moved from approximately 50 hours to approximately 75.
    • Max 20x ($200/mo): Doubled 5-hour window. Weekly Opus 4.7 budget moved from approximately 200 hours to approximately 300.
    • Team Premium ($100/seat/mo, annual; $125 monthly): Mirrors Max 5x quotas at the seat level. 5-seat minimum still applies.

    Two numbers that haven’t changed: the API pay-as-you-go pricing for the underlying models (claude-sonnet-4-6 at roughly $3 per million input tokens and $15 per million output; claude-opus-4-7 at roughly $5 in and $25 out), and the existence of the weekly cap itself. The weekly cap is still the thing that kills Max users mid-Friday.

    What this changes about plan selection

    Most of the “which plan should I buy” guides written before May 6 over-recommend Max 5x because they were sizing it against artificially compressed Pro limits. With a doubled 5-hour cap and no peak throttle, Pro at $20 is now genuinely enough for a developer doing focused coding sessions a few hours a day — something that wasn’t reliably true a month ago.

    The Max 5x case still holds, but it’s narrower now. The honest test: if you regularly burn through your Pro 5-hour window before lunch, or if you run two or three concurrent Claude Code sessions on different repos, $100 still pays for itself. If you don’t, Pro will hold.

    Max 20x is increasingly a workflow choice rather than a quota choice. The doubled limits made Max 5x sufficient for almost every solo workflow I can describe. Where 20x still earns its price is multi-agent workflows, where a coordinator-and-workers pattern can burn three to seven times the tokens of a single-agent session because every teammate maintains its own context window.

    The hidden costs that didn’t change

    The rate-limit relief is real, but several gotchas that drove “Claude Code costs me more than I expected” complaints in Q1 are still live:

    • Set ANTHROPIC_API_KEY in your shell and Claude Code bills at API rates — your subscription is silently ignored. Unset it before launching the CLI if you’re on a plan.
    • Weekly caps count active processing time only. Idle browsing is free. Long-running tool calls and extended-thinking budgets aren’t.
    • Extended thinking is billed as output tokens. On Opus 4.7 that’s roughly $25 per million. Default thinking budgets of tens of thousands of tokens per request stack up fast on API.
    • MCP server output sits in context for the rest of the session. A “list the last 20 PRs” call can dump 8,000 tokens of metadata that you’ll re-pay for on every subsequent turn until the conversation rolls over.

    If you were running into the 5-hour wall and assumed it was a usage problem, check whether one of those four is actually the cause before you upgrade.

    What to do this week

    If you’re on Pro and were considering Max 5x, wait two weeks. The new Pro ceiling is high enough that the upgrade decision now needs different evidence than it did in April.

    If you’re already on Max 5x and felt squeezed, the May 13 weekly bump should give you breathing room — but mark July 13 on your calendar. If the temporary 50% increase isn’t extended, the squeeze comes back.

    If you’re picking a plan from scratch today: start on Pro. The doubled limits are real, the peak-hour penalty is gone, and the upgrade path to Max stays open with no friction. Buy quota when you’ve measured that you need it, not before.

    The model versions to use

    For anyone writing the API string into a script this week: flagship is claude-opus-4-7, workhorse is claude-sonnet-4-6, fast tier is claude-haiku-4-5-20251001. Pull from docs.anthropic.com/en/docs/about-claude/models before shipping anything — the version strings have moved twice already this year and they’ll move again.