Skip to content

Agentic AI Tools

Claude Code Setup Guide

Claude Code helps researchers manage files, run analyses, and automate repeatable project tasks from the terminal.

Intermediate · 45–60 min · Terminal access

Your research project lives in files. This agent lives in the terminal alongside them.

Overview

Claude Code is an agentic AI assistant that runs in your terminal. It helps researchers manage literature, analyze papers, draft sections, organize complex projects, and run project workflows through natural-language commands. Unlike traditional chat interfaces, it can read files, create folders, run analyses, and manage workflows.

Benefits for Research Memex:

  • File-aware AI: Reference papers with @filename syntax
  • Project memory: CLAUDE.md stores your research protocol
  • Custom commands: Create slash commands for repetitive tasks
  • MCP integration: Connect to Zotero, filesystems, web search
  • Autonomous execution: Plan and execute multi-step workflows
  • Version control: Built-in Git integration

Step 1: installation

1.1 prerequisites

System requirements:

  • A supported operating system; the native installer does not require Node.js
  • Terminal/command-line access
  • A paid Claude plan (Pro, Max, Team or Enterprise) or a Console account with an API key; the free Claude.ai plan does not include Claude Code

1.2 install Claude Code

Recommended native installer on macOS, Linux, or WSL:

curl -fsSL https://claude.ai/install.sh | bash

For Windows PowerShell or CMD, use the matching command in the setup docs. The optional npm installation requires Node.js 22 or newer:

npm install -g @anthropic-ai/claude-code

Verify installation:

claude --version

First launch:

cd ~/your-research-project
claude

1.3 alternative: VS Code extension

For users who prefer a graphical interface:

  1. Open VS Code.
  2. Install the Claude Code extension (opens in a new tab) from the marketplace.
  3. Follow the extension's sign-in flow for your Claude or Console account; a separate API key is not required for subscription sign-in.
  4. Access Claude Code from the sidebar.

Step 2: core concepts

2.1 what is CLAUDE.md?

Claude automatically reads CLAUDE.md at the start of every conversation. It acts as your project's memory or constitution.

What to put in CLAUDE.md:

  • Project overview and goals
  • File structure explanation
  • Research protocol or methodology
  • Custom commands you've created
  • Style guidelines (citation format, writing tone)
  • Important context Claude should always know

Example CLAUDE.md for a research project:

# Research Project: AI in Education

## Project Goal
Analyze the impact of AI tools on student learning outcomes through
literature synthesis and empirical analysis.

## File Structure
- /literature/ - Curated papers in markdown format
- /analysis/ - Data files and R scripts
- /drafts/ - Paper sections and outlines
- /exports/ - Final outputs (PDF, Word)

## Research Protocol
- Citation style: APA 7th Edition
- Inclusion criteria: Peer-reviewed, 2020-2025, empirical studies
- Analysis approach: Thematic synthesis

## Custom Commands
- /summarize: Create structured summary of a paper
- /compare: Compare methodologies across papers
- /synthesize: Identify themes across multiple papers

Official guide: CLAUDE.md Best Practices (opens in a new tab)

2.2 plan mode vs act mode

Plan Mode (default - recommended):

  • Claude shows you what it will do before it executes
  • You approve/reject each action
  • Useful for learning and complex operations
  • Toggle: Shift+Tab cycles permission modes on every platform. On Windows, Alt+M is the fallback when the terminal runtime does not enable VT input mode

Act Mode:

  • Claude executes immediately
  • Faster for trusted operations
  • Use for simple tasks (reading files, searches)

Warning

Stay in Plan Mode when working with research data. Preview operations before they modify your files.

2.3 file references with @ syntax

Add files to context:

"Summarize the key arguments in @/literature/smith2024.md"

"Compare the methodologies in @/literature/jones2024.md
and @/literature/lee2024.md"

"Analyze all papers in @/literature/ and identify common themes"

Folder references:

  • @/literature/ - Adds entire folder to context
  • @CLAUDE.md - Always available as project memory

Step 3: creating custom slash commands

3.1 what are slash commands?

Slash commands are reusable prompt templates you create once and run with /commandname. Use them for repetitive research tasks.

Examples for research:

  • /summarize - Structured paper summary
  • /compare - Compare two papers
  • /extract - Pull out specific information
  • /critique - Review writing for quality

3.2 create your first command

Step 1: create the commands folder

mkdir -p .claude/commands

Step 2: create a command file

Create .claude/commands/summarize.md:

Summarize the following paper in this exact structure:

Paper: $ARGUMENTS

## Summary Template
- **Research Question**: [What problem does it address?]
- **Methodology**: [How did they study it?]
- **Key Findings**: [What did they discover?]
- **Theoretical Contribution**: [What does it add to knowledge?]
- **Limitations**: [What are the gaps?]
- **Relevance**: [How does this relate to my research?]

Be specific and cite page numbers where relevant.

Step 3: use your command

claude  # Launch Claude Code

Then type:

/summarize @/literature/smith2024.md

Claude executes the template, replacing $ARGUMENTS with whatever follows the slash command so the command stays flexible and reusable.

3.3 useful research commands

Create .claude/commands/compare.md:

Compare these two papers systematically:

Papers: $ARGUMENTS

## Comparison Framework
1. **Research Questions**: How do they differ?
2. **Methodologies**: Qualitative vs quantitative? Samples?
3. **Findings**: Do they agree or contradict?
4. **Theories**: What frameworks do they use?
5. **Gaps**: What does each paper miss that the other addresses?

Present in a comparison table.

Create .claude/commands/gaps.md:

Analyze the following papers for research gaps:

Papers: $ARGUMENTS

## Gap Analysis
1. **Methodological Gaps**: What methods are missing?
2. **Theoretical Gaps**: What theories are underexplored?
3. **Empirical Gaps**: What contexts are understudied?
4. **Temporal Gaps**: What recent developments aren't covered?

For each gap, explain why it matters and what research it suggests.

Step 4: MCP servers for research

MCP (Model Context Protocol) servers add specialized tools to Claude Code.

4.1 essential MCP servers for research

Zotero MCP:

  • Search your Zotero library from terminal
  • Get paper metadata instantly
  • Installation: See Zotero Setup Guide

Filesystem MCP:

  • Already built-in to Claude Code
  • Navigate and search project files
  • Create and modify documents

Sequential Thinking MCP:

  • Step-by-step reasoning for complex analysis
  • Useful for theoretical arguments
  • Install: Sequential Thinking setup. The current npm server needs Node.js 24+, separately from Claude Code's native installer.

Web Search MCP:

  • Real-time literature discovery
  • Verify recent developments
  • Fact-checking and citation validation

4.2 installing MCP servers

Via Smithery:

  1. Visit smithery.ai (opens in a new tab).
  2. Search for the MCP server you want.
  3. Click Install.
  4. Follow the guided setup.
  5. Restart Claude Code.

Manual configuration: Project-scoped servers live in .mcp.json; local and user-scoped servers live in ~/.claude.json. Prefer claude mcp add --scope project or --scope user to register a server, and check the MCP scope documentation (opens in a new tab) before sharing configuration. For end-to-end installation guidance, see the MCP Explorer Guide.

Step 5: project structure for research

General research project:

/Your-Research-Project/
├── CLAUDE.md                 # Project memory
├── .claude/
│   └── commands/             # Custom slash commands
├── literature/               # Curated papers (markdown)
├── analysis/                 # Data, scripts, results
├── notes/                    # Research notes, synthesis
├── drafts/                   # Paper sections
└── exports/                  # Final outputs

5.2 setting up a new project

Option 1: ask Claude to do it

Create a research project structure with folders for literature,
analysis, notes, drafts, and exports. Then create a CLAUDE.md file
documenting this project structure.

Option 2: manual setup

mkdir -p literature analysis notes drafts exports .claude/commands
touch CLAUDE.md
claude

Step 6: common research workflows

6.1 literature analysis

Analyze a single paper:

Read @/literature/smith2024.md and create a structured summary
following the format in CLAUDE.md

Compare multiple papers:

Compare the methodologies in @/literature/smith2024.md,
@/literature/jones2024.md, and @/literature/lee2024.md.
Create a comparison table.

Find themes across corpus:

Analyze all papers in @/literature/ and identify the 3 most
common themes. For each theme, list which papers discuss it
and how their perspectives differ.

6.2 data management

Organize files:

Review all files in @/literature/ and organize them into
subfolders by research method (qualitative, quantitative, mixed-methods)

Create synthesis tables:

Extract the following from each paper in @/literature/:
author, year, method, sample size, key finding.
Create a CSV table with this data.

6.3 drafting and writing

Generate section outlines:

Based on the papers in @/literature/, create an outline for
a literature review section covering theoretical frameworks.

Draft from synthesis:

Using the synthesis notes in @/notes/themes.md, draft a
2-page literature review section in academic style (APA 7th).

Step 7: keyboard shortcuts & navigation

7.1 essential shortcuts

Anthropic's interactive mode documentation (opens in a new tab) is the authority for this table. Shortcuts can change between releases.

ShortcutAction
Shift+TabCycle permission modes (default, accept edits, plan)
Alt+MCycle permission modes on Windows when the runtime does not enable VT input mode
EscInterrupt Claude, or close a dialog
Esc EscClear the input draft, or open the rewind menu (double-tap)
Ctrl+CInterrupt the current operation, or clear the input
Ctrl+DExit Claude Code (when the input is empty)
Ctrl+RSearch command history

7.2 command history

Press Up at the prompt to step back through previous commands, or Ctrl+R to search them:

  • Modify and re-run analyses
  • Fix typos without retyping
  • Compare different approaches quickly

Step 8: learning resources

Step 9: integration with Research Memex

9.1 connect to Zotero

Set up Zotero MCP:

  1. Follow the Zotero Setup Guide.
  2. Install the Zotero MCP server.
  3. Start a new Claude Code session, or restart Claude Code if it was already open, then run /mcp and confirm zotero is connected.

In Claude Code, search your library with natural language. Example: "Search my Zotero for papers on AI in education"

9.2 export papers for analysis

From Zotero to Claude Code:

  1. Export papers from Zotero as markdown (via OCR)
  2. Save to /literature/ folder
  3. Reference with @/literature/author2024.md
  4. Claude can now analyze the full text.

See: OCR PDF Conversion Guide

9.3 workflow with Obsidian

Obsidian for synthesis, Claude Code for execution:

  1. Use Obsidian for literature notes
  2. Export synthesis to markdown
  3. Move to Claude Code project folder
  4. Claude Code automates analysis and drafting

Step 10: example research workflows

10.1 general literature analysis

Create CLAUDE.md:

# Literature Analysis Project

## Goal
Analyze papers on [TOPIC] to identify themes, methodologies, and gaps.

## File Structure
- /literature/ - Papers in markdown format
- /synthesis/ - Theme notes and comparisons
- /outputs/ - Final analysis documents

## Analysis Protocol
- Extract: Research question, method, key findings
- Compare: Methodologies and theoretical frameworks
- Synthesize: Common themes and research gaps

Custom command .claude/commands/analyze.md:

Analyze this paper:

Paper: $ARGUMENTS

Extract:
1. Research question and objectives
2. Methodology (qualitative/quantitative/mixed)
3. Sample and data collection
4. Key findings (3-5 bullet points)
5. Theoretical contribution
6. Limitations and future research

Format as markdown table for easy compilation.

10.2 multi-paper comparison

Workflow:

1. /analyze @/literature/paper1.md
2. /analyze @/literature/paper2.md
3. /analyze @/literature/paper3.md

Then: "Create a comparison table of the three analyses above,
focusing on methodological differences."

10.3 theory building

Use Sequential Thinking MCP:

Using Sequential Thinking, analyze the papers in @/literature/
and propose a novel theoretical framework that integrates their
key findings. Work step-by-step through:
1. Identifying core constructs
2. Mapping relationships
3. Proposing mechanisms
4. Identifying testable propositions

Step 11: advanced features

11.1 parallel agents

Run multiple analyses simultaneously:

"Ask 3 agents to independently analyze @/literature/smith2024.md:
- Agent 1: Focus on methodology quality
- Agent 2: Focus on theoretical contribution
- Agent 3: Focus on practical implications

Compare their assessments."

11.2 git integration

Built-in version control:

"Create a Git commit for the changes we just made with
message: 'Add literature analysis for Smith 2024'"

"Show me the diff of changes since yesterday"

"Create a new branch for the theory-building section"

11.3 task tracking with TodoWrite

Claude Code has built-in task management:

"Create a todo list for analyzing these 10 papers:
- Read and summarize each
- Extract methodologies
- Identify common themes
- Map theoretical frameworks
- Draft synthesis section"

Claude creates a checklist and tracks progress.

Step 12: troubleshooting

Installation issues

"npm command not found"

  • Use the native installer above, which does not need npm.
  • If you specifically need the npm route, install a supported Node.js version and open a new terminal.

"Permission denied"

CLAUDE.md not loading

  • Verify filename is exactly CLAUDE.md (case-sensitive)
  • Must be in project root directory
  • Restart Claude Code: exit then claude

Slash commands not working

  • Check folder exists: .claude/commands/
  • Verify file naming: commandname.md (no slashes)
  • Restart Claude Code after creating commands
  • Test with: /help (built-in command)

File references failing

  • Use absolute paths from project root: @/literature/file.md
  • Check filename spelling and case
  • Verify file exists: ls literature/

Step 13: best practices for research

13.1 project organization

DRY Principle (Don't Repeat Yourself):

  • Create slash commands for repetitive tasks
  • Document protocols in CLAUDE.md once
  • Reuse across multiple papers/projects

Version Everything:

  • Use Git for tracking changes
  • Commit after major analyses
  • Branch for experimental approaches

13.2 quality control

Always verify AI outputs:

  • Check citations against your Zotero library
  • Validate statistical claims
  • Review for coherence and logic
  • See: Failure Museum

Use Plan Mode for:

  • File modifications
  • Data extraction
  • Writing operations
  • Complex multi-step tasks

13.3 ethical guidelines

Transparency:

  • Document work with AI in CLAUDE.md
  • Track which tasks were AI-assisted
  • Maintain audit trail of prompts used

Verification:

  • Never trust AI-generated citations blindly
  • Verify every factual claim
  • Check for hallucinations and errors

Step 14: advanced use cases

14.1 for systematic literature reviews

See the Claude Code SLR Workflow for a complete SLR workflow covering screening, extraction, and PRISMA reporting.

14.2 for qualitative analysis

Coding transcripts:

/code "Analyze @/data/interview1.md using thematic analysis.
Identify codes, group into themes, provide exemplar quotes."

14.3 for theory development

Build conceptual frameworks:

"Using Sequential Thinking MCP, develop a theoretical model
that integrates findings from @/synthesis/themes.md.
Work through: constructs → relationships → propositions → testable hypotheses."

Checklist

By the end of this guide, you should have:

  • Installed Claude Code (terminal or VS Code)
  • Created a research project folder
  • Written a CLAUDE.md file with project context
  • Created at least one custom slash command
  • Tested file references with @ syntax
  • Understood Plan vs Act mode
  • Installed at least one MCP server (Zotero or Sequential Thinking)
  • Watched at least one tutorial video
  • Tested a basic analysis workflow

What's next

Next, see the Claude Code SLR Workflow for a complete walkthrough of screening, extraction, and synthesis with Claude Code.

External references

cite this page

Lin, X. (2026). Claude Code Setup Guide. Research Memex. https://research-memex.org/docs/implementation/agentic-ai-tools/claude-code-setup-guide

@misc{docs-implementation-agentic-ai-tools-claude-code-setup-guide-2026,
  author = {Xule Lin},
  title = {Claude Code Setup Guide},
  year = {2026},
  howpublished = {\url{https://research-memex.org/docs/implementation/agentic-ai-tools/claude-code-setup-guide}},
  note = {ORCID: 0000-0001-7885-4194}
}

one renderingthe source remains