Nativelink MCP Server
OfficialGenerates optimized Bazel configurations, analyzes Bazel build profiles and metrics with optimization recommendations, and sets up automatic Bazel builds/tests with Nativelink caching.
Generates Docker deployment configurations for self-hosted Nativelink via the generate-deployment-config tool.
Generates Kubernetes deployment configurations for Nativelink, including autoscaling, monitoring, and high-availability options.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Nativelink MCP Server Generate an optimized Bazel config for my Rust project with remote cache."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Nativelink MCP Server
MCP (Model Context Protocol) server for Nativelink Cloud - High-performance cloud build cache and remote execution system that accelerates Bazel builds. Sign up at app.nativelink.com to get your personalized configuration.
Features
π Generate optimized Bazel configurations using Nativelink Cloud endpoints
π Access Nativelink Cloud setup and migration guides directly in your AI assistant
π Analyze build performance with AI-powered recommendations
π Set up automatic builds and tests with file watchers and Nativelink caching
ποΈ Generate deployment configurations for self-hosted Nativelink instances
π Integration with app.nativelink.com for personalized configurations
π‘ Smart recommendations based on your project's specific needs
Related MCP server: Databricks Code Execution MCP
Installation
Quick Install (Cursor)
Cursor Rules
Or manually add to your Cursor configuration (~/.cursor/mcp.json):
{
"mcpServers": {
"nativelink": {
"command": "npx",
"args": ["-y", "@nativelink/mcp-server", "--api-key", "YOUR_API_KEY"]
}
}
}Claude Code
claude mcp add nativelink -- npx -y @nativelink/mcp-server --api-key YOUR_API_KEYVS Code
Add to your VS Code MCP settings:
{
"servers": {
"nativelink": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@nativelink/mcp-server", "--api-key", "YOUR_API_KEY"]
}
}
}Local Development (Cursor + VS Code)
If you want to run the MCP server from a local checkout:
npm install
npm run buildThen point your MCP config to the built entrypoint:
{
"command": "node",
"args": ["/ABS/PATH/TO/nativelink-mcp-server/dist/index.js"]
}Getting Started with Nativelink Cloud
1. Sign up at app.nativelink.com
Create your free account
Get instant access to cloud build cache and remote execution
2. Get Your Personalized Configuration
After signing up, you'll receive a personalized .bazelrc configuration:
build --remote_cache=grpcs://cas-tracemachina-shared.build-faster.nativelink.net
build --remote_header=x-nativelink-api-key=YOUR_API_KEY
build --bes_backend=grpcs://bes-tracemachina-shared.build-faster.nativelink.net
build --bes_header=x-nativelink-api-key=YOUR_BES_API_KEY
build --bes_results_url=https://app.nativelink.com/a/YOUR_BUILD_ID/build
build --remote_executor=grpcs://scheduler-tracemachina-shared.build-faster.nativelink.net:4433. Add to Your Project
Append the configuration to your .bazelrc file and start building!
AI Provider Keys (Optional)
For enhanced AI-powered features:
Anthropic: Get from console.anthropic.com
Gemini: Get from makersuite.google.com
Usage
Simply add use nativelink to your prompts:
Set up Nativelink remote cache for my Rust project. use nativelinkDebug why my Bazel builds are slow. use nativelinkSet up automatic builds and tests after file changes. use nativelinkAvailable Tools
1. get-bazel-config
Generates optimized Bazel configuration for your project.
Parameters:
projectType(required): rust, cpp, java, python, go, or mixednativelinkUrl(optional): Custom Nativelink server URLfeatures(optional): Array of features to enable
Example:
Generate a Bazel config for my Rust project with remote cache and execution. use nativelink2. get-nativelink-docs
Fetches relevant Nativelink documentation.
Parameters:
topic(required): setup, migration, optimization, troubleshooting, or apicontext(optional): Additional context for the querymaxTokens(optional): Maximum response length
Example:
How do I migrate from local builds to Nativelink cloud? use nativelink3. analyze-build-performance
Analyzes build metrics and provides optimization recommendations.
Parameters:
profileData(optional): Bazel profile JSONmetrics(optional): Build performance metricstargetOptimization(optional): speed, cost, or balanced
Example:
My cache hit rate is 40%. How can I improve it? use nativelink4. generate-deployment-config
Generates deployment configurations for various platforms.
Parameters:
platform(required): kubernetes, docker, aws, gcp, or azurescale(required): small, medium, large, or enterprisefeatures(optional): monitoring, autoscaling, high_availability
Example:
Generate a Kubernetes deployment for Nativelink with autoscaling. use nativelink5. setup-watch-and-build
Sets up automatic Bazel builds and tests on file changes with Nativelink Cloud caching.
Parameters:
command(optional): build, test, or both (default: both)targets(optional): Bazel targets to build/test (default: //...)useIbazel(optional): Use iBazel for intelligent watching (recommended)watchPaths(optional): Paths/patterns to watchexcludePaths(optional): Paths/patterns to excludedebounceMs(optional): Delay before rebuilding (default: 1000ms)
Example:
Set up automatic builds and tests when files change. use nativelinkWhat it provides:
Configuration for iBazel (intelligent Bazel watcher)
Setup instructions for watchexec, entr, nodemon
Custom watch scripts
VS Code task configuration
Integration with Nativelink Cloud for instant cache hits
Configuration
Environment Variables
export NATIVELINK_API_KEY=your_api_key
export ANTHROPIC_API_KEY=your_anthropic_key # Optional
export GEMINI_API_KEY=your_gemini_key # Optional
export NATIVELINK_URL=https://custom.url # OptionalCommand Line Arguments
npx @nativelink/mcp-server \
--api-key YOUR_API_KEY \
--anthropic-key YOUR_ANTHROPIC_KEY \
--transport http \
--port 8080Pro Tips
Add a Rule
To avoid typing use nativelink every time, add this rule to your AI assistant:
Cursor: Add to Settings > Rules
Claude Code: Add to CLAUDE.md
Always use nativelink when I ask about:
- Bazel configuration or optimization
- Build cache setup
- Remote execution
- Build performance issuesProject-Specific Configuration
Create .bazelrc.nativelink in your project:
# Generated by Nativelink MCP
build --remote_cache=grpc://cache.nativelink.com:443
build --remote_cache_header=x-nativelink-api-key=YOUR_KEY
build --remote_download_minimal
build --experimental_remote_cache_compressionThen import in your main .bazelrc:
try-import .bazelrc.nativelinkDevelopment
Building from Source
git clone https://github.com/nativelink/mcp-server-nativelink.git
cd mcp-server-nativelink
npm install
npm run buildRunning Locally
# Stdio transport (for testing)
npm run dev
# HTTP transport
npm run dev -- --transport http --port 3000Testing with MCP Inspector
npx @modelcontextprotocol/inspector npx @nativelink/mcp-serverTroubleshooting
Authentication Errors
Verify API key is set correctly
Check network connectivity
Ensure firewall allows outbound HTTPS
Tool Not Working
Update to latest version:
npm update @nativelink/mcp-serverCheck logs with
DEBUG=trueenvironment variableVerify MCP client configuration
Performance Issues
Use
--remote_download_minimalfor large artifactsEnable compression with
--experimental_remote_cache_compressionCheck network latency to cache server
Support
π¬ Slack Community
π GitHub Issues
π§ Enterprise Support: support@nativelink.com
License
FSL-1.1-Apache-2.0 - Functional Source License v1.1 with Apache 2.0 future license.
This software is licensed under the Functional Source License (FSL) v1.1 and will automatically convert to Apache 2.0 license two years after each release. See LICENSE file for full details.
Key Points:
β Free for internal use, education, and research
β Free for providing professional services to users of the software
β οΈ Cannot be used to create competing MCP servers or services
π Converts to Apache 2.0 after 2 years
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Acknowledgments
Inspired by the excellent Context7 MCP Server architecture.
Available Tools
5 toolsanalyze-build-performanceC
Analyze build performance and provide optimization recommendations
Inputs: metrics, profileData, targetOptimization.
generate-deployment-configB
Generate deployment configuration for Nativelink
Inputs: scale (required), platform (required), features.
get-bazel-configC
Generate optimal Bazel configuration for Nativelink
Inputs: projectType (required), features, nativelinkUrl.
get-nativelink-docsC
Fetch Nativelink documentation and best practices
Inputs: topic (required), context, maxTokens.
setup-watch-and-buildB
Set up automatic Bazel builds and tests on file changes with Nativelink
Inputs: command, targets, useIbazel, debounceMs, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
The five tools mostly target distinct outcomes: documentation retrieval, Bazel config generation, deployment config generation, performance analysis, and watch/build setup. There is mild overlap between generating Bazel config and setting up automatic Bazel builds/tests, but the descriptions make the intended separation reasonably clear.
All names use consistent kebab-case and follow an action-object style. However, the verbs vary between get, generate, analyze, and setup, and get-bazel-config actually generates rather than retrieves, which is a minor inconsistency.
Five tools is a well-scoped count for this server's purpose, covering configuration, docs, performance, deployment, and automation setup without obvious filler. Each tool appears to earn its place.
The surface covers the main guidance and configuration workflows for Nativelink: docs, Bazel config, deployment config, performance analysis, and watch/build automation. Minor gaps exist around validating generated configs or explicitly running build/test operations, but agents can likely work around these with the current tools.
Maintenance
Related MCP Connectors
Build, test and cache insights for Xcode, Gradle and Bazel projects, for coding agents.
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Rent and manage dedicated Apple Silicon Macs for iOS builds and CI/CD from your AI agent.
Test analytics for AI agents: test history, flaky tests, failure clusters, coverage.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides secure access to containerized build environments for software projects, enabling AI assistants to execute builds, run tests, manage git operations, and inspect build artifacts without requiring local installation of dependencies.6MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI-assisted development by running and testing code directly on Databricks clusters via natural language, then deploying Databricks Asset Bundles.14-
- FlicenseAqualityDmaintenanceProvides AI coding agents with dependency analysis, impact detection, and build verification tools.14-
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to query a persistent local code graph for targeted context, blast-radius analysis, and incremental updates, so they read only relevant files during reviews and large-repo workflows.MIT