> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refile.co/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Integration (Claude, Cursor)

> Use refile with MCP (model context protocol)

MCP lets you use refile in the Claude desktop app or Cursor. We provide an MCP server for your convenience.

<Warning>
  This is a very early beta of MCP integration. The entire stack is highly
  experimental. It's also not compatible with self-hosted instances of refile as
  of now.
</Warning>

## Using the refile MCP server with Claude Desktop App

1. Open the Claude for Desktop app and navigate to app settings (Mac: `Cmd + ,`)

2. Under "Developer", click "Edit config", open the MCP config file in a text editor

3. In the config file, insert the command for the refile MCP server:

```json theme={null}
{
	"mcpServers": {
		"refile": {
			"command": "npx",
			"args": ["refile-mcp"],
			"env": {
				"REFILE_API_KEY": "YOUR_API_KEY"
			}
		}
	}
}
```

4. Restart the Claude app

You should now be ready to use refile in the Claude app! A tool icon should appear on the bottom right of the chat entry box.

## Using the refile MCP with Cursor

1. Naviagate to Cursor Settings from Command Palette

2. Select "MCP"

3. Click "Add a global MCP server" and "Create File"

4. Paste the refile MCP info into the mcp.json file

```json theme={null}
{
	"mcpServers": {
		"refile": {
			"command": "npx",
			"args": ["refile-mcp"],
			"env": {
				"REFILE_API_KEY": "YOUR_API_KEY"
			}
		}
	}
}
```

5. Check the MCP exists in Cursor settings and ask Cursor to create a PDF

That's it - you're done adding refile to Cursor via MCP.
