Contents
MCP: Real-World Workflow and Best Practices (Part 2)

Real-World Workflow: From Ticket to Deployment

Imagine Monday morning: a planning meeting and 20 tasks waiting in the backlog.

Traditional approach (without MCP)

1. Open Jira
2. Filter tasks by priority
3. Choose a task
4. Read requirements
5. Change status to "In Progress"
6. Open terminal
7. Create a branch manually:
   git checkout main
   git pull
   git checkout -b feature/PROJ-123-user-authentication
8. Open IDE
9. Start development
10. Write code
11. Write tests
12. Run tests
13. Create a PR manually
14. Write a PR description
15. Return to Jira
16. Update the ticket
17. Record hours in the time-tracking system
18. Record hours in the company ERP
19. ...

Time: ~30–45 minutes for setup alone

MCP-powered approach

You: "Claude, take the highest-priority ticket and start working on it."

Claude (via MCP):
[MCP Jira] Getting tickets...
[MCP Jira] Top priority: PROJ-123 "Implement user authentication"
[MCP Jira] Status changed: "To Do" → "In Progress"
[MCP GitHub] Creating branch: feature/proj-123-user-authentication
[MCP GitHub] Branch created from main

"I prepared task PROJ-123: implement user authentication.
Requirements:
- JWT token-based auth
- bcrypt password hashing
- Email verification
- Rate limiting

I created branch: feature/proj-123-user-authentication

Would you like me to create a development plan first?"

You: "Yes, create a plan and write test scenarios for QA."

Claude:
[Analyzing requirements]
[MCP Jira] Adding a comment with test scenarios...

"I created a development plan and added test scenarios to Jira..."

Time: ~5 minutes of setup; the rest is productive development

Complete example: an MCP server for development workflows

Here is what a server integrating the development workflow could look like:

python
# development-workflow-server.py
from mcp.server import Server
from mcp.types import Tool, Resource
import jira
import github
import subprocess

server = Server("dev-workflow")

# === JIRA TOOLS ===

@server.tool()
async def get_highest_priority_ticket(project: str) -> dict:
    """
    Get the highest-priority ticket from a project.

    Args:
        project: Project key (e.g. "PROJ")

    Returns:
        Highest-priority Jira ticket
    """
    tickets = jira_client.search_issues(
        f'project={project} AND status="To Do" ORDER BY priority DESC',
        maxResults=1
    )
    return tickets[0].raw if tickets else None

@server.tool()
async def update_ticket_status(ticket_id: str, status: str) -> dict:
    """
    Change a Jira ticket status.

    Args:
        ticket_id: Ticket ID (e.g. "PROJ-123")
        status: New status ("In Progress", "Code Review", "Done")
    """
    jira_client.transition_issue(ticket_id, status)
    return {"success": True, "ticket": ticket_id, "new_status": status}

@server.tool()
async def add_test_scenarios_to_ticket(ticket_id: str, scenarios: list[str]) -> dict:
    """
    Add test scenarios as a Jira ticket comment.

    Args:
        ticket_id: Ticket ID
        scenarios: List of test scenarios
    """
    comment = "**Test scenarios:**\n\n"
    comment += "\n".join(f"- {s}" for s in scenarios)

    jira_client.add_comment(ticket_id, comment)
    return {"success": True, "scenarios_count": len(scenarios)}

# === GITHUB TOOLS ===

@server.tool()
async def create_branch_from_ticket(
    ticket_id: str,
    ticket_summary: str,
    base_branch: str = "main",
    branch_type: str = "feature"
) -> dict:
    """
    Create a Git branch using the pattern: {type}/{ticket_id}-{slug}

    Args:
        ticket_id: Ticket ID (e.g. "PROJ-123")
        ticket_summary: Ticket summary
        base_branch: Base branch (default: "main")
        branch_type: Branch type ("feature", "bugfix", "hotfix")

    Returns:
        Information about the created branch
    """
    slug = ticket_summary.lower().replace(" ", "-")[:50]
    branch_name = f"{branch_type}/{ticket_id.lower()}-{slug}"

    # Get base branch SHA
    base_ref = github_repo.get_branch(base_branch)

    # Create new branch
    github_repo.create_git_ref(
        ref=f"refs/heads/{branch_name}",
        sha=base_ref.commit.sha
    )

    # Checkout locally
    subprocess.run(["git", "fetch"])
    subprocess.run(["git", "checkout", branch_name])

    return {
        "branch_name": branch_name,
        "base_branch": base_branch,
        "url": f"https://github.com/{github_repo.full_name}/tree/{branch_name}"
    }

@server.tool()
async def create_pull_request(
    branch_name: str,
    title: str,
    description: str,
    base_branch: str = "main"
) -> dict:
    """
    Create a pull request.

    Args:
        branch_name: Source branch name
        title: PR title
        description: PR description
        base_branch: Target branch (default: "main")
    """
    pr = github_repo.create_pull(
        title=title,
        body=description,
        head=branch_name,
        base=base_branch
    )

    return {
        "pr_number": pr.number,
        "url": pr.html_url,
        "title": title
    }

# === COMPOSITE WORKFLOWS ===

@server.tool()
async def start_work_on_ticket(project: str) -> dict:
    """
    Composite workflow:
    1. Get the highest-priority ticket
    2. Change the status to "In Progress"
    3. Create a branch

    Args:
        project: Project key
    """
    # 1. Get ticket
    ticket = await get_highest_priority_ticket(project)
    if not ticket:
        return {"error": "No tickets found"}

    ticket_id = ticket['key']
    summary = ticket['fields']['summary']

    # 2. Update status
    await update_ticket_status(ticket_id, "In Progress")

    # 3. Create branch
    branch_type = "feature" if "feature" in summary.lower() else "bugfix"
    branch_info = await create_branch_from_ticket(
        ticket_id,
        summary,
        branch_type=branch_type
    )

    return {
        "ticket": {
            "id": ticket_id,
            "summary": summary,
            "description": ticket['fields']['description']
        },
        "branch": branch_info,
        "status": "Ready to code!"
    }

if __name__ == "__main__":
    server.run()

Practical use

1. Start the MCP server

bash
# Install dependencies
pip install mcp jira pygithub

# Run server
python development-workflow-server.py

2. Configure Claude Desktop

json
{
  "mcpServers": {
    "dev-workflow": {
      "command": "python",
      "args": ["/path/to/development-workflow-server.py"],
      "env": {
        "JIRA_URL": "https://company.atlassian.net",
        "JIRA_EMAIL": "your-email@company.com",
        "JIRA_API_TOKEN": "your-jira-token",
        "GITHUB_TOKEN": "your-github-token",
        "GITHUB_REPO": "company/repository"
      }
    }
  }
}

Real-world examples

Example 1: DevOps automation

You: "Deploy the latest version to staging"

Claude:
[MCP Docker] Building image...
[MCP Docker] Image built: app:v1.2.3
[MCP Kubernetes] Applying deployment...
[MCP Kubernetes] Pods starting...
[MCP Slack] Notifying #deployments channel...
[MCP Jira] Updating release notes...

"Deployment complete:
- Image: app:v1.2.3
- Pods: 3/3 running
- Health check: ✓ passing
- Notification sent to Slack
- Release notes updated in Jira"

Example 2: Data analysis

You: "Analyze Q4 sales data and create a report"

Claude:
[MCP PostgreSQL] Querying sales data...
[MCP PostgreSQL] 15,234 records retrieved
[Analyzing data]
[MCP Google Drive] Creating report document...
[MCP Slack] Sharing with #sales team...

"I created a Q4 sales report:
- Total revenue: $1.2M (+15% vs Q3)
- Top product: Premium Plan (45% revenue)
- Report: https://drive.google.com/...
- Shared in Slack"

Example 3: Customer support

You: "Find out why customer XYZ has a payment problem"

Claude:
[MCP PostgreSQL] Checking customer records...
[MCP Stripe] Checking payment history...
[MCP Gmail] Searching support emails...
[MCP Jira] Checking open tickets...

"I found the problem:
- Customer: XYZ Corp
- Issue: Credit card expired 3 days ago
- Open ticket: SUP-789 (created yesterday)
- Last payment attempt: Failed (expired card)
- Previous tickets: 2 (resolved)

Would you like me to send a reminder to update payment details?"

Security and best practices

1. Never expose credentials in MCP server code

python
# ❌ BAD
jira_token = "your-token-here"

# ✅ GOOD
import os
jira_token = os.getenv("JIRA_API_TOKEN")

2. Implement rate limiting

python
from functools import wraps
import time

def rate_limit(calls_per_minute=60):
    def decorator(func):
        last_called = [0.0]

        @wraps(func)
        async def wrapper(*args, **kwargs):
            elapsed = time.time() - last_called[0]
            if elapsed < 60 / calls_per_minute:
                await asyncio.sleep((60 / calls_per_minute) - elapsed)

            last_called[0] = time.time()
            return await func(*args, **kwargs)

        return wrapper
    return decorator

@server.tool()
@rate_limit(calls_per_minute=30)
async def expensive_api_call():
    # ...

3. Input validation

python
from pydantic import BaseModel, validator

class TicketUpdate(BaseModel):
    ticket_id: str
    status: str

    @validator('ticket_id')
    def validate_ticket_id(cls, v):
        if not v.match(r'^[A-Z]+-\d+$'):
            raise ValueError('Invalid ticket ID format')
        return v

    @validator('status')
    def validate_status(cls, v):
        allowed = ['To Do', 'In Progress', 'Code Review', 'Done']
        if v not in allowed:
            raise ValueError(f'Status must be one of: {allowed}')
        return v

4. Logging and monitoring

python
import logging

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

@server.tool()
async def critical_operation(data: dict):
    logger.info(f"Starting critical operation: {data}")

    try:
        result = await perform_operation(data)
        logger.info(f"Operation successful: {result}")
        return result
    except Exception as e:
        logger.error(f"Operation failed: {e}")
        raise

Conclusion

Model Context Protocol opened a well of endless possibilities. You are not limited to “favorite apps”: you can choose, integrate and automate.

Key MCP benefits:

1

Standardization:

✅ one protocol for integrations
2

Flexibility:

✅ integrate anything with an API
3

Reusability:

✅ write once, use everywhere
4

Community:

✅ thousands of ready-made servers
5

Scalability:

✅ combine dozens of servers

The practical workflow from ticket to deployment shows that the future is not about replacing developers with AI; it is about augmentation, with AI as a superintelligent assistant.

The question is not “Should you use MCP?” but “Which workflow will you automate first?”


Written by a developer who built 10+ MCP servers and automated 70% of daily routines. MCP is not the future; it is the present.

Start today. Build your first MCP server. Automation is waiting.

All articles