Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 12 additions & 39 deletions docs/remcp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,31 @@ sidebar_position: 0
```
curl -L remcp.recurse.ml | bash
```

📝 Next steps:
1. Make sure `$HOME/.local/bin` is in your `PATH`. Add to `~/.bashrc` or `~/.zshrc`:

```export PATH="$HOME/.local/bin:$PATH"```

2. Authenticate with GitHub:

```remcp auth```

3. Add to Claude Code:

```claude mcp add recurse --scope user -- remcp serve```


# Usage tips:

## Recurse prompt (recommended)

```
# In claude code
$ /recurse:review_code Please implement access control on web api endpoints
export PATH="$HOME/.local/bin:$PATH"
```
The prompt is automatically available once you install remcp, and claude will start using Recurse MCP for code changes.

## Configure claude code
2. Authenticate with GitHub:

```bash
remcp configure claude
```
This installs a SessionStart hook that automatically reminds Claude to use remcp. This is a global configuration for claude.


If you are not happy with the global setting, you can remove it using the following
```bash
remcp configure claude --remove
remcp auth
```

3. Choose your IDE and follow the installation instructions:

## Project level configuration (manual)
- [Install in Claude Code](./installation/install-claude-code)
- [Install in Cursor](./installation/install-cursor)

# Usage tips

To help your AI agent automatically use remcp, add instructions to your agent's rules file:

| MCP Client | Rules File Location |
|------------|---------------------|
| Claude Desktop/Code | `CLAUDE.md` |
| VSCode Copilot | `.github/copilot-instructions.md` |
| Cursor | `.cursorrules` or `.cursor/rules` |

**Add this line to your rules file:**
### Recurse prompt (recommended)

```
Use recurse MCP to verify your work while completing the following task. Before making any changes call init() on the project if not already done, once all changes are done call check() to get bug reports
# In claude code
$ /recurse:review_code Please implement access control on web api endpoints
```

The prompt is automatically available once you install remcp, and claude will start using Recurse MCP for analyzing code changes.
5 changes: 5 additions & 0 deletions docs/remcp/installation/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Installation",
"position": 1
}

31 changes: 31 additions & 0 deletions docs/remcp/installation/install-claude-code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
slug: install-claude-code
title: Install in Claude Code
sidebar_position: 1
---
# Install in Claude Code

## Step 1: Add MCP to claude


```
claude mcp add recurse --scope user -- remcp serve
```

## Step 2: Install hooks


```bash
remcp configure claude
```

This installs a SessionStart hook that automatically reminds Claude to use remcp. This is a global configuration for Claude.

## Removing the Configuration

If you are not happy with the hook, you can remove it using:

```bash
remcp configure --remove claude
```

74 changes: 74 additions & 0 deletions docs/remcp/installation/install-cursor.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
slug: install-cursor
title: Install in Cursor
sidebar_position: 2
---
# Install in Cursor

## Step 1: Configure remcp

Run the following command to configure remcp for Cursor:

```bash
remcp configure cursor
```

## Step 2: Add a User Rule

Add the following user rule in your Cursor settings:

![Cursor User Rule Example](/img/cursor-user-rules.png)
<details>
<summary>Click to expand: Cursor User Rule</summary>

```yaml
---
name: Verify Changes Using Recurse ML MCP

globs: "**/*.{js,ts,py,rs,go,java,rb,cs,tsx,jsx}"

alwaysApply: true

description: Use Recurse ML MCP to verify your work. Before making changes, call init() on the project if not already done. Once all changes are done, call check() to get bug reports.
---

# Verify Changes Using Recurse ML MCP

Use Recurse ML MCP to verify your work while completing tasks. Before making any changes, call `init()` on the project if not already done. Once all changes are done, call `check()` to get bug reports.

## Do

1. Call `mcp_recurse_init()` before making changes to initialize the project for analysis.
2. Call `mcp_recurse_check()` after completing your changes to get bug reports.
3. Investigate the bug reports and fix valid issues.
4. Use `mcp_recurse_ignore_issue()` if you're aware of an issue but choose not to address it.

## Don't

1. DON'T skip initialization - always call `init()` before starting work.
2. DON'T forget to call `check()` after completing changes.
3. DON'T ignore bug reports without investigating them first.

## MCP Usage

The Recurse ML MCP provides the following tools:

- `mcp_recurse_init(repo_path)`: Initialize a codebase for analysis. Sets up the project for continuous analysis by performing health checks, creating a project entry in the database, and starting the background worker (if not already running).

- `mcp_recurse_check(project_id)`: Check the status of the latest analysis and retrieve any issues found. This should be fast (<1s) as it just reads from the database. The tool might report that an analysis is pending, which means you need to call it again in some time until it says that the analysis either succeeded or errored out.

- `mcp_recurse_ignore_issue(issue_id)`: Indicate that you're aware of an issue but choose not to address it.

- `mcp_recurse_doctor()`: Run diagnostic checks to troubleshoot installation and configuration issues.

## Workflow

1. **Before making changes**: Call `mcp_recurse_init()` with the absolute path to the repository root.
2. **After completing changes**: Call `mcp_recurse_check()` with the project_id returned from init().
3. **If bugs are found**: Review the bug reports, verify whether they are valid, and fix them.
4. **If analysis is pending**: Wait a moment and call `check()` again until the analysis completes.
```

</details>


Binary file added static/img/cursor-user-rules.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.