# flowR MCP server

> Enables AI clients to perform static dataflow analysis, program slicing, linting, and dependency extraction for R code.

- Repository: https://github.com/flowr-analysis/flowr
- Page: https://hostedmcp.org/servers/flowr-analysis/flowr
- Transport: stdio
- Stars: 108
- License: GPL-3.0
- Latest version: 0.1.4

## Install

### Claude Code

```sh
claude mcp add flowr -- npx -y @eagleoutice/flowr-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "flowr": {
      "command": "npx",
      "args": [
        "-y",
        "@eagleoutice/flowr-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "flowr": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@eagleoutice/flowr-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"flowr","type":"stdio","command":"npx","args":["-y","@eagleoutice/flowr-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "flowr": {
      "command": "npx",
      "args": [
        "-y",
        "@eagleoutice/flowr-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add flowr -- npx -y @eagleoutice/flowr-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.flowr]
command = "npx"
args = ["-y", "@eagleoutice/flowr-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user flowr npx -- -y @eagleoutice/flowr-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "flowr": {
      "command": "npx",
      "args": [
        "-y",
        "@eagleoutice/flowr-mcp"
      ]
    }
  }
}
```

## Tools (1)

- `query`: Statically analyze R code and search R package signatures with flowR queries (https://github.com/flowr-analysis/flowr/wiki/Query-API). Common ones: {"type":"static-slice","criteria":["12@x"]} for the code affecting x in line 12, {"type":"linter"} for lint findings, {"type":"dependencies"} for loaded libraries, read and written files, {"type":"guess-dep-versions"} for the package versions the code works with, {"type":"call-context","callName":"^read_"} for calls, and, needing no code, {"type":"signature","package":"dplyr","function":"across"} to search signatures and versions (globs allowed), {"type":"function-info","name":"filter"} for the packages exporting a function. A query with wrong arguments is answered with its schema. Types: call-context (Call-Context Query), config (Config Query), control-flow (Control-Flow Query), call-graph (Call-Graph Query), dataflow (Dataflow Query), does-call (Does-Call Query), dataflow-lens (Dataflow Lens Query), absint (Abstract Interpretation Query), files (Files Query), id-map (Id-Map Query), normalized-ast (Normalized AST Query), dataflow-cluster (Dataflow Cluster Query), static-slice (Static Slice Query), provenance (Provenance Query), input-sources (Input Sources Query), dependencies (Dependencies Query), location-map (Location Map Query), search (Search Query), happens-before (Happens-Before Query), inspect-exception (Inspect Exceptions of Functions Query), inspect-higher-order (Inspect Higher-Order Functions Query), inspect-recursion (Inspect Recursive Functions Query), inspect-fn-props (Inspect Argument Roles Query), resolve-value (Resolve Value Query), project (Project Query), signature (Signature Query), origin (Origin Query), linter (Linter Query), dice (Dice Query), guess-dep-versions (Guess Dependency Versions Query), function-info (Function Info Query) (read-only)

## FAQ

### Do I need to have R installed to use this server?

No, an R installation is not required to use the server.

### Does the server run the R code being analyzed?

No, the server performs static analysis and never executes the analyzed code.

### Does the server require an internet connection?

It requires an initial download of a signature database, but most features work offline.
