- Home
- MCP servers
- Organization Policy
Organization Policy
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months 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-organization-policy-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"SECURITY": "YOUR_SECURITY_TOKEN"
}
}
}
}You set up and run an MCP Server that exposes the Google Organization Policy API through the Model Context Protocol, enabling clients to interact with policy configurations via MCP transport. This server is designed to adapt an OpenAPI spec into an MCP-compatible interface for streamlined client access and testing.
How to use
Launch the server in a local, standard input/output mode to connect your MCP client directly to the process. Start the server, then use your MCP client to send requests and receive responses in real time. The server supports multiple transport modes, including stdio, sse, and streamable-http, so you can choose the workflow that fits your environment.
How to install
Prerequisites: You need Python 3.9 or newer, pip, and uv installed on your system.
Clone the project and navigate to the MCP server directory.
git clone <repository-url>
cd mcp-server
Install dependencies for development and testing. You can use the development setup script or install manually.
pip install -e ".[dev]"
If you prefer using uv for editable installation, run this command.
uv pip install --editable ".[dev]"
Alternatively, you can run linting, formatting, and static analysis tools as part of your workflow using the provided scripts.
Configuration and running notes
You can configure the server using environment variables. The following are supported:
CONFIG_PATH: Path to a JSON configuration file (for example, mcp_server/mcp_config.json)
CONFIG: A JSON string containing the configuration
SECURITY: Environment variables for security parameters (for example, API keys)
Running the server
To start the MCP server in stdio mode, run the following command.
python mcp_server/main.py stdio
Building and tests
This project uses Hatch for building and publishing, and includes linting, static analysis, and tests to ensure code quality.
hatch build
hatch publish
Development tooling
The development workflow relies on several tools to maintain code quality and reliability.
Linting and formatting use ruff, with static type checking via mypy and additional security checks via other analysis scripts.
ruff check
ruff format
Troubleshooting and notes
If you encounter issues, verify that Python 3.9+ is being used, and that dependencies are installed with the correct editable flag. Ensure environment variables are set as needed before starting the server.
Signing and tools
The project provides scripts and commands to perform linting, static analysis, and tests as part of the development workflow.
Available tools
lint
Run linting and formatting to ensure code quality using ruff, and format code when needed.
static_analysis
Execute static analysis steps such as type checks and security scans via predefined scripts.
tests
Run the test suite with pytest and generate coverage reports to verify functionality.
pre_commit
Install and run pre-commit hooks to enforce quality before commits.