# Castor [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/ApatheticMioz/Castor  
**GitHub Stars:** 15  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/castor

## Description
The local LLM solution to cutting cloud API bills, smartly.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "castor": {
    "command": "npx",
    "args": ["-y","mcp-castor"]
  }
}
```

## Documentation

## What Castor does

Castor separates planning from repository operations for coding agents. A cloud model can continue to handle architecture and reasoning, while Castor sends routine work to a model on the developer's own GPU. That work includes reading files, searching with grep, editing files, running tests, and processing command output.

Instead of forwarding every raw file dump, terminal log, and repeated context block to the cloud model, Castor returns a shorter result after local execution. This is intended to reduce token consumption and keep the cloud context focused on decisions rather than mechanical operations.

## How it works

Castor connects MCP clients to an OpenAI-compatible local inference endpoint. Engines running through vLLM, llama.cpp, LM Studio, SGLang, Ollama, or another compatible `/v1` API can provide the local model. An engine at `127.0.0.1:18020` is discovered automatically; another endpoint can be selected with `CASTOR_BASE_URL`.

The implementation is written in Rust. Tool calls run in-process, and longer operations can return a wait hook so the cloud agent can pause until the task completes. A token-budgeted scheduler limits concurrent work against available VRAM, while a stream guard stops runaway output loops.

## Setup and configuration

The npm package can install Castor and register it with detected MCP clients:

```bash
npx -y mcp-castor install --client all
```

For an engine on a different endpoint, set the base URL before starting the client:

```bash
export CASTOR_BASE_URL="http://127.0.0.1:1234/v1"
```

The project also documents manual MCP configuration, engine profiles, and serving-engine-specific setup for llama.cpp. After installation and engine configuration, the coding agent can invoke Castor during normal work.

## Tools and capabilities

- Read files locally for coding tasks
- Search repositories with grep
- Edit files through the local execution path
- Run tests and return verified results
- Process terminal output without sending every raw log to the cloud
- Enforce workspace containment and block path escapes, symlink tricks, and destructive shell commands
- Reject oversized prompts before execution
- Report usage through `castor stats`

## Limitations and notes

Castor depends on a locally available model endpoint that implements the OpenAI-compatible API. The cloud model is still used for planning and architecture; Castor is intended to offload execution-oriented work rather than replace that model. The project is licensed under AGPL-3.0, and commercial dual licensing is available for proprietary embedding. Network-deployed modifications must publish their source under the stated license terms.

_Full upstream README: https://allmcps.com/mcp/castor/readme_

