Skip to main content
Glama
isantoro-nttdata

Test_aaa MCP Server

README.md
# ๐Ÿง  Test_aaa MCP Server

This module implements the **MCP protocol bindings** for the `Test_aaa` agent.

It auto-generates MCP compliant tools or data models and server code.

The server acts as a wrapper over the agent's async call loop and translates standard input/output formats.

---

## ๐Ÿ“„ Overview

- **Description**: MCP server generated from OpenAPI by Backstage
- **Version**: 0.1.0
- **Author**: Platform Engineering

---

## ๐Ÿ“ Module Structure

```
mcp_test_aaa/
โ”œโ”€โ”€ __init__.py
โ”œโ”€โ”€ server.py
โ”œโ”€โ”€ api/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ client.py
โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ base.py
โ””โ”€โ”€ tools/
    โ”œโ”€โ”€ __init__.py
    โ”œโ”€โ”€ pet_findbystatus.py
    โ”œโ”€โ”€ pet_findbytags.py
    โ”œโ”€โ”€ pet_petid_uploadimage.py
    โ”œโ”€โ”€ pet_petid.py
    โ”œโ”€โ”€ pet.py
    โ”œโ”€โ”€ store_inventory.py
    โ”œโ”€โ”€ store_order_orderid.py
    โ”œโ”€โ”€ store_order.py
    โ”œโ”€โ”€ user_createwitharray.py
    โ”œโ”€โ”€ user_createwithlist.py
    โ”œโ”€โ”€ user_login.py
    โ”œโ”€โ”€ user_logout.py
    โ”œโ”€โ”€ user_username.py
    โ””โ”€โ”€ user.py
```

---

## ๐Ÿš€ Running the MCP Server

Make sure dependencies are installed and environment variables are configured. Then run:

```bash
poetry run mcp_test_aaa
```

Or directly with Python:

```bash
uv run python -m mcp_test_aaa.server
```

---

## ๐ŸŒ API Endpoints

- `MCP /mcp` โ€” Streamable HTTP endpoint for MCP clients

You can test with:

```bash
curl -i http://localhost:8000/mcp
```

---

## โš™๏ธ Environment Variables

| Variable             | Description                              |
|----------------------|------------------------------------------|
| `TEST_AAA_API_URL`   | Base URL of the upstream API |
| `TEST_AAA_TOKEN`     | Token used to authenticate against the API |
| `MCP_MODE`           | Transport mode (stdio, http) |
| `MCP_HOST`           | Host to bind the MCP server |
| `MCP_PORT`           | Port to run the MCP server (default: 8000) |

---

## ๐Ÿงฐ Available Tools

The following tools are exposed by this agent via the MCP protocol. These are defined in the `tools/` directory and registered at runtime.

- `pet_petid_uploadimage.post_upload_file`
- `pet.post_add_pet`
- `pet.put_upd_pet`
- `pet_findbystatus.get_find_pets_status`
- `pet_findbytags.get_find_pets_tags`
- `pet_petid.get_pet_id`
- `pet_petid.post_upd_pet_form`
- `pet_petid.del_pet`
- `store_inventory.get_inventory`
- `store_order.post_place_order`
- `store_order_orderid.get_order_id`
- `store_order_orderid.del_order`
- `user_createwithlist.post_new_users_ls_input`
- `user_username.get_user_name`
- `user_username.put_upd_user`
- `user_username.del_user`
- `user_login.get_login_user`
- `user_logout.get_logout_user`
- `user_createwitharray.post_new_users_array_input`
- `user.post_new_user`

---

## ๐Ÿงช Testing

To test locally:

```bash
uv run python -m mcp_test_aaa.server
```

Or with the MCP Inspector:

```bash
npx @modelcontextprotocol/inspector uv run python -m mcp_test_aaa.server
```

---

## ๐Ÿ“š References

- [OpenAPI MCP Codegen](https://github.com/cnoe-io/openapi-mcp-codegen)