MCP Server Config

Tabnine CLI supports Model Context Protocol (MCP) servers, which extend 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):

Priority
Scope
Path (macOS/Linux)

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

Field
Type
Description

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

Flag
Description

-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:

Subcommand
Aliases
Description

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:

See Also

Last updated

Was this helpful?