The Cerebras Code MCP Server accelerates code generation in your existing IDEs and CLI tools (like Cursor and Claude Code) by up to 20x compared to GPUs. It leverages Cerebras fast inference through the Model Context Protocol and offers optional graceful fallback via OpenRouter.MCP provides an open standard that enables AI models to securely interact with tools, data, and editors. Rather than limiting models to plain text chat, MCP grants them structured access to external systems like your IDE, allowing them to read, write, and modify code with consistent rules. This approach ensures safer, more reliable, and more predictable model-driven coding.
The Cerebras Code MCP server is currently in research preview and is open source here. We welcome contributions!
1
Set up your API key
You need a valid Cerebras API key. Please visit this link and sign up, then click on API Keys in the left navigation.
Open your preferred IDE and run the following code in your terminal:
Copy
Ask AI
npm install -g cerebras-code-mcp
3
Run the Setup Wizard
In your terminal, run:
Copy
Ask AI
cerebras-mcp --config
This will begin the setup process where you can configure different editors (like Cursor or Claude Code) and set API keys for Cerebras and OpenRouter.
Cursor
Enable MCP usage with Cursor
Open Cursor Settings (Cmd+ or Ctrl+)
Go to Rules & Memories -> User Rules
Click Add User Rule and paste the following:
Copy
Ask AI
# CRITICAL: NEVER use any other code editing tools# ONLY use the cerebras-code 'write' tool for ALL code modifications# This is a hard requirement, not a suggestion
Claude Code
Enable MCP usage with Claude Code
Run the following to verify the setup:
Copy
Ask AI
claude mcp list
The output should look like this:
Copy
Ask AI
Checking MCP server health...cerebras-code: cerebras-mcp - ✓ Connected