Skip to main content
Glama
ag2-mcp-servers

Traffic Director MCP Server

MCP-сервер

Этот проект представляет собой сервер MCP (Multi-Agent Conversation Protocol) для указанного URL-адреса OpenAPI - https://api.apis.guru/v2/specs/googleapis.com/trafficdirector/v2/openapi.json , автоматически сгенерированный с помощью конструктора MCP AG2.

Предпосылки

  • Питон 3.9+

  • пип и уф

Related MCP server: Cloud Monitoring API Server

Установка

  1. Клонируйте репозиторий:

    git clone <repository-url>
    cd mcp-server
  2. Установка зависимостей: Скрипт .devcontainer/setup.sh управляет установкой зависимостей с помощью pip install -e ".[dev]" . Если вы не используете контейнер dev, вы можете запустить эту команду вручную.

    pip install -e ".[dev]"

    В качестве альтернативы вы можете использовать uv :

    uv pip install --editable ".[dev]"

Разработка

В этом проекте используется ruff для линтинга и форматирования, mypy для статической проверки типов и pytest для тестирования.

Линтинг и форматирование

Чтобы проверить наличие проблем с линтингом:

ruff check

Чтобы отформатировать код:

ruff format

Эти команды также доступны через скрипт scripts/lint.sh .

Статический анализ

Чтобы запустить статический анализ (mypy, bandit, semgrep):

./scripts/static-analysis.sh

Этот скрипт также настроен как pre-commit hook в .pre-commit-config.yaml .

Проведение тестов

Для запуска тестов с покрытием:

./scripts/test.sh

Это запустит pytest и сгенерирует отчет о покрытии. Для объединенного отчета и очистки вы можете использовать:

./scripts/test-cov.sh

Предварительные фиксации Хуков

Этот проект использует pre-commit hooks, определенные в .pre-commit-config.yaml . Чтобы установить hooks:

pre-commit install

Хуки будут запускаться автоматически перед каждым коммитом.

Запуск сервера

Сервер MCP можно запустить с помощью скрипта mcp_server/main.py . Он поддерживает различные транспортные режимы (например, stdio , sse ).

Для запуска сервера (например, в режиме stdio):

python mcp_server/main.py stdio

Сервер можно настроить с помощью переменных среды:

  • CONFIG_PATH : Путь к файлу конфигурации JSON (например, mcp_server/mcp_config.json ).

  • CONFIG : строка JSON, содержащая конфигурацию.

  • SECURITY : переменные среды для параметров безопасности (например, ключи API).

Подробную информацию о том, как они загружаются, см. в блоке if __name__ == "__main__": в mcp_server/main.py.

Файл tests/test_mcp_server.py демонстрирует, как запустить сервер и взаимодействовать с ним программным способом для тестирования.

Строительство и издательское дело

Этот проект использует Hatch для сборки и публикации. Чтобы собрать проект:

hatch build

Чтобы опубликовать проект:

hatch publish

Эти команды также доступны через скрипт scripts/publish.sh .

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • The Google Compute Engine MCP server is a fully-managed Model Context Protocol server that provides tools to manage Google Compute Engine resources through AI agents. It enables capabilities including instance management (creating, starting, stopping, resetting, listing), disk management, handling instance templates and group managers, viewing machine and accelerator types, managing images, and accessing reservation and commitment information. The server operates as a zero-deployment, enterprise-grade endpoint at https://compute.googleapis.com/mcp with built-in IAM-based security.

  • The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costs—all without needing to parse text output or use complex kubectl commands.

  • The Google Maps MCP server is a fully-managed server provided by the Maps Grounding Lite API that connects AI applications to Google Maps Platform services. It provides three main tools for building LLM applications: searching for places, looking up weather information, and computing routes with details like distance and travel time. The server acts as a proxy that translates Google Maps data into a format that AI applications can understand, enabling agents to accurately answer real-world location and travel queries.

  • The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ag2-mcp-servers/traffic-director-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server