Run Claude Code with local MLX-powered models. Operations teams benefit from on-premises AI coding assistance. Connects to local MLX models via Python server, replacing cloud-based Anthropic services.
git clone https://github.com/chand1012/claude-code-mlx-proxy.gitThis skill enables Claude Code to use open-source models running locally on Apple Silicon Macs via MLX framework, eliminating the need to send code to Anthropic's cloud servers. The proxy server implements Claude's Messages API, supporting streaming responses, token counting, and compatibility with thousands of models from the MLX Community on Hugging Face, including Llama 3, GLM-4.5-Air, and DeepSeek. Setup involves running a local Python server and configuring Claude Code to point to it via the ANTHROPIC_BASE_URL environment variable. Development teams gain complete code privacy, offline capability, zero API costs, and full control over model parameters and generation settings.
[{"step":"Start the MLX model server","action":"Run `python -m mlx.serve --model mlx-community/code-llama-7b-instruct-4bit --port 8000` in your terminal to start the local model server.","tip":"Use a GPU-enabled machine for best performance. Monitor GPU memory usage with `nvidia-smi` if available."},{"step":"Configure claude-code-mlx-proxy","action":"Set the proxy endpoint in your environment: `export CLAUDE_CODE_MLX_PROXY=http://localhost:8000/v1` or configure in your IDE settings.","tip":"Test the connection with `curl http://localhost:8000/v1/models` to verify the server is responsive."},{"step":"Execute coding tasks","action":"Use standard claude-code commands (e.g., 'Write a function to...') but the proxy will route requests to your local MLX model.","tip":"For large codebases, pre-load relevant files into the context window to improve response quality."},{"step":"Review and save outputs","action":"Inspect the generated code, verify functionality, and save to your project directory. Use `git diff` to track changes.","tip":"Compare outputs with previous versions using `git diff HEAD~1 -- path/to/file.py` to ensure no regressions."},{"step":"Optimize performance","action":"Adjust model parameters (temperature, max_tokens) in your proxy configuration for faster inference or higher quality outputs.","tip":"For debugging, add `--verbose` flag to the proxy server to log model interactions."}]
Secure code completion for teams handling sensitive proprietary code
Offline AI-assisted coding on restricted networks without internet connectivity
Cost-free local model experimentation with thousands of open-source alternatives
Private pair programming with Claude Code on regulated systems requiring on-premises processing
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/chand1012/claude-code-mlx-proxyCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use claude-code-mlx-proxy to run [TASK] with the local MLX model. Execute the following steps: [STEP_1], [STEP_2], and [STEP_3]. Ensure the output is saved to [OUTPUT_PATH]. Verify the results match the expected behavior described in [REQUIREMENTS].
```python # claude-code-mlx-proxy execution log Starting MLX model server on localhost:8000... Connected to model: 'mlx-community/code-llama-7b-instruct-4bit' Task: Refactor legacy Python code for a financial analytics module Steps executed: 1. Parsed input file: /projects/legacy/financial_analytics.py 2. Identified 12 functions requiring modernization 3. Generated refactored code with type hints and error handling 4. Saved output to: /projects/refactored/financial_analytics_v2.py Verification results: - All 12 functions successfully refactored - Type hints added to 8 functions - Error handling implemented for 5 critical paths - Performance improved by 15% in benchmark tests - No breaking changes detected in unit tests MLX model inference time: 42.3 seconds Output file size: 18.7 KB ```
AI assistant built for thoughtful, nuanced conversation
Get more done every day with Microsoft Teams – powered by AI
Automate security compliance and monitor real-time security posture seamlessly.
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan