← Discover MCPs and Agents
b
MCPAI & MLGitHub

border-code

An free open-source on-device coding agent that runs entirely in your terminal.

Links

README

From the repo.

Border Code

An open-source on-device coding agent that runs entirely in your terminal. Preview

Features

  • AI-powered coding assistant — automated code writing, editing, and research
  • Dual modes: PLAN (read-only analysis) and BUILD (full read/write/execute)
  • Multi-step tool agent — uses ToolLoopAgent to autonomously read, write, edit files and run commands until the task is done (up to 25 steps)
  • Multiple LLM providers: OpenAI, Anthropic (Claude), Google Gemini, OpenRouter, Groq, Mistral
  • 7 local tools: readFile, listDirectory, glob, grep, writeFile, editFile, bash — all sandboxed to your project directory
  • Persistent sessions — conversation history stored locally via SQLite (Drizzle ORM)
  • 31 themes — Nightfox, Catppuccin, Dracula, Tokyo Night, Nord, and many more
  • Terminal UI — built with OpenTUI with mouse support, scrollable messages, dialogs, and toast notifications
  • Theme persistence — saved to ~/.border-code/preferences.json
  • Command paletteShift+Tab to open quick actions

Upcoming

  • Remote control — manage Border Code from your phone or tablet via a web API
  • Web session — expose the agent interface as a web app for browser-based use

Install

Quick Start (from source)

Prerequisites

  • Bun 1.x or later

Setup

# Clone and install
git clone https://github.com/r2hu1/border-code
cd border-code
bun install

# Run the CLI
bun run dev:cli

Configure an LLM Provider

  1. Open the command palette (Shift+Tab)
  2. Select LLM Providers
  3. Choose a provider (e.g. OpenAI, Anthropic)
  4. Enter your API key
  5. Choose a model

Usage

KeyAction
TabToggle mode (PLAN / BUILD)
Shift+TabOpen command palette
EnterSubmit prompt
Shift+EnterNew line
/ (at start)Open command palette
EscClose dialog / interrupt
MouseClick items, scroll messages

Modes

PLAN — the agent can only read files and search the codebase. Use this to ask questions, review code, or plan changes.

BUILD — the agent gets full read/write/execute access. It can edit files, create new ones, and run shell commands.

Project Structure

border-code/
├── packages/
│   ├── cli/              # Terminal UI app (OpenTUI + React)
│   ├── core/api/         # Core engine (AI, DB, config, tools)
│   └── shared/           # Shared types and schemas
├── local.db              # SQLite database (gitignored)
└── assets/               # Screenshots

Themes

Browse and select themes via the command palette. All 31 themes are defined in packages/cli/src/themes/presets.ts and include: Nightfox (default), Catppuccin Mocha, Dracula, Monokai Pro, Tokyo Night, Nord, Synthwave, One Dark, Gruvbox Dark, Rose Pine, Kanagawa, GitHub Dark, and more.

Scripts

bun run dev:cli       # Run in watch mode with hot-reload
bun run format        # Format code with Biome
bun run lint          # Lint code with Biome
bun run db:generate   # Generate Drizzle migrations
bun run db:migrate    # Apply migrations
bun run db:push       # Push schema changes

Contributing

Contributions are welcome! Open an issue or submit a pull request.

  • Code is formatted with Biome (tabs, double quotes).
  • The codebase uses TypeScript throughout.
  • UI components use OpenTUI's React JSX (import @opentui/react).

License

MIT

Collected info

  • 1 stars
  • Language: TypeScript
  • Source updated: 7/27/2026

Config for your environment

Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). No API key — you connect directly.

Tool

OS

Config file: ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server": {
      "url": "{MCP_ENDPOINT_URL}"
    }
  }
}

Paste into mcpServers in the config file. Restart Cursor after saving.

If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.