Skip to content
Open
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ irm https://raw.githubusercontent.com/dmtrKovalenko/fff.nvim/main/install-mcp.ps

The scripts live at [`install-mcp.sh`](./install-mcp.sh) and [`install-mcp.ps1`](./install-mcp.ps1) if you want to read them first.

> **Note**: If you hit GitHub API rate limiting (403 errors), set `GITHUB_TOKEN` with a [personal access token](https://github.com/settings/tokens) to get 5000 requests/hour instead of 60:
> ```bash
> export GITHUB_TOKEN=ghp_your_token_here
> curl -L https://dmtrkovalenko.dev/install-fff-mcp.sh | bash
> ```

It prints the exact wiring instructions for your client. Once the server is connected, ask the agent to "use fff" and it picks up the `ffgrep`, `fffind`, and `fff-multi-grep` tools.

### Recommended agent prompt
Expand Down
13 changes: 12 additions & 1 deletion install-mcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,18 @@ detect_platform() {
get_latest_release_tag() {
local target="$1"
local releases_json
releases_json=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases") \
local curl_args=(-fsSL)

# Use gh CLI token if available to avoid rate limiting
if command -v gh &>/dev/null; then
local gh_token
gh_token="$(gh auth token 2>/dev/null || true)"
if [ -n "$gh_token" ]; then
curl_args+=(-H "Authorization: token $gh_token")
fi
fi

releases_json=$(curl "${curl_args[@]}" "https://api.github.com/repos/${REPO}/releases") \
|| error "Failed to fetch releases from https://github.com/${REPO}/releases"

# Find the first release that contains an fff-mcp binary for our platform
Expand Down
Loading