Skip to content

Connect your coding agent to Varar

This guide connects a coding agent to Varar in three parts, each optional:

  • Skills teach the agent how oaths behave and how to set Varar up.
  • The MCP server (varar mcp) gives it tools: list the steps, check the oaths for problems, rename a step and every sentence it matches, accept drift.
  • The language server reports drift, ambiguous matches and near misses on the oath the agent just edited.

The MCP server and the language server run through npx, so they need Node.js whatever language your project is in.

One plugin installs all three:

/plugin marketplace add varar-dev/varar
/plugin install varar@varar

Then ask Claude to set Varar up, or run /varar:varar-setup. Nothing else on this page is needed. In a codebase that already exists, follow up with /varar:varar-analyze: Claude interviews you about the rules the code is meant to follow and writes the first oaths from your answers.

The skills CLI installs them into most agents. -a names the agent (codex, opencode, cursor, gemini-cli, github-copilot, pi, …):

Terminal window
npx skills add varar-dev/varar --skill varar --skill varar-setup --skill varar-analyze -a codex

Add -g to install for your user rather than the project. Then ask the agent to set Varar up: the varar-setup skill takes it from there, and offers to do the next step for you. In a codebase that already exists, ask it to find the first oaths afterwards: the varar-analyze skill interviews you about the rules the code is meant to follow and writes oaths from your answers.

The server finds the project from --root, else its working directory. Where an agent doesn’t say which directory it starts servers in, pass the project’s absolute path with --root.

Codex — ~/.codex/config.toml, or .codex/config.toml in a trusted project:

[mcp_servers.varar]
command = "npx"
args = ["-y", "@varar/cli", "mcp", "--root", "/path/to/project"]

OpenCode — opencode.jsonc, which starts servers in the workspace:

{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"varar": { "type": "local", "command": ["npx", "-y", "@varar/cli", "mcp"] }
}
}
}

Cursor — .cursor/mcp.json:

{
"mcpServers": {
"varar": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@varar/cli", "mcp", "--root", "${workspaceFolder}"]
}
}
}

VS Code with GitHub Copilot — .vscode/mcp.json:

{
"servers": {
"varar": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@varar/cli", "mcp"],
"cwd": "${workspaceFolder}"
}
}
}

Gemini CLI — .gemini/settings.json:

{
"mcpServers": {
"varar": {
"command": "npx",
"args": ["-y", "@varar/cli", "mcp", "--root", "/path/to/project"]
}
}
}

Pi — .pi/mcp.json in a trusted project, or ~/.pi/agent/mcp.json:

{
"mcpServers": {
"varar": {
"command": "npx",
"args": ["-y", "@varar/cli", "mcp", "--root", "/path/to/project"]
}
}
}

The tools are described in the varar mcp reference.

Attach varar-lsp to Markdown files, beside any Markdown server you already use.

OpenCode — opencode.jsonc:

{
"lsp": {
"varar": {
"command": ["npx", "-y", "-p", "@varar/lsp", "varar-lsp", "--stdio"],
"extensions": [".md"]
}
}
}

In VS Code and Cursor, the Varar extension runs the language server. Codex has no language-server support; there, and in any agent that doesn’t document one, the diagnostics MCP tool reports the same problems on request. For Neovim, Helix and other editors, see Editor support.

Aider has no MCP or language-server support. Give it the skill as a read-only convention file, and let it run the CLI:

Terminal window
curl -o VARAR.md https://raw.githubusercontent.com/varar-dev/varar/main/agents/claude/varar/skills/varar/SKILL.md
aider --read VARAR.md

The skill tells it to rename steps with varar rename, never by hand.

The varar skill holds how Varar behaves; your project decides how oaths read. Put a ## Varar style section in AGENTS.md (or CLAUDE.md): who the oaths speak about, how sentences open, how tables and shared setup are used, and the command that runs the oaths. The skill defers to it on taste. See Wire Varar into your AI agent’s instructions for the working loop to put beside it.

Ask the agent, without naming any tool, to rename a step in one of your oaths. A connected agent previews the rename (plan_rename, or varar rename --dry-run) and lists every sentence it will rewrite, rather than editing the step definition by hand.