If You Installed Claude Code and Only Chat With It — You’re Missing the Point
Source: Dev.to
You installed Claude Code, typed claude, and a chat opened. If you only use it to fix bugs or write tests, you’re tapping into roughly 20 % of its potential. The real power lies in three configuration files—CLAUDE.md, Hooks settings, and MCP server connections. Setting these up transforms the experience.
Claude Code forgets everything when a session ends, so preferences like “always use the -v flag with pytest” disappear. A CLAUDE.md file in your project root preserves such rules automatically when a session starts.
Project Guide
Dev Rules
- Always run tests with
pytest tests/ -v - Create backups before any DB operations
- Commit messages use
feat/,fix/,docs/prefixes
Tech Stack
- Backend: Python 3.11, FastAPI, PostgreSQL
- Frontend: Next.js 14 App Router
Hooks
Hooks let you run shell commands at specific lifecycle points.
Post‑tool‑use Hook (auto‑format TypeScript files)
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "jq -r '.tool_input.file_path' | { read f; if echo \"$f\" | grep -qE '\\.(ts|tsx)$'; then npx prettier --write \"$f\" 2>/dev/null; fi; }"
}
]
}
]
}
}
Pre‑tool‑use Hook (block edits to .env files)
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "python3 -c \"import json,sys; d=json.load(sys.stdin); p=d.get('tool_input',{}).get('file_path',''); sys.exit(2 if '.env' in p else 0)\""
}
]
}
]
}
}
MCP Integrations
Use claude mcp add to connect external services.
-s user→ global tools-s project→ project‑specific tools
GitHub
claude mcp add github -s user \
-e GITHUB_PERSONAL_ACCESS_TOKEN=your-token \
-- npx -y @modelcontextprotocol/server-github
Context7
claude mcp add context7 -s user -- npx -y @upstash/context7-mcp@latest
Playwright
claude mcp add playwright -s project -- npx -y @playwright/mcp@latest
PostgreSQL
claude mcp add postgres -s project \
-e DATABASE_URL="postgresql://user:pass@localhost:5432/mydb" \
-- npx -y @modelcontextprotocol/server-postgres
CLAUDE.mdteaches persistent rules.- Hooks enforce quality checks and formatting.
- MCP extends Claude Code’s capabilities.
A half‑hour setup pays off every day—Claude Code’s true strength isn’t just in conversation, but in the configuration that powers it.