[TERMINAL · SKILLS]
> mounting /skills...
> indexing skill manifests...
> linking agents: claude · codex · gemini · cursor
> ready.
[░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0%
Use Cases/Build an AI Agent System with MCP Tools and A2A Delegation

Build an AI Agent System with MCP Tools and A2A Delegation

Build a multi-agent system where a coordinator agent uses MCP servers for local tool access (database, files, APIs) and delegates specialized tasks to external agents via A2A protocol — creating a composable AI architecture where agents discover, communicate, and collaborate across organizational boundaries.

Data & AI#mcp#ai-agents#tools#integration#protocol
Works with:claude-codeopenai-codexgemini-clicursor

Skills stack · 5 skills

Avg quality 89/100·All SAFE
>

mcp-server-builder

v1.1.0

Build Model Context Protocol (MCP) servers that connect AI agents to external services and data sources. Use when a user asks to create an MCP server, build an MCP tool, connect an AI agent to an API, create a tool server for Claude, build MCP resources, or expose a database/service via MCP. Generates TypeScript or Python MCP servers with tools, resources, and prompts following the official MCP specification.

87/100 quality
2.42× impact
SAFE· stale score
View skill
>

a2a-protocol

v1.1.0

Builds Agent2Agent (A2A) servers and clients, the open protocol (originally from Google, now under the Linux Foundation) that lets AI agents from different frameworks call each other. Use when the user wants to create an A2A-compliant agent, build an Agent Card, implement task management, connect agents across frameworks, set up agent discovery, handle streaming responses, implement push notifications, or orchestrate multi-agent workflows. Trigger words: a2a, agent to agent, agent2agent, a2a protocol, a2a server, a2a client, agent card, agent interoperability, agent collaboration, multi-agent, agent discovery, a2a sdk, a2a task.

87/100 quality
2.22× impact
SAFE· stale score
View skill
>

openai-agents

v1.1.0

The OpenAI Agents SDK is a Python framework (openai-agents) for building agents that call tools, hand work to other agents, run guardrails and stream results, with built-in tracing and MCP support. Use when building a multi-agent workflow with OpenAI models, adding function tools, handoffs, input guardrails or sessions, or when the user mentions openai-agents, Runner.run, or the Agents SDK (the successor to Swarm).

77/100 quality
8.70× impact
SAFE· stale score
View skill
>

langfuse

v1.1.0

Langfuse is an open-source LLM engineering platform that records traces of LLM calls, versions prompts, scores outputs and runs experiments on datasets. Use when asked to add observability to an LLM or RAG app, trace OpenAI or Vercel AI SDK calls, track token cost and latency, manage prompts outside the code, score outputs, build an evaluation dataset, or self-host Langfuse.

93/100 quality
10.00× impact
SAFE· stale score
View skill
>

fastmcp

v1.0.0

FastMCP is a Python framework for building Model Context Protocol (MCP) servers and clients: a decorated Python function becomes a tool, resource or prompt that an AI agent can call, with the schema generated from type hints. Use when someone asks to "build an MCP server in Python", "create a FastMCP server", "expose this function to Claude as a tool", "turn our OpenAPI spec into MCP tools", "test my MCP server", "call an MCP server from Python", or "install my server into Claude Code or Cursor". Covers tools, resources and prompts, stdio and HTTP transports, the fastmcp CLI, in-memory tests, token authentication, and generation from OpenAPI.

100/100 quality
10.00× impact
SAFE· stale score
View skill
$

Leo manages DevOps at a 50-person startup. The team has scattered tooling: Jira for tasks, GitHub for code, Datadog for monitoring, PagerDuty for incidents, and Confluence for docs. Each tool has its own interface, and context switching kills productivity. Leo wants a single AI assistant that can access all tools via MCP and delegate specialized tasks (code review, security scanning) to external AI agents via A2A.

Step 1: MCP Servers for Internal Tools

typescript
// mcp-servers/jira-server.ts — MCP server for Jira
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new Server(
  { name: "jira", version: "1.0.0" },
  { capabilities: { tools: {}, resources: {} } },
);

server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [
    {
      name: "create_ticket",
      description: "Create a Jira ticket",
      inputSchema: {
        type: "object",
        properties: {
          project: { type: "string", description: "Project key (e.g., DEV)" },
          title: { type: "string" },
          description: { type: "string" },
          type: { type: "string", enum: ["bug", "story", "task"] },
          priority: { type: "string", enum: ["low", "medium", "high", "critical"] },
          assignee: { type: "string", description: "Assignee email" },
        },
        required: ["project", "title", "type"],
      },
    },
    {
      name: "search_tickets",
      description: "Search Jira tickets with JQL",
      inputSchema: {
        type: "object",
        properties: {
          jql: { type: "string", description: "JQL query" },
          maxResults: { type: "number", default: 10 },
        },
        required: ["jql"],
      },
    },
  ],
}));

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  const { name, arguments: args } = request.params;

  if (name === "create_ticket") {
    const ticket = await jiraClient.createIssue({
      fields: {
        project: { key: args.project },
        summary: args.title,
        description: { type: "doc", content: [{ type: "paragraph", content: [{ type: "text", text: args.description || "" }] }] },
        issuetype: { name: args.type },
        priority: { name: args.priority || "medium" },
      },
    });
    return { content: [{ type: "text", text: `Created ${ticket.key}: ${args.title}` }] };
  }

  if (name === "search_tickets") {
    const results = await jiraClient.searchJira(args.jql, { maxResults: args.maxResults });
    const formatted = results.issues.map(
      (i: any) => `${i.key} [${i.fields.status.name}] ${i.fields.summary}`
    ).join("\n");
    return { content: [{ type: "text", text: formatted || "No tickets found." }] };
  }
});

const transport = new StdioServerTransport();
await server.connect(transport);

Step 2: A2A Client for External Agent Delegation

python
# agents/coordinator.py — Main agent with MCP tools + A2A delegation
from agents import Agent, Runner, function_tool
from agents.mcp import MCPServerStdio
from a2a.client import A2AClient

# Discover external agents
code_review_agent = A2AClient("https://review.external-service.com")
security_scan_agent = A2AClient("https://security.external-service.com")

@function_tool
async def delegate_code_review(pr_url: str, focus_areas: str = "") -> str:
    """Delegate a code review to an external AI code review agent.

    Args:
        pr_url: GitHub pull request URL
        focus_areas: Specific areas to focus the review on
    """
    task = await code_review_agent.send_task(
        message=Message(role="user", parts=[
            TextPart(text=f"Review this PR: {pr_url}. Focus: {focus_areas or 'general quality'}"),
        ]),
    )
    result = await wait_for_completion(task, timeout=120)
    return result.messages[-1].parts[0].text

@function_tool
async def delegate_security_scan(repo_url: str, branch: str = "main") -> str:
    """Delegate a security scan to an external security scanning agent.

    Args:
        repo_url: Repository URL to scan
        branch: Branch to scan
    """
    task = await security_scan_agent.send_task(
        message=Message(role="user", parts=[
            TextPart(text=f"Run security scan on {repo_url} branch {branch}"),
        ]),
    )
    result = await wait_for_completion(task, timeout=300)
    return result.messages[-1].parts[0].text

# Coordinator agent with MCP (local tools) + A2A (external agents)
async def run_coordinator():
    async with MCPServerStdio(command="node", args=["mcp-servers/jira-server.js"]) as jira_mcp, \
               MCPServerStdio(command="node", args=["mcp-servers/github-server.js"]) as github_mcp, \
               MCPServerStdio(command="node", args=["mcp-servers/datadog-server.js"]) as datadog_mcp:

        coordinator = Agent(
            name="DevOps Coordinator",
            instructions="""You are a DevOps AI assistant. You have access to:
- Jira (create/search tickets)
- GitHub (PRs, issues, code search)
- Datadog (metrics, alerts, logs)
- External code review agent (delegate PR reviews)
- External security scanner (delegate security scans)

When a user asks about incidents, check Datadog first, then correlate with recent deployments in GitHub.
For PR reviews, delegate to the code review agent.
For security concerns, delegate to the security scan agent.
Create Jira tickets for action items automatically.""",
            mcp_servers=[jira_mcp, github_mcp, datadog_mcp],
            tools=[delegate_code_review, delegate_security_scan],
        )

        result = await Runner.run(
            coordinator,
            "We had a spike in error rates at 3 AM. Investigate what deployed recently, "
            "check if there are related Jira tickets, and if you find the culprit PR, "
            "run a security scan on that branch.",
        )
        print(result.final_output)

Step 3: Observability with Langfuse

python
# All agent actions traced automatically via Langfuse
from langfuse.decorators import observe

@observe(name="coordinator-session")
async def handle_user_request(user_input: str):
    result = await run_coordinator(user_input)

    # Langfuse captures:
    # - MCP tool calls (jira search, github PR list, datadog metrics)
    # - A2A delegations (code review, security scan)
    # - Token usage per step
    # - Total latency breakdown
    return result

Results

After deploying the coordinator agent, the DevOps team reduces context switching by 70%.

  • Tool access: Single natural language interface for Jira + GitHub + Datadog (3 MCP servers)
  • Delegation: Code reviews delegated via A2A complete in 90 seconds (vs 2-hour human turnaround)
  • Incident response: Mean time to identify root cause dropped from 45 minutes to 8 minutes
  • Ticket creation: Agent auto-creates Jira tickets for 85% of identified issues
  • Security scans: Automated on every flagged PR via A2A; 12 vulnerabilities caught in first month
  • Agent composability: Adding new capabilities = adding new MCP server or A2A endpoint; zero code changes to coordinator

Related Skills

  • fastmcp — choose it to write the Jira, GitHub and Datadog tool servers from Step 1 in Python, the same language as the coordinator, instead of the TypeScript SDK

Related use cases