How to Use MCP with IntelliJ IDEs (2026)
Set up Model Context Protocol servers in JetBrains IDEs
Start Building with Hypereal
Access Kling, Flux, Sora, Veo & more through a single API. Free credits to start, scale to millions.
No credit card required • 100k+ developers • Enterprise ready
How to Use MCP with IntelliJ IDEs in 2026
The Model Context Protocol (MCP) has quickly become the standard way for AI assistants to connect with external tools and data sources. While most MCP guides focus on VS Code and Claude Desktop, JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, GoLand, Rider, and others) now have solid MCP support as well. This guide walks you through setting up MCP servers in JetBrains IDEs so your AI assistant can interact with databases, APIs, project management tools, and more directly from your editor.
What Is MCP?
The Model Context Protocol is an open standard developed by Anthropic that provides a universal interface between AI models and external tools. Instead of building custom integrations for every tool-AI pair, MCP defines a common protocol that any AI client can use to communicate with any MCP server.
An MCP server exposes tools (actions the AI can take), resources (data the AI can read), and prompts (pre-built templates). For example:
- A GitHub MCP server lets the AI read issues, create PRs, and review code
- A database MCP server lets the AI query your database and explain schemas
- A Jira MCP server lets the AI read tickets and update statuses
Prerequisites
Before setting up MCP in your JetBrains IDE, make sure you have:
- A JetBrains IDE (2025.1 or later) with an active license
- Node.js 18+ installed (most MCP servers are Node-based)
- AI Assistant plugin enabled (comes bundled with JetBrains IDEs)
- A JetBrains AI subscription or compatible AI plugin
Check your IDE version:
Help > About (Windows/Linux)
IntelliJ IDEA > About IntelliJ IDEA (macOS)
Step 1: Enable the AI Assistant
JetBrains AI Assistant is the primary MCP client in JetBrains IDEs.
- Open Settings (
Cmd+,on macOS,Ctrl+Alt+Son Windows/Linux) - Navigate to Plugins
- Search for "AI Assistant"
- Ensure it is installed and enabled
- Restart the IDE if prompted
After restarting, you should see the AI Assistant tool window in the right sidebar.
Step 2: Configure MCP Servers
JetBrains IDEs support MCP server configuration through a JSON file in your project or globally.
Project-Level Configuration
Create a .jb-mcp.json file in your project root:
{
"servers": [
{
"name": "filesystem",
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-filesystem", "/path/to/allowed/directory"]
},
{
"name": "github",
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-github"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
]
}
Global Configuration
For MCP servers you want available across all projects, create the configuration in your JetBrains config directory:
# macOS
~/Library/Application Support/JetBrains/IntelliJIdea2025.2/mcp.json
# Linux
~/.config/JetBrains/IntelliJIdea2025.2/mcp.json
# Windows
%APPDATA%\JetBrains\IntelliJIdea2025.2\mcp.json
The format is the same as the project-level configuration.
Configuration Through the UI
You can also configure MCP servers through the IDE settings:
- Open Settings (
Cmd+,/Ctrl+Alt+S) - Navigate to Tools > AI Assistant > MCP Servers
- Click the + button to add a new server
- Fill in the server details:
- Name: A descriptive name
- Command: The command to start the server (e.g.,
npx) - Arguments: Command arguments
- Environment Variables: Any required env vars
Step 3: Popular MCP Server Setups
GitHub MCP Server
Connect your IDE's AI to your GitHub repositories:
{
"servers": [
{
"name": "github",
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-github"],
"env": {
"GITHUB_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
}
}
]
}
Generate a GitHub token at github.com/settings/tokens with the repo scope.
What it enables:
- "Create a PR for my current changes"
- "What are the open issues assigned to me?"
- "Review the latest PR on this repo"
Database MCP Server (PostgreSQL)
Let the AI query and understand your database schema:
{
"servers": [
{
"name": "postgres",
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-postgres", "postgresql://user:password@localhost:5432/mydb"]
}
]
}
What it enables:
- "Show me the schema for the users table"
- "Write a query to find users who signed up in the last 30 days"
- "Explain the relationships between the orders and products tables"
Filesystem MCP Server
Give the AI read access to specific directories:
{
"servers": [
{
"name": "docs",
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-filesystem", "./docs", "./README.md"]
}
]
}
Slack MCP Server
Connect Slack for context from team conversations:
{
"servers": [
{
"name": "slack",
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-slack"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_TEAM_ID": "T01234567"
}
}
]
}
Step 4: Using MCP Tools in the AI Chat
Once your MCP servers are configured and running, the AI Assistant in your JetBrains IDE can use the tools they expose.
Starting a Conversation
- Open the AI Assistant panel (right sidebar)
- Start a new chat
- The AI automatically discovers available MCP tools
Example Interactions
You: What are the open issues on our GitHub repo?
AI: [Uses github MCP tool: list_issues]
I found 12 open issues. Here are the most recent:
- #145: Fix authentication timeout (assigned to @alice)
- #143: Update dashboard layout (unassigned)
- #140: Database migration failing on staging (assigned to @bob)
...
You: Show me the schema for the payments table and suggest an index for slow queries.
AI: [Uses postgres MCP tool: query]
The payments table has the following schema:
- id (uuid, primary key)
- user_id (uuid, foreign key to users)
- amount (decimal)
- status (varchar)
- created_at (timestamp)
Based on common query patterns, I recommend adding an index on (user_id, created_at DESC)
for queries that look up recent payments by user:
CREATE INDEX idx_payments_user_created ON payments (user_id, created_at DESC);
Step 5: Troubleshooting
MCP Server Not Starting
Check that the server command works outside the IDE:
# Test the command directly
npx -y @anthropic/mcp-server-github
# Check if Node.js is accessible
node --version
npx --version
Server Starts but Tools Not Appearing
- Open Settings > Tools > AI Assistant > MCP Servers
- Check that the server shows a green status indicator
- Click Refresh to rediscover tools
- Check the IDE log for errors: Help > Show Log in Finder/Explorer
Environment Variable Issues
JetBrains IDEs may not inherit your shell environment variables. Specify them explicitly in the MCP configuration:
{
"servers": [
{
"name": "github",
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-github"],
"env": {
"GITHUB_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx",
"PATH": "/usr/local/bin:/usr/bin:/bin"
}
}
]
}
Using nvm or fnm
If you manage Node.js versions with nvm or fnm, the IDE might not find npx. Use the full path:
{
"servers": [
{
"name": "github",
"command": "/Users/yourname/.nvm/versions/node/v22.0.0/bin/npx",
"args": ["-y", "@anthropic/mcp-server-github"],
"env": {
"GITHUB_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
}
}
]
}
Find your npx path with:
which npx
Step 6: Security Best Practices
Do Not Hardcode Secrets
Instead of putting tokens directly in the config file, use environment variable references or a secrets manager:
# Set environment variables in your shell profile
export GITHUB_TOKEN="ghp_xxxxxxxxxxxxxxxxxxxx"
export SLACK_BOT_TOKEN="xoxb-your-token"
Limit MCP Server Permissions
- Give the filesystem MCP server access only to directories it needs
- Use read-only database credentials for the database MCP server
- Create scoped API tokens with minimal permissions
Add Config Files to .gitignore
# .gitignore
.jb-mcp.json
Supported JetBrains IDEs
MCP support is available in all JetBrains IDEs that include the AI Assistant plugin:
| IDE | Language Focus | MCP Support |
|---|---|---|
| IntelliJ IDEA | Java, Kotlin | Yes |
| WebStorm | JavaScript, TypeScript | Yes |
| PyCharm | Python | Yes |
| GoLand | Go | Yes |
| Rider | C#, .NET | Yes |
| RubyMine | Ruby | Yes |
| PhpStorm | PHP | Yes |
| CLion | C, C++ | Yes |
| DataGrip | SQL, Databases | Yes |
| RustRover | Rust | Yes |
Building with AI APIs
MCP connects your development environment to external tools, but if you are building applications that need AI media generation capabilities (images, video, audio, avatars), Hypereal AI provides a unified API that can complement your MCP-enhanced workflow. You can prototype integrations faster when your AI assistant understands both your code and the APIs you are building against.
Summary
Setting up MCP in JetBrains IDEs involves three steps: enable the AI Assistant plugin, create a .jb-mcp.json configuration file with your server definitions, and start chatting. The most useful MCP servers for daily development are GitHub (PRs and issues), database (schema and queries), and filesystem (documentation). Keep secrets out of config files, limit permissions, and use the troubleshooting steps above if servers fail to connect.
Related Articles
Start Building Today
Get 35 free credits on signup. No credit card required. Generate your first image in under 5 minutes.
