Facebook iconHow to Use Claude Code? (Everything You Need to Know)
F22 logo
Blogs/AI

How to Use Claude Code? (Everything You Need to Know)

Written by Rabbani Shaik
Dec 10, 2025
6 Min Read
How to Use Claude Code? (Everything You Need to Know) Hero

Have you ever wanted a simple way to get coding help right inside your terminal? This article is about Claude Code, Anthropic’s AI tool that works from the command line, reads your project, and helps with everyday coding tasks like explaining code, automating routine steps, and handling Git commands using plain language. 

We’ll guide you through installing it, using the main commands, setting permissions safely, and extending it with external tools through the Model Context Protocol (MCP). By the end, you’ll know how to set up Claude Code in your own projects and use it to work more smoothly and efficiently. As reported by ppc.land, Claude Code has already processed 195 million lines of code in a week. Keep reading to see how it can fit into your workflow.

welcome to claude code

How to Install and Set Up Claude Code

Install via npm

# Install Claude Code
npm install -g @anthropic-ai/claude-code

# Navigate to your project
cd your-awesome-project

# Start coding with Claude
claude
# You'll be prompted to log in on first use

Basic Commands in Claude Code

Once you’ve installed Claude Code, here are some essential commands you’ll use regularly.

Starting a Session

# Start a new Claude session
claude

# Start with MCP servers configured in a JSON file
claude --mcp-config .mcp.json

# Skip ALL permission prompts (dangerous, allows execution without confirmation)
claude --dangerously-skip-permissions

Working With Prompts

# Start with an initial prompt
claude "explain this project"

# Continue the most recent conversation
claude -c

# Resume any past conversation (shows history)
claude --resume

Maintenance
# Update to the latest CLI version
claude update

What You Can Do Inside a Claude Session?

Once inside a session, Claude provides a set of slash commands (/) for extended functionality:

  • /mcp → Check MCP server status
  • /clear → Clear the current context (start fresh)
  • /compact → Compact the conversation to reduce token usage
    • Useful since Claude Code has a ~200k context limit (can be restrictive for large projects)
  • /memory → Edit persistent memory (claude.md)
  • /model → Switch between models
    • opus-4.1 for planning (more powerful, more expensive)
    • sonnet-4.1 for day-to-day coding
  • /review or /security-review → Trigger code review

Using claude.md - The Claude code’s context of your project.

What is claude.md?

  • A simple markdown file that acts as long-term memory for your project.
  • Claude reads it automatically at the start of every session (/init).
  • Anything in claude.md becomes part of Claude’s working context—without you having to re-explain it every time.

What to Put in claude.md

Think of it as a project README for your AI pair-programmer. Examples:

  • Project goals & scope
  • Coding conventions (naming patterns, linting rules)
  • Architecture notes
  • Environment setup instructions
  • Special constraints (e.g., “always use Python 3.12,” “React 18 only”)

Updating claude.md from Prompts

You don’t even need to edit the file manually. Inside a session, you can tell Claude to remember something using the # symbol:

claude prompt

This automatically appends the instruction to your claude.md file.

Pro tip: Keep claude.md in version control with your team. That way, every developer (and every Claude session) shares the same context.

MCP: Extend Claude Code with External Tools

MCP (Model Context Protocol) is what allows Claude Code to reach beyond your local terminal and interact with external services. By configuring MCP servers, you can give Claude access to tools such as:

  • context7 → Up-to-date documentation for LLMs and AI code editors
  • GitHub → Pull requests, issues, repo browsing
  • Git → Local Git operations
  • Playwright → browser automation
How to Use Claude Code Effectively
Learn prompt strategies and integration workflows to get the most from Claude Code for generation, debugging, and documentation.
Murtuza Kutub
Murtuza Kutub
Co-Founder, F22 Labs

Walk away with actionable insights on AI adoption.

Limited seats available!

Calendar
Saturday, 31 Jan 2026
10PM IST (60 mins)

In short, MCP is how you turn Claude Code from a “chatty assistant” into a programmable development agent.

Opening the MCP Configuration Workflow

Inside a Claude session, run:

/mcp

This command opens the MCP configuration workflow, where you can:

  • Add or remove MCP servers
  • Inspect which servers are active
  • Verify connection status

Example: Adding the Context7 MCP Server

Let’s walk through adding a real MCP server, Context7.

Context7 is a popular MCP server that provides up-to-date code snippets from major frameworks and Git repositories. Once connected, Claude can fetch relevant examples directly into your workflow.

Step 1. Get Your API Key

Log in to the Context7 dashboard and copy your API key.

Step 2. Add the MCP Server

Run the following command:

claude mcp add --transport http context7 https://mcp.context7.com/mcp \
  --header "CONTEXT7_API_KEY: YOUR_API_KEY"

This command installs Context7 as a global MCP server on your system.

Step 3. Verify the Setup

Open a Claude Code session and run:

/mcp

You should see context7 listed among the active MCP servers.

Step 4. Use It in Prompts

When you want Claude to use Context7, simply reference it in your prompt:

  • Use context7 to get me the latest Next.js authentication snippet.
  • Fix this camera track not getting published to livekit during low network conditions. Use context7 to get the latest code. 

Claude will automatically call the Context7 MCP server and pull in relevant results.

That’s it, adding an MCP server really is as easy as “blowing out a candle on a cake.”

Example:

Permissions & Project-Scoped MCP Servers

By default, Claude will ask for your permission before invoking any MCP server. Once approved, it integrates the tool into its workflow seamlessly.

Sometimes, however, you don’t want global servers, you need project-specific MCP configurations that can also be shared with teammates.

Using .mcp.json for Project Scope

You can configure MCP servers at the project level by creating a .mcp.json file in your repo. This allows you to:

  • Keep project tools isolated from global ones
  • Share the same MCP setup with your team via version control
  • Ensure consistent environments across devs

Example: Adding the Playwright MCP Server

Playwright has an MCP server that lets Claude Code execute browser automation, perfect for UI testing and debugging.

  1. Create a .mcp.json in your project root.
  2. Add the server config like this:
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}
  1. command: "npx" → Uses npx to run the tool
  2. args: [...] → Installs and runs the latest Playwright MCP package
How to Use Claude Code Effectively
Learn prompt strategies and integration workflows to get the most from Claude Code for generation, debugging, and documentation.
Murtuza Kutub
Murtuza Kutub
Co-Founder, F22 Labs

Walk away with actionable insights on AI adoption.

Limited seats available!

Calendar
Saturday, 31 Jan 2026
10PM IST (60 mins)

Triggering the Server

Once defined, Claude Code will automatically pick up the project’s .mcp.json. To use it, just ask in your Claude prompt:

Use the playwright MCP server to test the login flow.

Claude will then execute browser automation through Playwright as part of its workflow.

Use Case: This is especially powerful for automation testing, detecting UI regressions, running end-to-end flows, or validating

Multi-Model Strategy: Choosing the Right Model

Claude Code supports multiple models, and you can switch between them at any time using the /model command. Each model has its strengths, so knowing when to use which can save you time (and money).

When to Use Each Model

  • Opus 4.1 → Best for architecture, system design, and complex debugging
    • Slower and more expensive, but produces deeper reasoning and higher-quality plans.
  • Sonnet 4 → Ideal for day-to-day development
    • Balanced speed and quality, great for writing functions, tests, or iterating quickly.

The Hybrid Mode: opusplan

If you want the best of both worlds, Claude Code introduces opusplan mode.

Here’s how it works:

  1. Planning with Opus 4.1
    • Claude first uses Opus 4.1 to analyze your request.
    • It produces a detailed plan (e.g., files to edit, functions to touch, risks to consider).
  2. Execution with Sonnet 4
    • Once you approve the plan, Claude switches to Sonnet 4 to implement the code.
    • You get both the depth of Opus and the efficiency of Sonnet.

BOOM  (Probably the best outcome of an agentic coding agent, anthropic really nailed it here) 

Claude will give you a plan to implement a feature/ fix a bug or anything you want. It will tell you the file that it is gonna change and all. And you can approve the plan or modify it and accept. Sonnet 4 will take over and code it for you.

Conclusion

Claude Code is intentionally low-level and unopinionated, sitting close to raw model access, so it can adapt to your development workflow rather than forcing a new one.

Think of it as a senior pair-programmer sitting in your terminal:

  • Be specific in your prompts
  • Iterate instead of expecting perfection in one shot
  • Keep safety checks on unless you know what you’re doing
  • Extend it with MCP servers when you need external tools or integrations

Used well, Claude Code doesn’t just speed up your work, it changes how you build, test, and reason about software.

Author-Rabbani Shaik
Rabbani Shaik

AI enthusiast who loves building cool stuff by leveraging AI. I explore new tools, experiment with ideas, and share what I learn along the way. Always curious, always building!

Share this article

Phone

Next for you

Reflection Prompting Explained: Why One Prompt Is Not Enough Cover

AI

Jan 30, 20269 min read

Reflection Prompting Explained: Why One Prompt Is Not Enough

Modern AI models are remarkably powerful, but their first answer is rarely their best. Logical gaps, shallow explanations, and missing edge cases often appear, especially in complex, technical, or high-stakes tasks. This is where Reflection Prompting becomes essential. Reflection Prompting introduces a simple but powerful idea: instead of accepting the first response, you ask the model to pause, review its own output, and improve it. Much like a human writing a draft and then editing it, the m

Voice AI Appointment Agent for Multi-Branch Clinics Cover

AI

Jan 29, 20267 min read

Voice AI Appointment Agent for Multi-Branch Clinics

I recently tried to book an appointment at a multi-branch clinic and realised how broken the experience still is. You either wait on hold, get bounced between branches, or leave your number and hope someone calls back. Even when clinics have chatbots, most of them only collect details and hand it off to staff, the booking still doesn’t happen. That’s what pushed us to build this Voice AI Appointment Agent. We designed it to complete the booking end-to-end: start in chat, capture consent, trigge

8 Questions to Ask Before Hiring an AI Development Company Cover

AI

Jan 28, 20265 min read

8 Questions to Ask Before Hiring an AI Development Company

Are you ready to use artificial intelligence to grow your business, but worried about choosing the wrong partner? In 2025, this decision matters more than ever. According to industry reports, over 80% of enterprises are increasing their AI budgets, yet many still struggle to see meaningful returns because of poor vendor selection. Choosing the right AI development company is not just a technical decision; it directly affects cost, speed, and long-term success. The right partner can help you bui