MCP: Intro and Setup
Introduction to MCP (Model Context Protocol)
The Model Context Protocol (MCP) is a powerful communication protocol that enables Tabnine Agents to seamlessly connect with external tools and services, dramatically expanding their capabilities beyond code analysis and generation.
What is MCP?
MCP is a standardized protocol that allows AI agents to invoke external tools without the complexity of manually wiring APIs. Think of it as a universal translator that lets your agent communicate with any service that supports MCP.
Key Benefits
Universal Integration: Connect to any MCP-compatible service
Natural Language Interface: Agents understand when and how to use tools
Automated Parameter Handling: No manual API configuration needed
Seamless Workflow Integration: Tools become part of your agent’s capabilities

The MCP Flow
Tool Description: MCP servers provide natural language descriptions of their capabilities
Intelligent Selection: Agents understand when to use specific tools based on context
Parameter Mapping: Agents automatically format parameters correctly
Response Processing: Agents interpret tool responses and integrate them into workflows
Available MCP Integrations
Development Tools
Git Operations
Repository management
Branch operations
Commit history analysis
Merge conflict resolution
Docker & Containers
Container management
Image building and deployment
Service orchestration
Environment setup
Project Management
JIRA Integration
Issue creation and management
Sprint planning
Status updates
Progress tracking
Confluence
Documentation access
Knowledge base queries
Content creation
Team collaboration
Database Tools
Database Operations
Query execution
Schema management
Data analysis
Performance monitoring
Cloud Services
AWS/Azure/GCP
Resource provisioning
Deployment automation
Monitoring and logs
Security management
Custom Integrations
Your Own APIs
Internal tool integration
Custom workflow automation
Legacy system access
Specialized functionality
MCP Use Cases
Automated Workflows
Feature Development + Project Management
You: "Implement user authentication and update the project tracker"
Agent:
1. Implements authentication code
2. Creates JIRA tickets for testing
3. Updates Confluence documentation
4. Commits changes to Git
5. Updates project status
Bug Investigation + Resolution
You: "Investigate database performance issues"
Agent:
1. Queries database performance metrics
2. Analyzes slow query logs
3. Creates JIRA issue with findings
4. Implements optimizations
5. Validates improvements
Cross-Platform Operations
Code + Documentation + Deployment
You: "Deploy the new feature to staging"
Agent:
1. Runs tests via testing tools
2. Builds Docker images
3. Deploys to cloud platform
4. Updates deployment documentation
5. Notifies team via Slack
Technical Requirements
Prerequisites
Tabnine Agent Mode: MCP requires tool-calling capabilities
Node.js Runtime: For most MCP server implementations
Network Access: To communicate with external services
Docker (optional): For containerized MCP servers
Security Considerations
Authentication: MCP servers handle service authentication
Permissions: Agents respect tool permission boundaries
Data Privacy: Sensitive data stays within your environment
Audit Trail: All tool interactions are logged
MCP Server Configuration
MCP servers are configured through a mcp_servers.json
file under the .tabnine
directory in your project root:
{
"mcpServers":
{
"server-name":
{
"command": "server-executable",
"args":
[
"arg1",
"arg2"
],
"env":
{
"API_KEY": "your-api-key",
"BASE_URL": "<https://api.example.com>"
}
}
}
}
Configuration Components
Command
“command”
: The executable or script that runs the MCP serverArguments
“args”
: Command-line arguments for the serverEnvironment
“env”
: Environment variables for authentication and configuration
Getting Started with MCP
1. Choose Your Integration
Identify which external tools would benefit your workflow:
Project management (JIRA, GitHub Issues)
Documentation (Confluence, Notion)
Infrastructure (AWS, Docker)
Databases (PostgreSQL, MongoDB)
2. Set Up MCP Server
Each tool has its own MCP server implementation. Most are available as:
Docker containers
Node.js packages
Python scripts
Pre-built binaries
3. Configure Tabnine
Add the MCP server configuration to your mcp_servers.json
file with appropriate credentials and settings.
4. Test Integration
Verify the connection by asking your agent to interact with the service:
"Can you see the JIRA MCP server?"
"List my recent JIRA issues"
Best Practices
Tool Selection
Start Small: Begin with one or two critical integrations
Focus on Workflow: Choose tools that automate your most common tasks
Consider Security: Ensure proper authentication and permissions
Configuration Management
Environment Variables: Use env vars for sensitive information
Version Control: Track MCP configurations (excluding secrets)
Documentation: Document your MCP setup for team members
Agent Interactions
Be Specific: Clearly state which tools should be used when needed
Understand Limitations: Know what each tool can and cannot do
Monitor Usage: Track tool usage and effectiveness
Troubleshooting MCP
Common Issues
Connection Problems
Verify MCP server is running
Check network connectivity
Validate authentication credentials
Permission Errors
Ensure proper API permissions
Verify service account configuration
Check rate limiting settings
Performance Issues
Monitor tool response times
Consider caching strategies
Optimize query patterns
Debugging Steps
Check Logs: Review Tabnine logs for MCP errors
Test Manually: Verify tool works outside of MCP
Validate Config: Ensure
mcp_servers.json
file is correctUpdate Servers: Keep MCP servers up to date
Setting up MCP with Tabnine Agents
This guide provides step-by-step instructions for configuring Model Context Protocol (MCP) servers to work with Tabnine Agents, enabling seamless integration with external tools and services.
Quick Setup Overview
Create MCP Configuration: Under your project root directory, create a
.tabnine
directory, and inside it create a file calledmcp_servers.json
Install MCP Server: Choose and install your desired MCP server
Configure Authentication: Set up API keys and credentials
Test Connection: Verify integration works with Tabnine
Start Using: Begin leveraging external tools in your workflows
1. Create MCP Configuration File
Under your project root directory, create a subdirectory .tabnine
and under it create a file mcp_servers.json
. This file will contain the configuration for all your MCP servers.
2. Basic Configuration Structure
The mcp_servers.json
file uses JSON format:
{
"mcpServers":
{
"server-name":
{
"command": "command-to-run-server",
"args":
[
"argument1",
"argument2"
],
"env":
{
"ENV_VARIABLE": "value"
}
}
}
}
Configuration Parameters
command
: The executable that runs the MCP serverargs
: Array of command-line argumentsenv
: Environment variables for the server (API keys, URLs, etc.)
3. Authentication Setup
API Token Creation
For JIRA/Confluence:
Go to Atlassian Account Settings
Navigate to Security → API Tokens
Create a new token
Copy and store securely
For GitHub:
Go to GitHub Settings → Developer Settings
Personal Access Tokens → Tokens (classic)
Generate new token with appropriate scopes
Copy and store securely
For Databases:
Create a dedicated service account
Grant minimum required permissions
Use connection strings with authentication
Environment Variables (Recommended)
Instead of hardcoding credentials, use environment 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}"
}
}
}
}
Then set environment variables:
export JIRA_URL="<https://your-company.atlassian.net>"
export JIRA_API_TOKEN="your_token_here"
4. Verify MCP Server Connection
Test the Connection
Ask your Tabnine Agent:
"Are you able to see the JIRA MCP server?"
Expected Response:
✅ “Yes, I can see the JIRA MCP server and access its capabilities”
❌ “No, I cannot connect to the JIRA MCP server”
Basic Functionality Test
Try a simple operation:
"List my recent JIRA issues"
"Search for 'authentication' in Confluence"
"Show me the database schema"
Best Practices
Security
Never commit API tokens to version control
Use environment variables for all sensitive data
Implement least privilege access for service accounts
Regularly rotate API tokens
Performance
Start with essential tools to avoid overwhelming the agent
Monitor response times and optimize configurations
Use caching where appropriate
Consider rate limiting for API-heavy operations
Maintenance
Keep MCP servers updated to the latest versions
Document your configuration for team members
Test integrations regularly to catch issues early
Monitor usage patterns to optimize workflows
Next Steps
Now that you have MCP configured, explore:
MCP Examples - Real-world use cases and workflows
Guidelines Setup - Customize agent behavior
Last updated
Was this helpful?