Use MCP servers to extend Tabnine CLI with extra tools and context providers. This page shows where MCP config lives and how scope and overrides work. It also covers tabnine mcp commands and runtime flags for selecting servers.
Configuring MCP for Tabnine CLI
Overview
The Tabnine CLI supports MCP (Model Context Protocol) servers, which allow you to extend the CLI's capabilities with additional tools and context providers. This guide explains how to configure and manage MCP servers.
Prerequisites
Tabnine CLI installed (available at ~/.local/bin/tabnine)
Node.js/npm (for npx-based MCP servers)
Python (for Python-based MCP servers, optional)
MCP Management Commands
Adding an MCP Server
Syntax:
tabninemcpadd<name><commandOrUrl> [args...]
Parameters:
<name>: A unique identifier for your MCP server
<commandOrUrl>: The command to run the server or a URL to connect to it
[args...]: Optional arguments to pass to the server command
Other Management Commands
Common MCP Server Examples
Filesystem server (local)
GitHub server (local process)
Custom server (any command)
Using MCP Servers in Tabnine CLI
Running Tabnine with Specific MCP Servers
Once you've configured MCP servers, you can specify which ones to use when running Tabnine:
Using in Interactive Mode
Using in Non-Interactive Mode
Complete Workflow Example
Here's a complete example of setting up and using a filesystem MCP server:
Configuration Storage
MCP server configurations are stored in the Tabnine agent directory:
Location: ~/.tabnine/agent/
Settings file: ~/.tabnine/agent/settings.json
Additional Options
Auto-Approval Modes
When using MCP servers, you can control how tool calls are approved:
Allow Specific Tools
You can also allow specific tools to run without confirmation:
Troubleshooting
Check if MCP servers are configured
Debug mode
Verify Tabnine CLI version
Popular MCP Servers
Here are some popular MCP servers you might want to configure:
@modelcontextprotocol/server-filesystem - File system access
# List all configured MCP servers
tabnine mcp list
# Enable an MCP server
tabnine mcp enable <name>
# Disable an MCP server
tabnine mcp disable <name>
# Remove an MCP server
tabnine mcp remove <name>
# Run with specific MCP servers
tabnine --allowed-mcp-server-names filesystem github
# Run with multiple servers
tabnine --allowed-mcp-server-names server1 server2 server3
# Start interactive session with MCP servers
tabnine --allowed-mcp-server-names filesystem
# Start with a prompt and MCP servers
tabnine --prompt-interactive "Help me analyze this project" --allowed-mcp-server-names filesystem
# Run a single prompt with MCP servers
tabnine --prompt "List all files in the project" --allowed-mcp-server-names filesystem
# 1. Add the filesystem server for your project
tabnine mcp add my-project npx -y @modelcontextprotocol/server-filesystem ~/myproject
# 2. Verify it was added
tabnine mcp list
# 3. Enable the server (if not already enabled)
tabnine mcp enable my-project
# 4. Run Tabnine with the MCP server
tabnine --allowed-mcp-server-names my-project
# 5. In the chat, you can now ask questions like:
# - "What files are in this project?"
# - "Read the contents of package.json"
# - "Analyze the code structure"
# Default mode (prompt for approval)
tabnine --allowed-mcp-server-names filesystem
# Auto-approve edit tools only
tabnine --approval-mode auto_edit --allowed-mcp-server-names filesystem
# Auto-approve all tools (YOLO mode)
tabnine --approval-mode yolo --allowed-mcp-server-names filesystem
# OR
tabnine --yolo --allowed-mcp-server-names filesystem
# Read-only mode (plan mode)
tabnine --approval-mode plan --allowed-mcp-server-names filesystem