AI MCP Proxy

AI License Required

Set access control rules for MCP tools based on consumer groups

Define which consumer groups can access specific MCP tools in conversion-listener mode. Use default rules that apply to all tools, then override access for individual tools as needed.

For this configuration to work properly, you need to create the following Kong Gateway entities:

services:
- name: mcp-service
  url: http://host.docker.internal:3000
  routes:
  - name: mcp-route
    paths:
    - /marketplace
plugins:
  - name: key-auth
    route: mcp-route
    config:
      key_names:
        - apikey

consumer_groups:
  - name: admin
  - name: developer
  - name: suspended

consumers:
  - username: alice
    groups:
      - name: admin
    keyauth_credentials:
      - key: alice-key

  - username: bob
    groups:
      - name: developer
    keyauth_credentials:
      - key: bob-key

  - username: carol
    groups:
      - name: suspended
    keyauth_credentials:
      - key: carol-key

In conversion-listener and conversion-only modes, the plugin defines MCP tools directly from HTTP endpoint configurations. Each tool can optionally specify access control rules per consumer group.

Before using the AI MCP Proxy plugin, you’ll need an upstream HTTP API to expose. Use this mock API to test the plugin without relying on an external service. It simulates a small marketplace with sample users and orders exposed through /marketplace/users and /marketplace/{userId}/orders endpoints:

curl -s -o api.js "https://gist.githubusercontent.com/subnetmarco/5ddb23876f9ce7165df17f9216f75cce/raw/a44a947d69e6f597465050cc595b6abf4db2fbea/api.js"
npm install express
node api.js

Prerequisites

  • A running and exposed API

Set up the plugin

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!