MCP Server Config
Tabnine IDE and Tabnine CLI support. Model Context Protocol (MCP) servers. This extends the CLI with additional tools and context providers. MCP servers are configured in settings.json and managed with the tabnine mcp CLI commands or the /mcp slash command in interactive mode.
Configuration File Location
MCP server configurations live in the mcpServers key of settings.json. The CLI loads settings from multiple scopes, merged in this precedence order (highest wins last):
1
Schema defaults
Built-in
2
System defaults
Sibling to system settings
3
User
~/.tabnine/agent/settings.json
4
Workspace
<project>/.tabnine/agent/settings.json
5 (highest)
System
/Library/Application Support/TabnineCli/settings.json (macOS) or /etc/tabnine-cli/settings.json (Linux)
MCP servers use a shallow merge strategy: workspace-level servers merge with (not replace) user-level servers. If the same server name exists in both scopes, the higher-priority scope wins.
Workspace settings are only loaded if the workspace is trusted.
Configuration Format
Stdio Transport (Local Process)
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"],
"env": {
"TOKEN": "your-token"
},
"cwd": "/optional/working/directory",
"timeout": 30000
}
}
}HTTP/SSE Transport (Remote Server)
When type is omitted, the CLI tries Streamable HTTP first and falls back to SSE automatically if the HTTP connection fails. Set type explicitly to "sse" or "http" to skip auto-detection.
Configuration Fields
command
string
Executable to run for stdio transport.
args
string[]
Arguments passed to the stdio command.
env
object
Environment variables set for the server process.
cwd
string
Working directory for the server process.
url
string
URL for SSE or HTTP transport.
type
"stdio" | "sse" | "http"
Transport type. Defaults to "http" when url is set.
headers
object
HTTP headers sent to the server (useful for authentication).
timeout
number
Request timeout in milliseconds. Defaults to 600000 (10 minutes).
trust
boolean
When true and the workspace is trusted, tools from this server are auto-approved without confirmation.
description
string
Human-readable description of the server.
includeTools
string[]
Allowlist of tools to enable. When omitted, all tools are enabled.
excludeTools
string[]
Tools to disable even if exposed by the server.
MCP Management Commands
Adding a Server
-s, --scope
"user" or "project" (default: "project")
-t, --transport, --type
"stdio", "sse", or "http" (default: "stdio")
-e, --env
Environment variables as KEY=value (repeatable)
-H, --header
HTTP headers as "Key: value" (repeatable)
--timeout
Connection timeout in milliseconds
--trust
Bypass all tool call confirmation prompts
--description
Server description
--include-tools
Comma-separated tool allowlist
--exclude-tools
Comma-separated tool blocklist
Example:
Listing Servers
Status indicators: ✓ Connected, ✗ Disconnected, ⛔ Blocked, ○ Disabled.
Enabling and Disabling Servers
Both accept a --session flag for session-only changes. Persistent enablement state is stored in ~/.tabnine/agent/mcp-server-enablement.json, separate from the server configuration. Servers are enabled by default.
Removing a Server
Accepts --scope ("user" or "project", default: "project").
Interactive Mode: /mcp Slash Command
In interactive mode, the /mcp slash command provides these subcommands:
list
ls, nodesc
List configured MCP servers and tools
desc
description
List servers and tools with descriptions
schema
—
List servers, tools, descriptions, and schemas
auth
—
Authenticate with an OAuth-enabled MCP server
reload
refresh
Reload MCP servers
enable
—
Enable a disabled MCP server
disable
—
Disable an MCP server
Running /mcp with no subcommand defaults to list.
Runtime Flags
Filtering MCP Servers
When this flag is set, only the named servers are loaded. The comma-separated format and space-separated format are both accepted.
Examples
Filesystem Server
GitHub Server
Remote HTTP Server with Authentication
Troubleshooting
Verify your servers are configured and reachable:
For detailed connection diagnostics, start the CLI with debug logging:
Using Environment Variables in MCP Server Configuration
MCP server configurations in .tabnine/mcp_servers.json support environment variable interpolation, so you can reference secrets and tokens stored in your OS environment instead of hardcoding them into config files.
Supported Syntax
$VARIABLE_NAME
$SONARQUBE_TOKEN
Value of SONARQUBE_TOKEN env var
${VARIABLE_NAME}
${SONARQUBE_TOKEN}
Value of SONARQUBE_TOKEN env var
On Windows, %VARIABLE_NAME% is also supported. Both $VAR and ${VAR} syntaxes are equivalent and follow POSIX/Bash conventions via dotenv-expand.
Environment variables are resolved in the following fields:
envvalues in stdio transport configurations (environment variables passed to child processes)requestInit.headersvalues in SSE and Streamable-HTTP transport configurations
Other fields such as url, command, args, and cwd are passed through as-is and do not undergo interpolation.
Variables are resolved at connection time, not when the config file is loaded. If you update an environment variable, the new value takes effect the next time the MCP server connection is established.
If a referenced environment variable is not set, it is replaced with an empty string. No warning is displayed.
The following configuration uses environment variable interpolation for both SSE header authentication and stdio environment variables:
Multiple placeholders and literal text can be combined in a single value. For example, "Bearer ${TOKEN}" resolves to "Bearer sk-abc123". This feature is supported in VS Code and JetBrains. The CLI has built-in environment variable expansion.
Last updated
Was this helpful?
