An Envoy ext-proc to configure and invoke guardrails for MCP Gateway.
- Expects configured kubectl in cli
- Use pre-built image to deploy
git clone https://github.com/kagenti/plugins-adapter.git cd plugins-adapter make deploy_quay
- Build protobufs
python3 -m venv .venv source .venv/bin/activate ./proto-build.sh - Verify src folder contains
/envoy,/validate,/xds,/udpa - Deploy to kind cluster
make all
- Update
resources/config/config.yamlwith list of plugins make all
- Install protoc. See instructions if needed.
- Install the proto compiler and tools:
pip install -r requirements-proto.txt- Build the python
envoyprotobufs
- Code to help pull and build the python code from proto files:
https://github.com/cetanu/envoy_data_plane.git - Run:
python build.py. NOTE: This will build the envoy protos insrc/envoy_data_plane_pb2/Copy thesrc/envoy_data_plane_pb2/envoydirectory to where you need it.
cd ..
git clone git@github.com:cetanu/envoy_data_plane.git
cd envoy_data_plane
python build.py
cd ..
cp -r envoy_data_plane/src/envoy_data_plane_pb2/envoy plugins-adapter/src/- Get the python xds protobufs:
git clone https://github.com/cncf/xds.git
cp -rf xds/python/xds xds/python/validate xds/python/udpa plugins-adapter/src/NOTE: This repo contains the python code for validate, xds, and udpa. Go to folder python. Copy the needed folders or run
setup.py to install.
- In the end you need
envoy,validate,xds,udpapython protobufs folders copied intosrcto run example server.py pip install -r requirements.py- Run
python server.py
cd plugins-adapter
make all
- From mcp-gateway folder:
make debug-envoy-impl