Skip to content

AI Tools Setup — Connect vfs to Cursor, Claude Code, Windsurf & More

Setting up vfs requires two steps:

  1. Connect vfs — configure MCP or make the CLI available so the agent can call vfs.
  2. Add an agent rule — tell the agent it should call vfs before grep.

This page covers Step 1. See Agent Rules for Step 2.


MethodHow it worksBest for
MCP (recommended)Agent calls vfs tools directly via MCP protocolEditors with MCP support (most modern AI editors)
CLIAgent runs vfs as a shell commandTerminal-based tools, scripts, tools without MCP

MCP lets the AI agent call vfs tools (search, extract, list_languages) directly without shell access. This works even in sandboxed environments where the agent can’t run arbitrary binaries.

MCP ToolDescriptionParameters
searchFind signatures matching a patternpaths (string[]), pattern (string)
extractReturn all exported signaturespaths (string[])
list_languagesSupported languages and extensionsnone

Most tools use the same stdio JSON config. The only difference is where the file lives:

ToolMCP config location
Cursor.cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Claude Code.mcp.json (project) or claude mcp add vfs -- vfs mcp
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
AntigravityMCP settings panel, or project MCP config
Windsurf.windsurf/mcp.json (project) or global via Windsurf settings
ClineMCP config in VS Code Cline extension settings
Continue.continue/config.json under experimental.modelContextProtocolServers
Zed~/.config/zed/settings.json under context_servers

Stdio config (Cursor, Claude Code, Claude Desktop, Antigravity, Windsurf, Cline):

{
"mcpServers": {
"vfs": {
"command": "vfs",
"args": ["mcp"]
}
}
}

Continue uses a different structure:

{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "vfs",
"args": ["mcp"]
}
}
]
}
}

Zed uses a different structure:

{
"context_servers": {
"vfs": {
"command": {
"path": "vfs",
"args": ["mcp"]
}
}
}
}

HTTP config (for Docker, remote setups, or any tool that supports HTTP-based MCP):

Terminal window
vfs up # starts MCP on :8080 and dashboard on :3000
vfs up --port 9090 # starts MCP on :9090 and dashboard on :3000
{
"mcpServers": {
"vfs": {
"url": "http://localhost:8080/mcp"
}
}
}

If using a custom port, update the URL accordingly (e.g. http://localhost:9090/mcp).

For tools that don’t support MCP (Aider, custom scripts, CI), use vfs as a shell command:

Terminal window
vfs . -f CreateUser
# Output: internal/services/user.go:42: func CreateUser(name string, email string) (*User, error)
vfs . -f handler | head -20
LOCATION=$(vfs . -f CreateUser | head -1)
FILE=$(echo "$LOCATION" | cut -d: -f1)
LINE=$(echo "$LOCATION" | cut -d: -f2)
echo "Found at $FILE line $LINE"

Most tools use the same stdio JSON config. The only difference is where the file lives:

ToolMCP config location
Cursor.cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Claude Code.mcp.json (project) or claude mcp add vfs -- vfs mcp
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
AntigravityMCP settings panel, or project MCP config
Windsurf.windsurf/mcp.json (project) or global via Windsurf settings
ClineMCP config in VS Code Cline extension settings
Continue.continue/config.json under experimental.modelContextProtocolServers
Zed~/.config/zed/settings.json under context_servers

Works for Cursor, Claude Code, Claude Desktop, Antigravity, Windsurf, and Cline:

{
"mcpServers": {
"vfs": {
"command": "vfs",
"args": ["mcp"]
}
}
}

Continue uses a different structure:

{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "vfs",
"args": ["mcp"]
}
}
]
}
}
{
"context_servers": {
"vfs": {
"command": {
"path": "vfs",
"args": ["mcp"]
}
}
}
}

For Docker, remote setups, or any tool that supports HTTP-based MCP:

Terminal window
vfs up # starts MCP on :8080 and dashboard on :3000
{
"mcpServers": {
"vfs": {
"url": "http://localhost:8080/mcp"
}
}
}

The CLI works in any environment with shell access — terminal-based tools like Aider, Claude Code, Antigravity, or custom scripts.


Connecting vfs is only half the setup. You must also tell the agent to use it. See Agent Rules for the required rule file.