home / mcp / discovery engine mcp server

Discovery Engine MCP Server

MCP Server generated by mcp.ag2.ai

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ag2-mcp-servers-discovery-engine-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "JSON string containing the configuration",
        "SECURITY": "Environment variables for security parameters (e.g., API keys)",
        "CONFIG_PATH": "Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)"
      }
    }
  }
}

You run an MCP Server to expose and handle a specific OpenAPI-defined API for clients to interact with in a standardized, context-aware manner. This server acts as a gateway that translates client requests into actions against the underlying API surface, enabling consistent, protocol-aware communication and tooling for your applications.

How to use

Start your MCP server in a local, standard I/O mode and connect your MCP client to it. You will configure and run the server once, then point your client at the local process to exchange requests and receive responses in the MCP format. Use this setup to validate end-to-end flows such as discovery, context handling, and action execution against the API surface defined by the OpenAPI spec.

How to install

Prerequisites you need on your machine before installing the MCP server include Python 3.9 or newer, and the tools needed to manage dependencies and run the server.

Step 1: Prepare your environment.

Step 2: Clone the server repository.

Step 3: Install dependencies.

Step 4: Run the server in stdio mode.

Additional notes

Configuration is driven by environment variables. You can point the server at a configuration file or pass a configuration payload directly. The key environment variables are CONFIG_PATH for the path to a JSON configuration file, CONFIG for a JSON string containing the configuration, and SECURITY for security-related parameters such as API keys.

Troubleshooting and tips

If you encounter issues starting the server, ensure you are using Python 3.9+ and that all dependencies installed without errors. Check that the environment variables are set correctly and that the configuration file (if used) is valid JSON. Review common log messages to identify misconfigurations or missing parameters.

Available tools

ruff

Linting and formatting for Python code to enforce style and catch issues.

mypy

Static type checking to ensure type correctness across the codebase.

pytest

Run tests to verify functionality and detect regressions.

hatch

Build and publish the MCP server package.