MCP for Developers: Integrating GitHub, Azure DevOps, Jira, and Databases



Model Context Protocol (MCP) is revolutionizing how AI coding assistants interact with external systems. By enabling seamless connections to version control platforms, issue trackers, and databases, MCP transforms AI agents from simple code generators into powerful development workflow orchestrators. This article explores how to leverage MCP in Cursor and Claude Code to automate complex development tasks, from bug triage to database operations.
What is Model Context Protocol (MCP)?
MCP is an open protocol that allows AI assistants to securely connect to external tools and services. Think of it as a standardized way for AI agents to:
- Read and write data from external systems
- Execute actions on your behalf
- Access real-time information from your development tools
- Maintain context across multiple interactions
Unlike traditional API integrations that require custom code, MCP provides a unified interface that works across different AI coding assistants, making your workflows portable and future-proof.
Why MCP Matters for Developers
Traditional AI coding assistants are limited to the codebase you've opened in your editor. MCP breaks these boundaries by allowing agents to:
- Access live data from issue trackers, repositories, and databases
- Execute actions like creating PRs, updating tickets, and querying databases
- Maintain context across multiple systems and tools
- Automate workflows that previously required manual intervention
This means you can ask your AI assistant to "fix bug #1234 and create a PR" and it will:
- Fetch the bug details from Jira/Azure DevOps
- Understand the problem
- Implement the fix
- Create a pull request
- Update the ticket with the PR link
All without leaving your editor.
Setting Up MCP in Cursor and Claude Code
Prerequisites
Before diving into specific integrations, ensure you have:
- Cursor (latest version) or Claude Code installed
- MCP servers configured for the services you want to connect to
- Authentication tokens for the services (GitHub PAT, Azure DevOps token, Jira API token, etc.)
Basic MCP Configuration
MCP servers are configured through your editor's settings. In Cursor, this is typically done through the settings UI or configuration files. Each MCP server requires:
- Server name: A unique identifier
- Command: The command to start the MCP server
- Environment variables: For authentication and configuration
Integration 1: GitHub
Setting Up GitHub MCP Server
The GitHub MCP server allows your AI assistant to interact with GitHub repositories, issues, pull requests, and more.
Configuration Example:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
}
}
}
}
Use Cases and Examples
Example 1: Reading Bug Details and Creating a Fix
Scenario: Bug #42 reports that user authentication fails for users with special characters in their email.
Agent Instructions in Agents.md:
## GitHub Integration Workflow
### Bug Fix Process
1. When asked to fix a GitHub issue:
- First, fetch the issue details using MCP GitHub tools
- Read the issue description, comments, and labels
- Identify the affected files mentioned in the issue
- Analyze the codebase to understand the root cause
- Implement the fix following project conventions
- Create a new branch: `fix/issue-{number}-{short-description}`
- Commit with message: `fix: {issue title} (closes #{number})`
- Push the branch and create a pull request
- Link the PR in the issue comments
### When to Use GitHub MCP Tools
- **list_repositories**: When you need to see available repositories
- **get_issue**: To read issue details, comments, and metadata
- **create_pull_request**: After implementing a fix
- **search_code**: To find relevant code across repositories
- **get_file_contents**: To read files from any branch or commit
Workflow in Action:
You: "Fix GitHub issue #42"
Agent:
1. Uses MCP to fetch issue #42 details
2. Reads the issue: "Authentication fails for emails with '+' character"
3. Searches codebase for authentication logic
4. Identifies the bug in email validation regex
5. Creates branch: `fix/issue-42-email-validation`
6. Implements fix
7. Creates PR with description referencing the issue
8. Comments on issue with PR link
Example 2: Automated Code Review and PR Creation
Agent Instructions:
### PR Creation Workflow
When creating a PR:
- Use descriptive title that matches the branch purpose
- Include:
- What changed and why
- Testing performed
- Screenshots if UI changes
- Related issue numbers
- Request reviews from appropriate team members
- Add relevant labels
- Link to related issues using "closes #X" or "relates to #X"
Available GitHub MCP Tools
list_repositories: List accessible repositoriesget_issue: Fetch issue detailscreate_issue: Create new issuescreate_pull_request: Create PRssearch_code: Search across repositoriesget_file_contents: Read files from any branchcreate_branch: Create new brancheslist_pull_requests: List PRs with filters
Integration 2: Azure DevOps
Setting Up Azure DevOps MCP Server
Azure DevOps integration enables access to work items, repositories, pipelines, and more.
Configuration Example:
{
"mcpServers": {
"azure-devops": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-azure-devops"],
"env": {
"AZURE_DEVOPS_ORG": "your-org",
"AZURE_DEVOPS_PROJECT": "your-project",
"AZURE_DEVOPS_TOKEN": "your-pat-token"
}
}
}
}
Use Cases and Examples
Example 1: Bug Triage and Fix Workflow
Agent Instructions:
## Azure DevOps Integration Workflow
### Work Item Processing
1. When fixing a work item:
- Fetch work item details using `get_work_item`
- Read description, acceptance criteria, and comments
- Check linked commits and PRs
- Identify affected areas in codebase
- Implement fix following the project's coding standards
- Create feature branch: `bugfix/{work-item-id}-{short-title}`
- Commit with work item reference: `fix: {title} (AB#{id})`
- Create pull request in Azure DevOps
- Link PR to work item
- Update work item state to "Resolved" when PR is approved
### When to Use Azure DevOps MCP Tools
- **get_work_item**: Read bug/feature details
- **create_work_item**: Create new work items from code analysis
- **update_work_item**: Update status, add comments
- **list_work_items**: Query work items by filters
- **get_repository**: Access repository information
- **create_pull_request**: Create PRs in Azure DevOps repos
Workflow Example:
You: "Fix bug AB#12345 - User profile page crashes on load"
Agent:
1. Fetches work item AB#12345
2. Reads: "Stack trace shows null reference in ProfileService.GetUserData()"
3. Locates ProfileService.cs
4. Identifies missing null check
5. Creates branch: `bugfix/12345-profile-crash`
6. Implements null check and error handling
7. Adds unit test for the scenario
8. Creates PR with work item link
9. Updates work item with PR link and status
Example 2: Automated Testing and Pipeline Integration
Agent Instructions:
### Pipeline Integration
- After creating PR, check pipeline status
- If pipeline fails, analyze logs and fix issues
- Re-run pipelines after fixes
- Only merge when all checks pass
Available Azure DevOps MCP Tools
get_work_item: Fetch work item detailscreate_work_item: Create bugs, features, tasksupdate_work_item: Update fields, add commentslist_work_items: Query with WIQLget_repository: Repository informationcreate_pull_request: Create PRsget_pipeline: Check pipeline statusrun_pipeline: Trigger pipeline runs
Integration 3: Jira
Setting Up Jira MCP Server
Jira integration provides access to issues, projects, and workflows.
Configuration Example:
{
"mcpServers": {
"jira": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-jira"],
"env": {
"JIRA_URL": "https://your-company.atlassian.net",
"JIRA_EMAIL": "your-email@company.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
Use Cases and Examples
Example 1: Complete Bug Fix Workflow
Agent Instructions:
## Jira Integration Workflow
### Bug Fix Process
1. When fixing a Jira issue:
- Fetch issue using `get_issue` with issue key (e.g., PROJ-123)
- Read summary, description, and comments
- Check attachments for screenshots/logs
- Review linked issues and subtasks
- Identify root cause in codebase
- Implement fix with proper error handling
- Create branch: `fix/{issue-key}-{summary-slug}`
- Write commit message: `fix({issue-key}): {summary}`
- Create PR and link in Jira
- Add comment: "Fix implemented in PR #X"
- Transition issue to "In Review" when PR created
- Transition to "Done" when PR merged
### When to Use Jira MCP Tools
- **get_issue**: Read issue details, comments, attachments
- **create_issue**: Create bugs from code analysis or user reports
- **update_issue**: Add comments, update fields, transition status
- **search_issues**: Find related issues using JQL
- **add_comment**: Add progress updates or findings
- **transition_issue**: Move through workflow states
Workflow Example:
You: "Fix Jira issue DEV-567 - API returns 500 for invalid date format"
Agent:
1. Fetches DEV-567 from Jira
2. Reads: "POST /api/events with date='2025-13-45' causes 500 error"
3. Finds API endpoint and date parsing logic
4. Identifies missing validation
5. Creates branch: `fix/DEV-567-invalid-date-handling`
6. Adds date validation and proper error response
7. Adds test cases for invalid dates
8. Creates PR: "fix(DEV-567): Add date validation to prevent 500 errors"
9. Comments on Jira: "Fix implemented. Added validation for date format. PR: #123"
10. Transitions issue to "In Review"
Example 2: Automated Issue Creation
Agent Instructions:
### Issue Creation from Code Analysis
When agent identifies potential issues:
- Create Jira issue with:
- Clear summary
- Detailed description with code references
- Severity/priority based on impact
- Labels for categorization
- Link to related code/files
Available Jira MCP Tools
get_issue: Fetch issue detailscreate_issue: Create new issuesupdate_issue: Update fieldssearch_issues: JQL queriesadd_comment: Add commentstransition_issue: Change workflow stateget_projects: List accessible projects
Integration 4: Database Connections
Setting Up Database MCP Servers
Database integrations allow AI assistants to query and understand your data structure, making them invaluable for data-driven fixes and feature development.
PostgreSQL Setup
Configuration Example:
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"POSTGRES_CONNECTION_STRING": "postgresql://user:password@host:5432/database"
}
}
}
}
SQL Server Setup
Configuration Example:
{
"mcpServers": {
"sql-server": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sql-server"],
"env": {
"SQL_SERVER_CONNECTION_STRING": "Server=server;Database=db;User Id=user;Password=pass;"
}
}
}
}
Use Cases and Examples
Example 1: Data-Driven Bug Investigation
Agent Instructions:
## Database Integration Workflow
### Using Database Tools for Bug Fixes
1. When investigating data-related bugs:
- Use `query` to examine affected records
- Check data integrity and constraints
- Identify patterns in problematic data
- Understand schema relationships
- Propose schema changes if needed
- Write migration scripts following project conventions
### When to Use Database MCP Tools
- **query**: Execute SELECT queries to investigate data
- **list_tables**: Understand database structure
- **describe_table**: Get schema details for a table
- **execute**: Run DML/DDL (use with caution, prefer read-only)
- **get_schema**: Full database schema information
### Safety Guidelines
- Prefer read-only queries for investigation
- Always review schema changes before execution
- Use transactions for data modifications
- Test queries on non-production data first
Workflow Example:
You: "Investigate why user accounts are being created with duplicate emails"
Agent:
1. Uses `list_tables` to find users table
2. Uses `describe_table` to check constraints
3. Queries: "SELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*) > 1"
4. Finds duplicates exist
5. Checks if unique constraint exists on email column
6. Identifies missing unique constraint
7. Creates migration script to add constraint
8. Creates data cleanup script for existing duplicates
9. Updates application code to handle constraint violations gracefully
Example 2: Feature Development with Database Context
Agent Instructions:
### Feature Development with Database
When implementing features requiring database changes:
1. Query existing schema to understand current structure
2. Identify required tables, columns, indexes
3. Design schema changes following project patterns
4. Create migration scripts
5. Update ORM models/entities
6. Implement application code
7. Add tests for new database operations
Workflow Example:
You: "Add user preferences feature - users can save their UI theme and language"
Agent:
1. Queries users table schema
2. Checks if preferences table exists
3. Designs: Create user_preferences table with user_id FK
4. Creates migration: Add table with theme and language columns
5. Updates User entity/model
6. Implements PreferencesService
7. Adds API endpoints
8. Creates tests for preferences CRUD operations
Available Database MCP Tools
PostgreSQL:
query: Execute SQL querieslist_tables: List all tablesdescribe_table: Table schema detailsget_schema: Full database schema
SQL Server:
execute_query: Run SQL querieslist_databases: List databaseslist_tables: List tables in databaseget_table_schema: Table structureexecute_stored_procedure: Run stored procedures
Comprehensive Agents.md Configuration
Here's a complete Agents.md example that combines all these integrations:
# Agent Workflow Instructions
## General Principles
- Always pull from main/develop before creating feature branches
- Follow conventional commit messages
- Write self-documenting code
- Include error handling and logging
- Add tests for new features and bug fixes
## Issue Tracker Integration
### GitHub Issues
When fixing GitHub issues:
1. Fetch issue details: `get_issue({number})`
2. Create branch: `fix/issue-{number}-{slug}`
3. Implement fix with tests
4. Commit: `fix: {title} (closes #{number})`
5. Create PR with issue reference
6. Link PR in issue comments
### Azure DevOps Work Items
When fixing work items:
1. Fetch work item: `get_work_item({id})`
2. Create branch: `bugfix/{id}-{slug}`
3. Commit: `fix: {title} (AB#{id})`
4. Create PR and link to work item
5. Update work item status
### Jira Issues
When fixing Jira issues:
1. Fetch issue: `get_issue({key})`
2. Create branch: `fix/{key}-{slug}`
3. Commit: `fix({key}): {summary}`
4. Create PR and comment on Jira
5. Transition issue appropriately
## Database Operations
### Investigation Workflow
1. Use `list_tables` to understand structure
2. Use `describe_table` for schema details
3. Query data to identify patterns
4. Propose schema changes if needed
5. Create migration scripts
### Feature Development
1. Query existing schema
2. Design new tables/columns
3. Create migrations following project patterns
4. Update models/entities
5. Implement application code
6. Add integration tests
### Safety Rules
- Prefer read-only queries for investigation
- Always review schema changes
- Use transactions for modifications
- Test on non-production first
## When to Use Which Tool
### Use GitHub MCP when:
- Working with GitHub-hosted repositories
- Need to search code across repositories
- Creating PRs in GitHub
- Managing GitHub issues
### Use Azure DevOps MCP when:
- Working in Azure DevOps organizations
- Managing work items and boards
- Creating PRs in Azure Repos
- Checking pipeline status
### Use Jira MCP when:
- Team uses Jira for issue tracking
- Need to follow specific workflows
- Managing sprints and epics
- Integrating with Jira automation
### Use Database MCP when:
- Investigating data-related bugs
- Understanding schema for feature development
- Validating data integrity
- Creating migrations
## Code Quality Standards
- TypeScript strict mode
- ESLint compliance
- 80%+ test coverage
- Meaningful variable names
- Comprehensive error handling
- Logging for debugging
## Testing Requirements
- Unit tests for business logic
- Integration tests for APIs
- Database tests for data operations
- E2E tests for critical flows
Real-World Workflow Examples
Example 1: End-to-End Bug Fix
Scenario: Jira issue PROJ-789 reports that user registration fails for certain email domains.
You: "Fix PROJ-789 - registration fails for .edu emails"
Agent Workflow:
1. Fetches PROJ-789 from Jira
- Reads: "Users with .edu emails can't register. Error: 'Invalid domain'"
- Checks comments and attachments
2. Investigates codebase
- Searches for email validation logic
- Finds domain whitelist configuration
- Identifies .edu missing from whitelist
3. Checks database
- Queries users table to see if any .edu emails exist
- Confirms none registered successfully
4. Implements fix
- Updates domain whitelist configuration
- Adds .edu and other educational domains
- Updates validation logic
5. Creates branch and PR
- Branch: `fix/PROJ-789-edu-email-support`
- Commit: `fix(PROJ-789): Add .edu domain to email whitelist`
- PR: Includes description, test results, screenshots
6. Updates Jira
- Comments: "Fix implemented. Added .edu and other educational domains to whitelist. PR: #456"
- Transitions to "In Review"
- Links PR to issue
Example 2: Database Schema Investigation
Scenario: Performance issue reported - user dashboard loads slowly.
You: "Investigate slow dashboard performance"
Agent Workflow:
1. Fetches related issues
- Searches for performance-related tickets
- Finds PERF-123: "Dashboard takes 10+ seconds to load"
2. Examines database
- Lists tables: users, orders, products, etc.
- Describes dashboard-related tables
- Queries: "EXPLAIN ANALYZE SELECT ..." for dashboard query
- Identifies missing indexes on frequently queried columns
3. Analyzes code
- Finds dashboard query implementation
- Identifies N+1 query problem
- Finds missing database indexes
4. Implements fixes
- Creates migration to add indexes
- Optimizes query to use joins instead of N+1
- Adds query result caching
5. Creates PR
- Branch: `perf/PERF-123-dashboard-optimization`
- Includes migration, code changes, performance test results
- Documents before/after metrics
6. Updates issue
- Comments with performance improvements
- Attaches query execution plans
Best Practices for MCP Workflows
1. Security Considerations
- Never commit tokens: Store MCP credentials in environment variables or secure configuration
- Use read-only access when possible: Limit database permissions for investigation
- Review agent actions: Always review PRs and database changes before merging
- Rotate credentials regularly: Keep API tokens and database passwords updated
2. Error Handling
Configure agents to handle failures gracefully:
## Error Handling
- If MCP tool fails, retry once with exponential backoff
- If issue/PR creation fails, save work locally and notify user
- If database query fails, log error and suggest manual investigation
- Always provide fallback options when automation fails
3. Workflow Optimization
- Batch operations: Group related MCP calls when possible
- Cache results: Don't repeatedly fetch the same issue/work item
- Parallel operations: Fetch issue details and examine codebase simultaneously
- Progressive disclosure: Start with high-level information, drill down as needed
4. Team Collaboration
- Clear commit messages: Make it easy for reviewers to understand changes
- Descriptive PRs: Include context, testing, and related issues
- Update tickets: Keep stakeholders informed with comments and status updates
- Document patterns: Share successful MCP workflows with the team
Troubleshooting Common Issues
Issue: MCP Server Not Connecting
Symptoms: Agent can't access GitHub/Jira/database
Solutions:
- Verify MCP server configuration in settings
- Check authentication tokens are valid
- Ensure network connectivity
- Review MCP server logs for errors
- Test MCP connection manually
Issue: Agent Creates Incorrect PRs
Symptoms: PRs missing information or linking wrong issues
Solutions:
- Enhance
Agents.mdwith specific PR templates - Provide examples of good PRs in documentation
- Review and refine agent instructions
- Use interactive mode for critical PRs
Issue: Database Queries Timing Out
Symptoms: Slow or failed database operations
Solutions:
- Use read-only queries for investigation
- Add query timeouts in MCP configuration
- Optimize queries before execution
- Consider querying smaller datasets
Conclusion
MCP transforms AI coding assistants from code generators into comprehensive development workflow orchestrators. By connecting to GitHub, Azure DevOps, Jira, and databases, agents can:
- Understand context from multiple sources
- Execute complex workflows autonomously
- Maintain consistency across tools and platforms
- Accelerate development by automating repetitive tasks
The key to success is:
- Proper configuration of MCP servers with secure credentials
- Clear instructions in
Agents.mdthat define workflows - Appropriate tool selection based on your team's stack
- Continuous refinement of agent instructions based on results
Start with simple workflows, gradually expand agent capabilities, and always review agent output before merging. With proper setup, MCP can significantly enhance your development productivity while maintaining code quality and team collaboration standards.
Next Steps
- Set up MCP servers for your primary tools (GitHub/Jira/database)
- Create comprehensive
Agents.mdwith your team's workflows - Test with simple tasks before automating complex workflows
- Document successful patterns and share with your team
- Iterate and improve based on real-world usage
Remember: MCP is a powerful tool, but it works best when guided by clear instructions and reviewed by experienced developers. The combination of AI capabilities and human oversight creates the most effective development workflows.
Happy coding with MCP!