A personal MCP server that bundles filesystem operations, web search, shell execution, system monitoring, Context7 documentation lookup, and Compound Engineering workflow prompts into a single service.
Designed to run as a persistent HTTP service on your Mac, accessible locally and from any machine on your Tailscale network. Connects to llama-server WebUI, llama-agent CLI, or any MCP-compatible client.
| Category | Tool | Description |
|---|---|---|
| Filesystem | read_file |
Read file contents |
write_file |
Create or overwrite a file | |
edit_file |
Search-and-replace within a file | |
list_directory |
List directory contents | |
create_directory |
Create directories recursively | |
move_file |
Move or rename files/directories | |
search_files |
Grep-style recursive content search | |
get_file_info |
File metadata (size, modified, permissions) | |
| Web | web_search |
DuckDuckGo search (no API key needed) |
fetch_url |
Fetch a URL, return cleaned text | |
| Shell | shell_exec |
Execute shell commands (with safety blocks) |
system_info |
OS, CPU, memory, disk, uptime | |
list_processes |
Running processes, filterable by name | |
| Docs | resolve_library_id |
Find Context7 library ID for a package |
get_library_docs |
Fetch up-to-date docs for a library | |
| Clipboard | clipboard |
Read/write macOS system clipboard |
| Prompt | Description |
|---|---|
plan |
Turn a feature description into a structured implementation plan |
review |
Multi-pass code review (scope, correctness, security, performance) |
compound |
Capture knowledge from a solved problem for future reuse |
- Bun (v1.0+)
- Node.js 18+ (for npx-based tools if needed)
cd ~/Projects/local-agent-mcp
bun installcp .env.example .env
# Edit .env — at minimum, generate an auth token:
echo "MCP_AUTH_TOKEN=$(openssl rand -hex 32)" >> .envbun run start:http
# Server at http://0.0.0.0:8808/mcpbun run start
# Communicates over stdin/stdout-
Start llama-server with the MCP proxy flag:
llama-server -m your-model.gguf --webui-mcp-proxy
-
Start the MCP server in HTTP mode:
bun run start:http
-
In the WebUI, go to Settings → MCP → Add New Server:
- URL:
http://localhost:8808/mcp(local) orhttp://<your-mac>.tailnet-name.ts.net:8808/mcp(Tailscale) - Enable Use llama-server proxy
- If auth is enabled, add header:
Authorization: Bearer <your-token>
- URL:
Copy or symlink the mcp.json to your working directory or ~/.config/llama-agent/mcp.json:
cp mcp.json ~/.config/llama-agent/mcp.jsonThe CLI uses stdio transport, so no auth token is needed.
When running in HTTP mode, the server listens on 0.0.0.0:8808 by default, making it accessible from any machine on your Tailscale network:
http://<your-mac>.tailnet-name.ts.net:8808/mcp
The Bearer token in MCP_AUTH_TOKEN authenticates all requests. Tailscale handles encryption.
curl http://<your-mac>.tailnet-name.ts.net:8808/health
# {"status":"ok","server":"local-agent-mcp"}Install the launchd plist to start the server on boot:
# Copy the plist
cp com.local-agent-mcp.plist ~/Library/LaunchAgents/
# Load (start)
launchctl load ~/Library/LaunchAgents/com.local-agent-mcp.plist
# Check status
launchctl list | grep local-agent-mcp
# View logs
tail -f ~/Library/Logs/local-agent-mcp.stderr.log
# Unload (stop)
launchctl unload ~/Library/LaunchAgents/com.local-agent-mcp.plistThe service reads .env from the project directory automatically (Bun auto-loads .env files).
All configuration is via environment variables (set in .env or export directly):
| Variable | Default | Description |
|---|---|---|
MCP_AUTH_TOKEN |
(none) | Bearer token for HTTP auth. Required for production. |
ALLOWED_DIRS |
$HOME |
Comma-separated directories the filesystem tools can access |
CONTEXT7_API_KEY |
(none) | Optional Context7 API key for higher rate limits |
HOST |
0.0.0.0 |
HTTP bind address |
PORT |
8808 |
HTTP port |
ENABLE_SHELL_EXEC |
true |
Set to false to disable the shell_exec tool entirely |
CORS_ORIGIN |
* |
Allowed CORS origin. Defaults to * which is required for llama-server WebUI. The Bearer token is the security boundary. |
- Authentication: All HTTP requests require a Bearer token via the
MCP_AUTH_TOKENenv var. The comparison usescrypto.timingSafeEqualto prevent timing attacks. - Filesystem sandbox: All file operations are restricted to
ALLOWED_DIRS. Symlinks are resolved viarealpathto prevent traversal. - SSRF protection:
fetch_urlblocks requests to private/loopback/link-local IPs and non-http(s) schemes. DNS resolution is checked before fetching. - Shell execution:
shell_exechas a best-effort blocklist for destructive commands, but it is not a security boundary. Disable it withENABLE_SHELL_EXEC=falseif you don't need it. - Process listing:
list_processesfilters in TypeScript (no shell interpolation) to prevent injection. - Fetch timeouts: All outbound HTTP requests have a 15-second timeout via
AbortController.
Each tool category is a separate file in src/tools/. To add new capabilities:
- Create
src/tools/your-feature.ts - Export a
registerYourFeatureTools(server: McpServer)function - Import and call it in
src/server.ts
Potential additions:
- Git operations (status, pull, commit, diff)
- Docker management (list, start, stop containers)
- Home Assistant integration
- Obsidian/notes search
- Tailscale management
MIT