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.
- π 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
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 mcp add nativelink -- npx -y @nativelink/mcp-server --api-key YOUR_API_KEYAdd to your VS Code MCP settings:
{
"servers": {
"nativelink": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@nativelink/mcp-server", "--api-key", "YOUR_API_KEY"]
}
}
}1. Sign up at app.nativelink.com
- Create your free account
- Get instant access to cloud build cache and remote execution
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:443Append the configuration to your .bazelrc file and start building!
For enhanced AI-powered features:
- Anthropic: Get from console.anthropic.com
- Gemini: Get from makersuite.google.com
Simply add use nativelink to your prompts:
Set up Nativelink remote cache for my Rust project. use nativelink
Debug why my Bazel builds are slow. use nativelink
Set up automatic builds and tests after file changes. use nativelink
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 nativelink
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 nativelink
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 nativelink
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 nativelink
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 nativelink
What 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
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 # Optionalnpx @nativelink/mcp-server \
--api-key YOUR_API_KEY \
--anthropic-key YOUR_ANTHROPIC_KEY \
--transport http \
--port 8080To 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 issues
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.nativelinkgit clone https://github.com/nativelink/mcp-server-nativelink.git
cd mcp-server-nativelink
npm install
npm run build# Stdio transport (for testing)
npm run dev
# HTTP transport
npm run dev -- --transport http --port 3000npx @modelcontextprotocol/inspector npx @nativelink/mcp-server- Verify API key is set correctly
- Check network connectivity
- Ensure firewall allows outbound HTTPS
- Update to latest version:
npm update @nativelink/mcp-server - Check logs with
DEBUG=trueenvironment variable - Verify MCP client configuration
- Use
--remote_download_minimalfor large artifacts - Enable compression with
--experimental_remote_cache_compression - Check network latency to cache server
- π Nativelink Documentation
- π¬ Slack Community
- π GitHub Issues
- π§ Enterprise Support: support@nativelink.com
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
We welcome contributions! Please see our Contributing Guide for details.
Inspired by the excellent Context7 MCP Server architecture.