Sponsored by Deepsite.site

kuadrant-mcp-poc

Created By
Kuadrant6 months ago
POC for setting up Kuadrant with a mcp server running in a K8s cluster
Content

kuadrant-mcp-poc

Introduction:

This POC used the everything MCP server as it has Streamable-HTTP capabilities

Prerequisties

  • K8s cluster
  • Kuadrant installed, for more info see Kuadrant docs

Set the environment variables

export KUADRANT_ZONE_ROOT_DOMAIN=example.com # Root domain associated with the Zone ID above
export QUAY_USERNAME=xxxx # Quay username
export KUADRANT_AWS_ACCESS_KEY_ID=xxxx # AWS Key ID with access to manage the DNS Zone ID below
export KUADRANT_AWS_SECRET_ACCESS_KEY=xxxx # AWS Secret Access Key with access to manage the DNS Zone ID below

Installation

  1. Build you MCP Server image.
    docker build -t quay.io/${QUAY_USERNAME}/mcp-server-everything https://github.com/modelcontextprotocol/servers.git\#main -f src/everything/Dockerfile
    
  2. Push the image to your container registry.
   docker push quay.io/${QUAY_USERNAME}/mcp-server-everything
  1. Install the MCP Server in your K8s cluster.
   kubectl apply -f mcp-server/mcp-server-everything.yaml
  1. Ensure the MCP everything Server pod is running.
   kubectl get pods -n mcp-server
  1. Create the gateway namespace:
    kubectl create ns mcp-gateway
  1. Create the secret credentials in the same namespace as the Gateway - these will be used to configure DNS:
   kubectl -n mcp-gateway create secret generic aws-credentials \
   --type=kuadrant.io/aws \
   --from-literal=AWS_ACCESS_KEY_ID=$KUADRANT_AWS_ACCESS_KEY_ID \
   --from-literal=AWS_SECRET_ACCESS_KEY=$KUADRANT_AWS_SECRET_ACCESS_KEY
  1. Create the secret credentials in the cert-manager namespace:

   kubectl -n cert-manager create secret generic aws-credentials \
   --type=kuadrant.io/aws \
   --from-literal=AWS_ACCESS_KEY_ID=$KUADRANT_AWS_ACCESS_KEY_ID \
   --from-literal=AWS_SECRET_ACCESS_KEY=$KUADRANT_AWS_SECRET_ACCESS_KEY
  1. Create the Kuadrant Gateway:
    kubectl apply -f kuadrant/gateway.yaml
  1. Create the Lets encrypt Cluster issuer and TlS Policy:
  kubectl apply -f kuadrant/tls.yaml
**Note**: The cert can't be self signed. MCP clients dont accept self signed certs yet.

9. Create the DNSPolicy:

   kubectl apply -f kuadrant/dns.yaml
  1. After a minute, Test that the MCP server is responding
curl -v -X POST "https://api.${KUADRANT_ZONE_ROOT_DOMAIN}/mcp" \
      -H "Content-Type: application/json" \
      -H "Accept: application/json, text/event-stream" \
      -d '{
            "jsonrpc": "2.0",
            "method": "initialize",
            "params": {
              "protocolVersion": "2024-11-05",
              "capabilities": {
                "resources": {},
                "tools": {},
                "prompts": {}
              },
              "clientInfo": {
                "name": "test-curl-client",
                "version": "1.0"
              }
            },
            "id": 1
          }'
  1. Create the Rate limit policy:
    kubectl apply -f kuadrant/rlp.yaml
  1. Create the Auth policy and the API Key secrets:
   kubectl apply -f kuadrant/auth.yaml

MCP Client

In this example we are using Vscode Co pilot as our MCP client as it has capabilities to connect using Streamable HTTP

  1. Add the following to your VSCode setting.json. For more info please see the official VSCode MCP docs
"mcp": {
    "servers": {
      "my-mcp-server": {
        "type": "http",
        "url": "https://KUADRANT_ZONE_ROOT_DOMAIN_GOES_HERE/mcp",
        "headers": {
          "Authorization": "APIKEY IAMALICE"
        }
      }
    }
  },
  1. The Client should be able to use the server now and you should be able to avail of the MCP server tools. Open co pilot in vscode using ⌃⌘I and in the drop down click agent.

  2. In the chat type:

    add 500 and 500
  1. Vscode will ask you about using allowing Co pilot invoke the tool from the MCP server, ensure you allow it.

  2. The chat will output the answer and also show you it ran add from the MCP server

  3. If you leave out the Auth header in the config or ask the chat questions using the tool to many times to quickly, the auth and rate limit policies deployed will deny and limit the requests.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
WindsurfThe new purpose-built IDE to harness magic
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Tavily Mcp
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Serper MCP ServerA Serper MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™