AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP unreviewed MIT Self-run

Hackster AIAgenticProtocols MCP A2A ACP

mcp-lazauk-hackster-aiagenticprotocols-mcp-a2a-acp · by LazaUK

Hackster Learning Series about AI Agentic protocols (MCP, A2A, ACP) with practical code examples.

No reviews yet
0 installs
22 views
0.0% view→install

Install

$ agentstack add mcp-lazauk-hackster-aiagenticprotocols-mcp-a2a-acp

Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.

Security review

⚠ Flagged

1 finding(s); flagged for manual review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures
  • high Dangerous shell/eval execution.

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution Used
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Reliability & compatibility

Not yet reviewed
0 installs to date
no reviews yet
stale · 1y ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Hackster AIAgenticProtocols MCP A2A ACP? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Hackster Learning Series: AI Agentic Protocols

This GitHub repo complements The Learning Series articles on Hackster.io about AI Agentic Protocols. It covers:

  • the Model Context Protocol (MCP) for dynamic tool and data access,
  • the Agent2Agent Protocol (A2A) for direct agent collaboration,
  • and the Agent Communication Protocol (ACP) for robust, interoperable communication.

The repo includes Python code to jump-start practical implementation of these protocols, offering immediate application opportunities.

📑 Table of contents:

  • [Environment Setup](#environment-setup)
  • [Part 1: Model Context Protocol (MCP)](#part-1-model-context-protocol-mcp)
  • [Part 2: Agent2Agent Protocol (A2A)](#part-2-agent2agent-protocol-a2a)
  • [Part 3: Agent Communication Protocol (ACP)](#part-3-agent-communication-protocol-acp)
  • [Demo videos on YouTube](#demo-videos-on-youtube)

Environment Setup

  1. Install the required Python packages, listed in the provided requirements.txt:

``` PowerShell pip install -r requirements.txt

2. If using Azure OpenAI as your AI backend, set the following environment variables:

| Variable                | Description                                      |
| ----------------------- | ------------------------------------------------ |
| `AOAI_API_BASE`         | Base URL of the Azure OpenAI endpoint            |
| `AOAI_API_VERSION`      | API version of the Azure OpenAI endpoint         |
| `AOAI_DEPLOYMENT`       | Deployment name of the Azure OpenAI model        |

## Part 1: Model Context Protocol (MCP)
This section demonstrates how an AI agent can dynamically discover and use external tools. The implementation uses an **MCP Server** (`MCPServer_HomeAutomation.py`) to expose home automation functionalities (tools) and an **MCP Client** (`MCPClient_GradioUI.py`) as a Gradio UI for user interaction.

1.  **Defining MCP Tools and Resources (MCP Server):** functions decorated with `@mcp.tool()` or `@mcp.resource()` in the `MCPServer_HomeAutomation.py` file define callable actions (Tools) or retrievable data (Resources) for the AI.

    ``` Python
    from mcp.server.fastmcp import FastMCP
    mcp = FastMCP("Home Automation")

    @mcp.tool()
    def control_light(action: str) -> str: # Generalized snippet
        # ...
        return "Light controlled."

    @mcp.resource("home://device_status")
    def get_device_status() -> str: # Generalized snippet
        # ...
        return "{}"

    if __name__ == "__main__":
        mcp.run() # Starts the MCP server
    ```

2.  **Establishing MCP Server Connection (MCP Client):** the `MCPClient_GradioUI.py` starts the server as a subprocess and connects using `MCPServerStdio` to enable tool discovery.

    ``` Python
    import subprocess
    from agents.mcp import MCPServerStdio
    
    server_process = subprocess.Popen([...]) # Start server

    mcp_server = MCPServerStdio(...)
    await mcp_server.__aenter__() # Initialize connection
    ```

3.  **Initialising AI Agent with MCP Servers (MCP Client):**
    An `Agent` is initialised with the connected `mcp_servers`. The agent's instructions are dynamically updated based on MCP tool availability.

    ``` Python
    from agents import Agent, OpenAIChatCompletionsModel
    
    agent = Agent(
        name="Home Assistant",
        instructions="Use tools...",
        model=OpenAIChatCompletionsModel(...),
        mcp_servers=[mcp_server], # Link MCP server
    )
    ```

4.  **Processing User Input and Running Agent (MCP Client):** when a user inputs a query, `Runner.run()` is invoked. The AI model, aware of the MCP tools, decides whether to call a relevant tool or access a resource via the MCP layer to fulfill the request.

    ```Python
    from agents import Runner
    
    async def process_user_input(user_input, agent):
        result = await Runner.run(starting_agent=agent, input=user_input)
        return result.final_output
    ```

> [!NOTE]
> Hackster article about MCP can be found [here](https://www.hackster.io/news/ai-agentic-protocols-part-1-model-context-protocol-mcp-f9c7d198fe4c).

## Part 2: Agent2Agent Protocol (A2A)

> [!Caution]
> Work in progress. To be updated soon!

## Part 3: Agent Communication Protocol (ACP)

> [!Caution]
> Work in progress. To be updated soon!

## Demo videos on YouTube

- [AI Agentic protocols: Part 1 - MCP (Home Automation UI demo)](https://youtu.be/HG9CIeBkco4)
- [Home Automation with MCP: Behind the Code](https://youtu.be/EtJR4DkAXgs)

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [LazaUK](https://github.com/LazaUK)
- **Source:** [LazaUK/Hackster-AIAgenticProtocols--MCP-A2A-ACP](https://github.com/LazaUK/Hackster-AIAgenticProtocols--MCP-A2A-ACP)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.