Skip to content
KoishiAI
ไทย
← Back to contents
Chapter 2 / 12 · April 24, 2026

Tools and Commands

The tools that sit alongside Claude Code — editor integrations, MCP servers for files, GitHub, browsers, databases and Slack, and a full Git workflow.

This guide is All Rights Reserved — free to read, copying/republication requires permission.

Chapter 2 | Tools to use alongside Claude Code Written for: developers who want to use Claude Code professionally — every level

Editor Integration — connecting to a code editor

Claude Code runs most smoothly paired with a good code editor. Each editor installs and signs in differently, so this chapter goes through them one at a time in detail.

VS Code (Visual Studio Code)

VS Code is the most popular editor in the world, it is free, and it supports Claude Code very well through several routes.

Method 1 — Through the integrated terminal (nothing extra to install)

1Download and install VS Code
Go to code.visualstudio.com and download the build for your operating system
2Open the project folder
File → Open Folder, or drag a folder onto the VS Code window
3Open a terminal
Press Ctrl+` (backtick) or View → Terminal, and you get a terminal already sitting in the project folder
4Run Claude Code
Type claude in the terminal, press Enter, and start giving instructions
# Open a terminal in VS Code and run
claude
 
# Or use one-shot mode
claude -p "explain the file @src/app.ts for me"

The extension puts Claude in the VS Code sidebar, so you use it without switching to the terminal.

Installing and signing in

Press Ctrl+Shift+X to open the Extensions Marketplace

Search for "Claude" or "Anthropic" and pick the Claude extension (by Anthropic)

Press Install and wait for it to finish

VS Code shows a sign-in popup → click “Sign in with Claude.ai”

A browser opens; log in with your Anthropic account and press Authorize

Back in VS Code you will see the Claude icon in the left sidebar

💡 Sign in with an API key instead of an account
If you would rather not sign in with an account, open Settings (Ctrl+,), search for “Claude API Key” and enter the key directly. Suited to use inside an organisation

Method 3 — Install the Continue extension (supports several models)

Continue is a popular extension that supports Claude and other models, with a fuller feature set.

Search for “Continue” in the Marketplace and install it

Press Ctrl+Shift+P and type “Continue: Open Config” to open config.json

Add Claude as a provider like this:

{
  "models": [
    {
      "title": "Claude Sonnet 4",
      "provider": "anthropic",
      "model": "sonnet",
      "apiKey": "sk-ant-api03-xxxxxxxxxx"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Claude Haiku",
    "provider": "anthropic",
    "model": "haiku"
  }
}

Save the file, then press Ctrl+L to open a chat with Claude in the sidebar

💡 Shortcuts you will use often in Continue
Ctrl+L = open chat | Ctrl+Shift+L = send the selected code to Claude | Ctrl+I = inline-edit the code at the cursor

Cursor — AI-First Editor

Cursor is a code editor forked from VS Code and designed specifically for AI. Claude is embedded in the UI from the start, with no extension to install.

Installing Cursor

1Download Cursor
Go to cursor.com → Download for [your operating system]. The file is around 200MB
2Install and open it
Install it like any other app. On first launch it asks whether you want to import your settings from VS Code
3Sign in and set up Claude
Cursor has Claude built in, but to use your own API key go to Settings → Models

Making Cursor use your own Claude API key

By default Cursor uses its own credits, but if you want to use a personal API key (cheaper and more flexible):
Open Cursor → Settings (Ctrl+Shift+J) → Models

Scroll down to Claude under “API Keys”

Switch on “Use your own API key” and enter your Anthropic API key

Pick the model you want as the default

# Set it in the project's .env (this works with Cursor Composer too)
ANTHROPIC_API_KEY=sk-ant-api03-xxxxxxxxxx

Cursor’s main features

FeatureShortcutWhat it does
ChatCtrl+LOpens a panel for talking to Claude while you write code
ComposerCtrl+IHas Claude edit several files across the project at once
Inline EditCtrl+KEdits the highlighted code directly with Claude
Codebase ChatCtrl+Shift+LAsks Claude about the whole project codebase
Tab CompleteTabAccepts an AI suggestion as you type

💡 Cursor Rules — the equivalent of CLAUDE.md
Create a .cursorrules file at the project root and put the project context in it, such as tech stack and conventions. Cursor reads it every time, exactly as with CLAUDE.md

JetBrains IDEs (IntelliJ, PyCharm, WebStorm, GoLand…)

JetBrains makes professional-grade IDEs for individual languages, and Claude installs the same way in all of them.

Which IDE goes with which language

IDEMain languageWho should use it
IntelliJ IDEAJava, KotlinJava/Android developers
PyCharmPythonPython, data science, ML/AI
WebStormJavaScript, TypeScriptFrontend and Node.js developers
GoLandGoGo developers
PhpStormPHPPHP developers
RubyMineRubyRuby on Rails developers
CLionC, C++Systems and embedded developers

Installing the Claude plugin on JetBrains

1Open the plugin marketplace
Go to Settings (Ctrl+Alt+S) → Plugins → Marketplace
2Find and install the plugin
Search for “Claude” or “Anthropic” and press Install on the one from Anthropic
3Restart the IDE
Press Restart IDE so the plugin takes effect
4Sign in / enter an API key
Go to Settings → Tools → Claude and enter an API key, or press “Login with Claude.ai”
# Or set the API key through an environment variable
# macOS/Linux: add to ~/.zshrc
export ANTHROPIC_API_KEY="sk-ant-api03-xxxx"
 
# Windows PowerShell
$env:ANTHROPIC_API_KEY = "sk-ant-api03-xxxx"

Using Claude inside JetBrains

Alt+C → opens the Claude chat panel on the right

Right-click highlighted code → Claude → Ask Claude / Explain / Refactor

Alt+Shift+C → inline-edits the selected code

Open the Claude tool window and you can drag files from Project Explorer into the chat

💡 Use the AI Assistant alongside Claude
JetBrains has an AI Assistant of its own and you can run both together — the AI Assistant handles IDE-specific work such as refactoring and renaming, while Claude handles logic and architecture

Neovim — for people who live in the terminal

Neovim is a text editor that runs in the terminal, suited to developers who prefer a keyboard-driven workflow.

Installing the Claude.nvim plugin

-- Add to ~/.config/nvim/lua/plugins/claude.lua
-- Using lazy.nvim as the plugin manager
return {
  "pasky/claude.vim",
  config = function()
    vim.g.claude_api_key = os.getenv("ANTHROPIC_API_KEY")
    vim.g.claude_model = "sonnet"
  end
}
 
-- Or use avante.nvim, which has a fuller feature set
return {
  "yetone/avante.nvim",
  opts = {
    provider = "claude",
    claude = {
      model = "sonnet",
      api_key_name = "ANTHROPIC_API_KEY"
    }
  }
}

💡 Recommended: use the Claude Code CLI instead
For Neovim users the advice is to run the Claude Code CLI in a separate terminal (a tmux split) rather than installing a plugin, because the CLI is the better experience and it updates more often

MCP (Model Context Protocol) — the complete guide

MCP is an open standard Anthropic created that lets Claude connect to external tools and services. Think of it as a “plugin” system that extends what Claude can do without limit.

How MCP is structured

MCP is client-server: Claude Code is the client, and an MCP server is the intermediary that talks to the external service.

Correction (updated 2026-09) The previous edition of this guide said MCP is configured in ~/.claude/settings.json, which is wrong. The current official documentation has no MCP configuration in settings.json at all. What is correct is that there are three scopes

ScopeStored whereUse it when
local (the default)~/.claude.json, under that project’s pathFor this project only, private to you
project.mcp.json at the project rootTo share with the team — commit it to the repo
user~/.claude.jsonFor every project on your machine

The recommended approach is the claude mcp add command, which writes the file for you so you never edit JSON by hand.

# stdio server (note the -- separator before the command to run)
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
  -- npx -y airtable-mcp-server

# remote server over HTTP
claude mcp add --transport http notion https://mcp.notion.com/mcp

# store it at project scope to share with the team
claude mcp add --transport http shared-server --scope project https://example.com/mcp

-s or --scope takes local, project or user; -t or --transport takes http, sse or stdio; and -H or --header supplies a header for authentication.

The sse transport is deprecated. The official documentation says to use an HTTP server instead wherever one is available

You can write .mcp.json yourself if you prefer. The shape is this

{
  "mcpServers": {
    "shared-server": {
      "type": "http",
      "url": "https://example.com/mcp"
    },
    "database-tools": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@bytebase/dbhub"],
      "env": {
        "DB_URL": "${DB_URL:-postgresql://localhost/mydb}"
      }
    }
  }
}

Every remaining example in this section still works with the same mcpServers shape. Just move it into .mcp.json, or use claude mcp add, rather than editing settings.json

// The basic shape of an mcpServers block
{
  "mcpServers": {
    "server-name": {
      "command": "the command that runs the server",
      "args": ["argument1", "argument2"],
      "env": {
        "API_KEY": "the environment variable value"
      }
    }
  }
}
MCP Filesystem — read and write local files

Gives Claude access to files outside the working directory. Suited to searching and editing files across projects.

// ~/.claude/settings.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/john/Projects",
        "/Users/john/Documents/notes"
      ]
    }
  }
}

Examples

> find every file with the .env extension in /Users/john/Projects
> read the README of every project in /Projects and summarise them
> compare package.json between ProjectA and ProjectB

⚠️ Be careful with access rights
Name only the folders you want Claude to reach. Do not hand over / or the whole of /home, or Claude sees every file on the machine

MCP GitHub — managing repositories on GitHub

Lets Claude read issues, pull requests, code and Actions on GitHub directly.

Installation steps

Go to github.com → Settings → Developer settings → Personal access tokens → Tokens (classic)

Press Generate new token and choose the scopes: repo, read:org, read:user

Copy the token you get

Add it to .mcp.json (or use claude mcp add, per the scopes section above):

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxx"
      }
    }
  }
}

Examples

> show every issue still open in the repo myorg/myproject
> summarise what pull request #42 changes
> find issues about "authentication" and propose fixes
> look at the latest GitHub Actions workflow and find where it failed
MCP Browser — searching and opening web pages

Lets Claude open websites, fill in forms, click buttons and pull data from the web in real time, through Playwright.

# Install Playwright first
npx playwright install chromium
 
// settings.json
{
  "mcpServers": {
    "browser": {
      "command": "npx",
      "args": ["@playwright/mcp"]
    }
  }
}

Examples

> open https://npmjs.com/package/react and tell me the latest version
> search Google for "Next.js 15 new features" and summarise the results
> open docs.anthropic.com and find how to use the Tool Use API
> check whether mycompany.com loads normally
MCP Database — connecting to a database

Lets Claude query a database directly. PostgreSQL, MySQL and SQLite are supported.

PostgreSQL

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://user:password@localhost:5432/mydb"
      ]
    }
  }
}

SQLite

{
  "mcpServers": {
    "sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sqlite",
        "--db-path", "/path/to/database.db"
      ]
    }
  }
}

Examples

> show the schema of every table in the database
> find users whose last login was 30 days ago
> analyse the performance of this query and suggest how to optimise it
> write a migration script adding a "deleted_at" column to the users table

⚠️ Always use a read-only user
For a production database, have Claude connect with a user that holds SELECT rights only. It prevents accidental changes to the data

MCP Slack — reading and sending Slack messages
// Create a Slack app at api.slack.com → Your Apps
// Add the scopes: channels:read, chat:write, files:read
 
{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-xxxxxxxxxxxx",
        "SLACK_TEAM_ID": "T0XXXXXXXXX"
      }
    }
  }
}

Examples

> summarise the messages in #general over the past two days
> find messages mentioning "deployment issue" in #engineering
> post a message to #releases saying the deploy is finished
MCP Brave Search — privacy-friendly internet search
// Sign up for an API key at brave.com/search/api
{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": {
        "BRAVE_API_KEY": "BSA-xxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Managing MCP: a summary

# See which MCP servers are connected
/mcp
 
# Restart an MCP server (after editing settings.json)
/mcp restart
 
# View MCP logs (for debugging when something goes wrong)
/mcp logs filesystem

💡 Run several MCP servers at once
You can add several MCP servers to settings.json together. Claude picks the appropriate tool by itself, so you do not have to name one every time

Git with Claude Code — the complete guide

Git is a skill every developer needs. Using Claude Code alongside it makes managing code, writing commit messages and reviewing changes far faster and more accurate than before.

The Git basics you need

Repository (Repo)A project folder Git looks after, with a hidden .git folder inside
CommitA snapshot of the code at a moment in time, identified by a hash
BranchA line of commit history, used to develop a feature without touching main
Staging AreaWhere files wait before a commit (git add puts them there)
RemoteA repository on a server such as GitHub or GitLab, used for push and pull
HEADYour current position in the history, normally the latest commit
Working TreeThe files in the current folder that have not been committed

A standard workflow with Claude helping at every step:

1Starting a new feature: create a branch
Always create a new branch for each feature; never work on main directly
# Create a new branch and switch to it
git checkout -b feature/user-authentication
 
# Or use the newer command
git switch -c feature/user-authentication
 
# Give the branch a meaningful name, for example
# feature/xxx  = a new feature
# fix/xxx      = a bug fix
# refactor/xxx = restructuring code
# docs/xxx     = documentation updates
2Write code with Claude
Use Claude Code to help write and edit the code
# Start Claude Code
claude
 
# Give Claude an instruction
> build JWT authentication middleware for Express.js
  with refresh tokens and revocation as well
3Look at the changes before committing
Check the changed code is right before you record it
# See which files changed
git status
 
# See the detail of the changes (the diff)
git diff
 
# Have Claude analyse the changes
git diff | claude -p "review this change — are there any problems"
4Add files to the staging area
Pick the files you want in the commit
# Add every file
git add .
 
# Add only certain files
git add src/middleware/auth.js src/utils/jwt.js
 
# Add parts of a file at a time (interactive)
git add -p src/app.js
5Write the commit message with Claude
Have Claude write a good commit message from the diff
# The recommended way: let Claude write the commit message
git diff --staged | claude -p "write a commit message in
Conventional Commits format for this change"
 
# An example of the output Claude will write for you
# feat(auth): add JWT authentication middleware
#
# - Implement access token (15min) and refresh token (7d)
# - Add token revocation via Redis blacklist
# - Include rate limiting (10 requests/min)
6Commit the code
Record the commit with the message Claude wrote
# Commit with the message inline
git commit -m "feat(auth): add JWT authentication middleware"
 
# Commit and open an editor to write a detailed message
git commit
 
# Commit every tracked file and record it (skipping git add)
git commit -am "fix: correct token expiry calculation"
7Push to the remote
Send the code up to GitHub/GitLab
# Push a new branch for the first time
git push -u origin feature/user-authentication
 
# Every push after that (the remote is remembered)
git push

Git techniques you will use regularly with Claude

1. Code review before merging

Have Claude review everything in the branch before you open a pull request

# Review everything that differs from main
git diff main...feature/my-feature | claude -p \
"review this code as a senior developer would, checking
 security, performance, edge cases and code quality"
 
# Review only the changed file
git diff main -- src/api/auth.js | claude -p "review this auth section"

2. Writing a PR description automatically

# Build a PR description from the commit history
git log main..HEAD --oneline | \
  claude -p "write a pull request description from these commits,
  including Summary, Changes, Testing steps and Screenshots needed"

3. Resolving merge conflicts with Claude

When a merge produces a conflict, Claude can resolve it for you.

# Suppose a merge produces a conflict
git merge main
# Auto-merging src/utils/auth.js
# CONFLICT (content): Merge conflict in src/utils/auth.js
 
# Have Claude resolve the conflict
cat src/utils/auth.js | claude -p \
"resolve this merge conflict correctly,
 keeping the logic from both branches"
 
# Or ask inside a Claude Code session
> resolve the merge conflict in @src/utils/auth.js,
  keeping the features from both main and the current branch

4. Git bisect to find the cause of a bug

Git bisect finds the commit that caused a bug by binary search, and Claude can help analyse the result.

# Start the bisect
git bisect start
git bisect bad                    # the current commit has the bug
git bisect good v1.0.0            # a commit known to be good
 
# Git checks out the middle commit; test it and report the result
git bisect good    # if this commit does not have the bug
git bisect bad     # if this commit has the bug
 
# Repeat until the culprit turns up, then have Claude analyse it
git show <bad-commit-hash> | claude -p "explain how this commit causes the bug"
 
# End the bisect
git bisect reset

5. Stash — parking work temporarily

When you have to switch branch suddenly but the work is not finished, stash it first.

# Park the current work temporarily
git stash push -m "auth middleware work, not finished"
 
# Switch branch to deal with something urgent
git switch hotfix/payment-bug
# ... fix the bug, commit, push ...
 
# Come back and carry on
git switch feature/user-authentication
git stash pop
 
# See the stashes you have
git stash list

6. Interactive rebase — tidying up commits

Use it before pushing to leave a commit history that is clean and easy to read.

# Edit the last 5 commits
git rebase -i HEAD~5
 
# Commands you will use often in the editor:
# pick   = keep this commit
# reword = keep it but change the message
# squash = merge it into the previous commit
# drop   = remove the commit
 
# Example: combine 3 commits into 1
# pick   abc1234 feat: start auth
# squash def5678 feat: add refresh token
# squash ghi9012 feat: add revocation
 
# Have Claude write the squash message
git log --oneline HEAD~3..HEAD | \
  claude -p "write a commit message for these combined commits"

⚠️ Never rebase a branch you have already pushed
Rebasing changes commit hashes, so the history no longer matches the remote and your team has a problem. Rebase only commits you have not pushed

7. Git hook + Claude (automation)

Set up a Git hook so Claude reviews the code automatically before every commit.

# Create the file .git/hooks/pre-commit
#!/bin/bash
 
# Pull the diff of what is about to be committed
DIFF=$(git diff --staged)
 
# If anything changed, have Claude review it
if [ -n "$DIFF" ]; then
  echo "🤖 Claude is reviewing the code..."
  REVIEW=$(echo "$DIFF" | claude -p \
    "review this code; if there is a critical problem, say so and exit 1")
  echo "$REVIEW"
fi
 
# Make the file executable
chmod +x .git/hooks/pre-commit

8. Conventional Commits — the commit message standard

The commit message standard used widely in professional projects.

TypeWhen to use itExample
featAdding a new featurefeat(auth): add OAuth2 login
fixFixing a bugfix(api): correct status code on 404
refactorRestructuring coderefactor(db): optimize query builder
docsUpdating documentationdocs(readme): add installation steps
testAdding or fixing teststest(auth): add JWT expiry test cases
choreOther maintenance workchore(deps): bump react to 19.0.0
perfImproving performanceperf(search): add Redis caching
styleFixing formatting without changing logicstyle: fix indentation in utils
ciChanging CI/CD configci: add staging deploy workflow
# Have Claude write a Conventional Commit message
git diff --staged | claude -p \
"write a commit message in Conventional Commits format
 (feat/fix/refactor/docs/test/chore/perf/style/ci)
 with a scope and a body explaining the detail"

Emergency Git commands you need to know

git restore Discards the changes in a file, back to the latest commit
git restore —staged Takes a file out of the staging area (undoes git add)
git commit —amendEdits the latest commit (message or content) before pushing
git reset —soft HEAD~1Undoes one commit but keeps the code in staging
git reset —hard HEAD~1Undoes one commit and throws the code away (dangerous!)
git reflogShows every action in the history, even deleted ones; use it to recover
git cherry-pick Brings a single commit onto the current branch
git revert Creates a new commit that undoes an old one (safer than reset)

💡 Use Claude in an emergency
If you have made a mess in Git and do not know how to fix it, run git status and git log —oneline -10, send the output to Claude and describe what happened. Claude will suggest the safest way out

Glossary for this chapter

ExtensionAn add-on for a code editor that adds extra capability
PluginAn add-on for an IDE; JetBrains calls them plugins
MCP ServerA program that takes instructions from Claude and works with an external service
Personal Access TokenA secret code for reaching the GitHub API in place of a password
RepositoryA project Git manages, holding the whole commit history
BranchA line of commit history, used to develop a feature without touching main
MergeCombining one branch into another
RebaseMoving commits to start from a new base, which leaves a clean history
StashParking unfinished work temporarily so you can switch branch
Staging AreaWhere files wait before a commit (git add puts them there)
Pull Request (PR)A request to merge code from one branch into another, with review
Conventional CommitsA commit message standard that keeps history readable and changelogs auto-generatable
Git HookA script that runs automatically on a Git action, such as pre-commit or post-push
ConflictThe clash when two branches change the same line; it has to be resolved by hand