Difference between revisions of "Claude code"

From Logic Wiki
Jump to: navigation, search
Line 48: Line 48:
 
Each MCP adds token to prompts. Use only necessary ones.  
 
Each MCP adds token to prompts. Use only necessary ones.  
  
 +
To see MCP servers
 +
/mcp
 +
to add or delete mcp servers
 +
claude mcp add ....
 +
claude mcp remove <SERVER_NAME>
 
=== Context 7 ===
 
=== Context 7 ===
 
It's a MCP which gets the latest versions and the documentation  
 
It's a MCP which gets the latest versions and the documentation  
Line 53: Line 58:
 
* Go to [https://context7.com https://context7.com] and sign in to start using it.  
 
* Go to [https://context7.com https://context7.com] and sign in to start using it.  
 
* Create and Save the API Key.  
 
* Create and Save the API Key.  
* Install it by checking the installation notes on the same page
+
* click '''install manually''' to go to [https://context7.com/docs/resources/all-clients#claude-code https://context7.com/docs/resources/all-clients#claude-code]
* npx ctx7@latest setup
+
* select server (Client didn't work for me)
* I selected '''CLI + Skills''' but it can be '''MCP Server''' as well
+
* replace API KEY with yours
 +
* exit and restart Claude

Revision as of 10:28, 14 April 2026


Course : Mosh Claude Code Course

Alternatives of Claude Code : CoPilot, Cursor, Windsurf

Installation

Choose the right installation for the OS from https://code.claude.com/docs

Using Claude Code

Upgrade to pro plan to use it in VS Code

Some commands

Open VS and open terminal inside of VS.

claude
/login 

to remember last session

claude --resume 
/terminal-setup

it installs Shift+enter to write multi line commands

Ctrl + L clear the command

To mention a file start the name with @ sign

commit 

it creates a git add and git commit with a meaningful commit message

/init Creates CLAUDE.md file

Plan Mode / Accept Edits On

Plan mode is to add a new feature. It plans the feature and waits for user to confirm it.

Shift + tab in claude prompt switches the modes.

Managing context window

to see the context usage

/context

Compacy / Clear the context

/compact
/clear

Tracking cost

/usage

Model Context Protocol (MCP)

it consist on two parts Client and Server like

Agent -> MCP Client -> MCP Server -> Github

Each MCP adds token to prompts. Use only necessary ones.

To see MCP servers

/mcp

to add or delete mcp servers

claude mcp add ....
claude mcp remove <SERVER_NAME>

Context 7

It's a MCP which gets the latest versions and the documentation