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

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

Sep 11, 20256 Min Read
Written by Rabbani Shaik
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.

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:

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:

  • context7Up-to-date documentation for LLMs and AI code editors
  • GitHub → Pull requests, issues, repo browsing
  • Git → Local Git operations
  • Playwright - browser automation

Partner with Us for Success

Experience seamless collaboration and exceptional results.

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

Partner with Us for Success

Experience seamless collaboration and exceptional results.

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!

Phone

Next for you

What is RLHF Training? A Complete Beginner’s Guide Cover

AI

Sep 9, 20259 min read

What is RLHF Training? A Complete Beginner’s Guide

Have you ever wondered how ChatGPT learned to be so conversational and helpful? The secret sauce is called Reinforcement Learning from Human Feedback (RLHF), a technique that teaches AI models to behave more like humans by learning from our preferences and feedback. Think of RLHF like teaching a child to write better essays. Instead of just showing them good examples, you also tell them "this answer is better than that one" and "I prefer this style over that style." The AI learns from these com

The Complete Guide to Observability for LiveKit Agents Cover

AI

Sep 3, 20258 min read

The Complete Guide to Observability for LiveKit Agents

Why do LiveKit agents sometimes fail without warning, leaving you unsure of what went wrong? If you’ve dealt with sudden disconnections, poor audio, or unresponsive agents in production, you know how frustrating it is when logs only show “Agent disconnected” without contxext. Real-time communication apps like LiveKit are much harder to monitor than standard web apps. A half-second delay that’s fine for a webpage can ruin a video call. With constant state changes, multiple failure points, and co

5 Best Document Parsers in 2025 (Tested) Cover

AI

Sep 2, 202511 min read

5 Best Document Parsers in 2025 (Tested)

Ever opened a PDF and wished it could turn itself into clean, usable data? This article compares five leading document parsers, Gemini 2.5 Pro, Landing AI, LlamaParse, Dolphin, and Nanonets, using the same financial report, so you can see how they handle tables, headings, footnotes, and markdown.  You’ll learn which tools are fastest, which keep structure intact, what they really cost, and when self-hosting is worth it. By the end, you’ll know exactly which parser fits your stack, budget, and d