MCP • Git Tools • Repo Intelligence • Prompt Caching • Workspace Automation
⭐ Star on GitHub ·
📘 Documentation ·
🐙 Source Code
Lynkr is an open-source Claude Code-compatible backend proxy that lets you run the Claude Code CLI and Claude-style tools directly against Databricks or Azure-hosted Anthropic models instead of the default Anthropic cloud.
It enables full repo-aware LLM workflows:
This makes Databricks a first-class environment for AI-assisted software development, LLM agents, automated refactoring, debugging, and ML/ETL workflow exploration.
/v1/messages)Emulates Anthropic’s backend so the Claude Code CLI works without modification.
Supports Databricks-hosted Claude Sonnet / Haiku models, or any LLM served from Databricks.
Route Claude Code requests into Azure’s /anthropic/v1/messages endpoint.
Connect to Azure OpenAI deployments (GPT-4o, etc.) with full tool calling support.
Access GPT-4o, Claude, Gemini, Llama, and more through a single unified API with full tool calling support.
Auto-discovers MCP manifests and exposes them as tools for smart workflows.
CLAUDE.md, Symbol Index, Cross-file analysisLynkr builds a repo index using SQLite + Tree-sitter for rich context.
Commit, push, diff, stage, generate release notes, etc.
Reuses identical prompts to reduce cost + latency.
Task tracker, file I/O, test runner, index rebuild, etc.
Tools can execute on the Claude Code CLI side instead of the server, enabling local file operations and commands.
Add custom tools, policies, or backend adapters.
Claude Code is exceptionally useful—but it only communicates with Anthropic’s hosted backend.
This means:
❌ You can’t point Claude Code at Databricks LLMs
❌ You can’t run Claude workflows locally, offline, or in secure contexts
❌ MCP tools must be managed manually
❌ You don’t control caching, policies, logs, or backend behavior
Lynkr is a Claude Code-compatible backend that sits between the CLI and your actual model provider.
Claude Code CLI
↓
Lynkr Proxy
↓
Databricks / Azure Anthropic / MCP / Tools
This enables:
Claude Code CLI
↓ (HTTP POST /v1/messages)
Lynkr Proxy (Node.js + Express)
↓
────────────────────────────────────────
│ Orchestrator (Agent Loop) │
│ ├─ Tool Execution Pipeline │
│ ├─ MCP Registry + Sandbox │
│ ├─ Prompt Cache (LRU + TTL) │
│ ├─ Session Store (SQLite) │
│ ├─ Repo Indexer (Tree-sitter) │
│ ├─ Policy Engine │
────────────────────────────────────────
↓
Databricks / Azure Anthropic / Other Providers
Key directories:
src/api → Claude-compatible API proxysrc/orchestrator → LLM agent runtime loopsrc/mcp → Model Context Protocol toolingsrc/tools → Git, diff, test, tasks, fs toolssrc/cache → prompt caching backendsrc/indexer → repo intelligencenpm install -g lynkr
lynkr start
brew tap vishalveerareddy123/lynkr
brew install vishalveerareddy123/lynkr/lynkr
git clone https://github.com/vishalveerareddy123/Lynkr.git
cd Lynkr
npm install
npm start
MODEL_PROVIDER=databricks
DATABRICKS_API_BASE=https://<workspace>.cloud.databricks.com
DATABRICKS_API_KEY=<personal-access-token>
DATABRICKS_ENDPOINT_PATH=/serving-endpoints/databricks-claude-sonnet-4-5/invocations
WORKSPACE_ROOT=/path/to/your/repo
PORT=8080
MODEL_PROVIDER=azure-anthropic
AZURE_ANTHROPIC_ENDPOINT=https://<resource>.services.ai.azure.com/anthropic/v1/messages
AZURE_ANTHROPIC_API_KEY=<api-key>
AZURE_ANTHROPIC_VERSION=2023-06-01
WORKSPACE_ROOT=/path/to/repo
PORT=8080
MODEL_PROVIDER=azure-openai
AZURE_OPENAI_ENDPOINT=https://<resource>.openai.azure.com
AZURE_OPENAI_API_KEY=<api-key>
AZURE_OPENAI_DEPLOYMENT=gpt-4o
PORT=8080
What is OpenRouter?
OpenRouter provides unified access to 100+ AI models (GPT-4o, Claude, Gemini, Llama, etc.) through a single API. Benefits:
Configuration:
MODEL_PROVIDER=openrouter
OPENROUTER_API_KEY=sk-or-v1-... # Get from https://openrouter.ai/keys
OPENROUTER_MODEL=openai/gpt-4o-mini # See https://openrouter.ai/models
OPENROUTER_ENDPOINT=https://openrouter.ai/api/v1/chat/completions
PORT=8080
WORKSPACE_ROOT=/path/to/your/repo
Popular Models:
openai/gpt-4o-mini – Fast, affordable ($0.15/$0.60 per 1M)anthropic/claude-3.5-sonnet – Claude’s best reasoninggoogle/gemini-pro-1.5 – Large context windowmeta-llama/llama-3.1-70b-instruct – Open-source LlamaSee https://openrouter.ai/models for complete list.
Getting Started:
export ANTHROPIC_BASE_URL=http://localhost:8080
export ANTHROPIC_API_KEY=dummy
Then:
claude chat
claude diff
claude review
claude apply
Everything routes through your Databricks or Azure model.
Lynkr uses Tree-sitter and SQLite to analyze your workspace:
It generates a structured CLAUDE.md so the model always has context.
Lynkr includes an LRU+TTL prompt cache.
Configure:
PROMPT_CACHE_ENABLED=true
PROMPT_CACHE_TTL_MS=300000
PROMPT_CACHE_MAX_ENTRIES=64
Lynkr automatically discovers MCP manifests from:
~/.claude/mcp
or directories defined via:
MCP_MANIFEST_DIRS
MCP tools become available inside the Claude Code environment, including:
Optional sandboxing uses Docker or OCI runtimes.
Lynkr includes a full suite of Git operations:
workspace_git_statusworkspace_git_diffworkspace_git_stageworkspace_git_commitworkspace_git_pushworkspace_git_pullPolicies:
POLICY_GIT_ALLOW_PUSHPOLICY_GIT_REQUIRE_TESTSPOLICY_GIT_TEST_COMMANDExample:
Disallow push unless tests pass? Set
POLICY_GIT_REQUIRE_TESTS=true.
Lynkr supports client-side tool execution, enabling tools to execute on the Claude Code CLI machine instead of the proxy server.
Enable passthrough mode:
export TOOL_EXECUTION_MODE=client
npm start
How it works:
tool_use blockstool_use blocks and executes locallytool_result blocks back in the next requestBenefits:
Use cases:
Configuration:
TOOL_EXECUTION_MODE=server – Tools run on proxy (default)TOOL_EXECUTION_MODE=client – Tools run on CLI sideTOOL_EXECUTION_MODE=passthrough – Alias for client modecurl http://localhost:8080/v1/messages \
-H 'Content-Type: application/json' \
-d '{
"model": "claude-proxy",
"messages": [{ "role": "user", "content": "Rebuild the index." }],
"tool_choice": {
"type": "function",
"function": { "name": "workspace_index_rebuild" }
}
}'
Lynkr’s agentic architecture is inspired by the Autonomous Cognitive Entity (ACE) Framework, specifically implementing the Reflector pattern to enable self-improving capabilities.
Reflector agent analyzes the transcript to extract “skills” and optimize future performance.The Reflector (src/agents/reflector.js) is an introspective component that analyzes:
This “working nature” allows Lynkr to not just execute commands, but to learn from interaction, continuously refining its internal heuristics for tool selection and planning.
TOOL_EXECUTION_MODE=client/passthrough) – Tools can execute on the Claude Code CLI side, enabling local file operations, commands, and access to local credentialstool_use block generationIf you use Databricks or Azure Anthropic and want rich Claude Code workflows, Lynkr gives you the control and extensibility you need.
Feel free to open issues, contribute tools, or integrate with MCP servers!