MCP: Intro and Configuration

Introduction to MCP (Model Context Protocol)

The Model Context Protocol (MCP) is an open standard for connecting large language models (LLMs) to external tools, data sources, and APIs. MCP servers implement the MCP. They act as standardized interfaces that allow language models to communicate with external applications or systems—similar in concept to APIs, but specifically designed for LLM-driven interactions.

With Tabnine Agent, these are managed in a similar manner to creating guidelines, through a specific file.


MCP Server Configuration

MCP servers are configured through a JSON file under the .tabnine folder in your project root:

First, enter the same /.tabnine/ directory inside your project directory.

To direct to specific MCP servers, create the mcp_servers.json file, which will follow this structure here:

{
    "mcpServers": {
        "server-name": {
            "command": "server-executable",
            "args": [
                "arg1",
                "arg2"
            ],
            "env": {
                "API_KEY": "your-api-key",
                "BASE_URL": "<https://api.example.com>"
            }
        }
    }
}

In that mcp_servers.json file, list each server you want to include. For each server mentioned in the file, Tabnine Agent requires the following configuration components:

  1. mcp_server — this is the top-level container

  2. <server-name> – the name of the server itself

  3. command – the script command that launches the server

Optional fields include:

  1. args – command line arguments (with no spaces, otherwise they’ll be treated as separate paths)

  2. env – environment key-value pairs

Here is an example of that structure filled in with variables:

{
  "mcpServers": {
    "mcp-atlassian": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "JIRA_URL",
        "-e",
        "JIRA_API_TOKEN",
        "mcp-atlassian:latest"
      ],
      "env": {
        "JIRA_URL": "JIRA_URL",
        "JIRA_API_TOKEN": "JIRA_API_TOKEN"
      }
    }
  }
}

Transport Types

The service automatically detects the transport type based on your configuration:

Detected Transport

Configuration Field

Use Case

STDIO

command present

Local MCP servers, CLI tools

Streamable HTTP

url present

Modern remote APIs

SSE

transport: "sse"

Legacy remote servers


Commonly Used MCP Servers

There are dozens of available MCP integrations on the market, official MCP servers for individual third parties. Here are a few of commonly used ones:

Category
MCP Servers

Development Tools

Project Management

CloudOps

Languages & Frameworks

Monitoring

Configuration Examples

Local MCP Server (Stdio Transport)

Detected by: Presence of command field

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Documents"
      ],
      "env": {
        "NODE_ENV": "production",
        "DEBUG": "mcp:*"
      },
      "cwd": "/Users/username/workspace"
    }
  }
}

Properties:

  • command (required): The executable to run

  • args (optional): Array of command-line arguments

  • env (optional): Environment variables for the process

  • cwd (optional): Working directory for the process

Remote MCP Server with JWT Authentication

Detected by: Presence of url field (defaults to Streamable HTTP)

{
  "mcpServers": {
    "my-api": {
      "url": "https://api.example.com/mcp",
      "requestInit": {
        "headers": {
          "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
          "Content-Type": "application/json"
        }
      }
    }
  }
}

Properties:

  • url (required): The MCP endpoint URL

  • requestInit (optional): Standard Fetch API RequestInit object

    • headers: HTTP headers to include in all requests

  • sessionId (optional): Session identifier for the connection

Remote MCP Server with API Key (multiple headers)

This example shows how various authorizations might appear in the mcp_servers.json file.

{
  "mcpServers": {
    "weather-service": {
      "url": "https://weather-mcp.example.com/mcp",
      "requestInit": {
        "headers": {
          "Authorization": "Bearer token",
          "X-API-Key": "api-key",
          "X-Client-ID": "client-id",
          "X-Environment": "production"
          "X-Session-Token": "session-token-value"
        }
      }
    }
  }
}

Legacy SSE Server

Detected by: Explicit transport: "sse" field

{
  "mcpServers": {
    "legacy-api": {
      "transport": "sse",
      "url": "https://old-api.example.com/sse",
      "requestInit": {
        "headers": {
          "Authorization": "Bearer legacy-token-123"
        }
      },
      "eventSourceInit": {
        "withCredentials": true
      }
    }
  }
}

Properties:

  • transport (required): Must be "sse"

  • url (required): The SSE endpoint URL

  • requestInit (optional): Request configuration

  • eventSourceInit (optional): EventSource-specific options

  • authProvider (optional): OAuth client provider (advanced)

Last updated

Was this helpful?