From 4aaad15caddacb1ded234800ea9ad44324eb70b6 Mon Sep 17 00:00:00 2001 From: Shreyanand Date: Wed, 19 Mar 2025 13:10:38 -0400 Subject: [PATCH] Add MCP inspector deployment file --- prototype/frameworks/mcp/inspector/README.md | 2 + .../frameworks/mcp/inspector/deployment.yaml | 67 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 prototype/frameworks/mcp/inspector/README.md create mode 100644 prototype/frameworks/mcp/inspector/deployment.yaml diff --git a/prototype/frameworks/mcp/inspector/README.md b/prototype/frameworks/mcp/inspector/README.md new file mode 100644 index 0000000..7a0fde4 --- /dev/null +++ b/prototype/frameworks/mcp/inspector/README.md @@ -0,0 +1,2 @@ +# Note +The deployment.yaml uses the Red Hat ubi9 nodejs image to run the mcp model inspector application. The frontend of the application runs through a proxy server for connecting to MCP servers. In the current state, the application hardcodes the proxy server to `localhost` ([source](https://github.com/modelcontextprotocol/inspector/blob/main/client/src/App.tsx#L50)). This means when I access the OpenShift route, it tries to reach my local `localhost` instead of an exposed port through OpenShift. Since it can't be configured at the moment, this is blocked. \ No newline at end of file diff --git a/prototype/frameworks/mcp/inspector/deployment.yaml b/prototype/frameworks/mcp/inspector/deployment.yaml new file mode 100644 index 0000000..e93e5a5 --- /dev/null +++ b/prototype/frameworks/mcp/inspector/deployment.yaml @@ -0,0 +1,67 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mcp-inspector +spec: + replicas: 1 + selector: + matchLabels: + app: mcp-inspector + template: + metadata: + labels: + app: mcp-inspector + spec: + containers: + - name: mcp-inspector + image: registry.access.redhat.com/ubi9/nodejs-22@sha256:ae0a4313f9e709e370998b76f51e57622799c5a3155446276db5953dbcaedc05 + command: ["/bin/bash", "-c"] + args: + - "npx @modelcontextprotocol/inspector" + ports: + - containerPort: 5173 + name: http + - containerPort: 3000 + name: proxy-server + +--- +apiVersion: v1 +kind: Service +metadata: + name: mcp-inspector +spec: + type: ClusterIP + selector: + app: mcp-inspector + ports: + - name: http + protocol: TCP + port: 80 + targetPort: 5173 + +--- +apiVersion: v1 +kind: Service +metadata: + name: proxy-server +spec: + type: ClusterIP + selector: + app: mcp-inspector + ports: + - name: proxy-server + protocol: TCP + port: 80 + targetPort: 3000 + +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: mcp-inspector +spec: + to: + kind: Service + name: mcp-inspector + port: + targetPort: http \ No newline at end of file