- Home
- MCP servers
- Cloud Data Loss Prevention Dlp API
Cloud Data Loss Prevention Dlp API
- python
0
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-cloud-data-loss-prevention-dlp-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "{...}",
"SECURITY": "YOUR_API_KEY",
"CONFIG_PATH": "mcp_server/mcp_config.json"
}
}
}
}You run an MCP server that exposes the Google Cloud DLP API via its OpenAPI specification. This server implements the Model Context Protocol to let clients interact with the API in a structured, scalable way, enabling advanced tooling, context-aware requests, and consistent client-server communication.
How to use
Start the MCP server locally to expose the Google DLP v2 API as an MCP endpoint. You will run a Python command that launches the MCP runtime in stdio mode, which then accepts context-aware requests from your MCP client. Use the provided environment variables to point to a configuration file or inline configuration as needed.
To connect from an MCP client, start the server and point your client at the local stdio channel. The server will read configuration from a JSON file if specified, or from inline JSON provided via environment variables. Ensure your client uses the MCP protocol to initialize a session, negotiate capabilities, and perform API actions through the MCP interface rather than direct HTTP calls.
How to install
Prerequisites: Python 3.9 or newer, pip, and uv (optional for alternative running methods). Ensure your environment has these tools installed before proceeding.
# Prerequisites
python --version
pip --version
uv --version 2>/dev/null || echo 'uv not installed; an alternative runner may be used'
# Install dependencies (editable dev mode)
pip install -e ".[dev]"
# Alternative with uv if desired
uv pip install --editable ".[dev]"
Additional configuration and notes
You can configure the MCP server using environment variables. The following are supported inputs.
CONFIG_PATH: Path to a JSON configuration file (for example, mcp_server/mcp_config.json). This file defines MCP-specific settings for the server.
CONFIG: A JSON string containing the configuration for the MCP server.
SECURITY: Environment variables that control security parameters such as API keys or access controls used by the MCP server.
Development and quality tools
This project uses several tools to maintain code quality and reliability.
Linting and formatting are performed with ruff. Static type checking is done with mypy, and tests run with pytest.
Available tools
Linting
Check code quality and style using ruff to catch syntax and formatting issues.
Formatting
Format code with ruff to ensure consistent style across the project.
Static analysis
Run static analysis tools (mypy, bandit, semgrep) to detect type issues and potential security problems.
Testing
Execute tests with pytest and generate coverage reports to validate changes.
Pre-commit hooks
Automatically run linting, formatting, and basic checks before committing changes.
Build and publish
Use Hatch to build and publish the MCP package.