Skip to main content
Glama
osa-ora

OCP AI Custom HR MCP Server

by osa-ora

OCP AI Custom MCP Server Demo

Demo to show how to deploy our custom HR MCP Server over OpenShift.

This is how it looks when this MCP Server deployed into OpenShift:

Steps to Run the Demo on OpenShift Environment

1) Create Project and Configurations

After login to OpenShift cluster, follow these steps:

# Create new project
oc new-project hr-mcp

# Create ConfigMap
oc create configmap hr-mcp-config \
--from-literal=DATABASE_USER=postgres \
--from-literal=DATABASE_HOST=postgresql.hr-mcp.svc.cluster.local \
--from-literal=DATABASE_PORT=5432 \
--from-literal=DATABASE_NAME=hrdb \
--from-literal=MCP_SCHEME=http \
--from-literal=MCP_HOST=0.0.0.0 \
--from-literal=MCP_PORT=8080 \
--from-literal=MCP_PATH=/mcp \
--from-literal=MCP_TRANSPORT=http \
--from-literal=DEBUG=true \
-n hr-mcp

# Create Secret
oc create secret generic hr-mcp-secret \
  --from-literal=DATABASE_USER=postgres \
  --from-literal=DATABASE_PASSWORD=postgres \
  -n hr-mcp

2) Deploy Our HR DB and initialize it

Execute the following command (or you can provision it from the OCP GUI):

oc new-app postgresql-persistent \
  --param=POSTGRESQL_USER=postgres \
  --param=POSTGRESQL_PASSWORD=postgres \
  --param=POSTGRESQL_DATABASE=hrdb \
  --name=postgresql -n hr-mcp

Login to the DB Pod and run the following commands:

psql -U postgres

CREATE DATABASE hrdb;

\q

Then install the DB schema and test data from inside the Pod:

curl -s https://raw.githubusercontent.com/osa-ora/ocp-ai-custom-mcp-demo/refs/heads/main/db_scripts/schema.sql \
| psql -U postgres -d hrdb

curl -s https://raw.githubusercontent.com/osa-ora/ocp-ai-custom-mcp-demo/refs/heads/main/db_scripts/load_sample_data.sql \
| psql -U postgres -d hrdb

3) Provision the mcp_server using S2I

Provision it and attach the configMap and Secret


oc new-app python:3.12-minimal-ubi10~https://github.com/osa-ora/ocp-ai-custom-mcp-demo --name=hr-mcp-server -n hr-mcp

oc set env deployment/hr-mcp-server --from=configmap/hr-mcp-config
oc set env deployment/hr-mcp-server --from=secret/hr-mcp-secret
oc rollout restart deployment/hr-mcp-server

if started successfully, check the logs to confirm that no issues and end points are correctly mapped:

4) Testing the MCP Server:

If you want to test it remotely then expose a route:

oc expose svc/hr-mcp-server -n hr-mcp

if you need to test it from inside OpenShift using the playground, then go to project redhat-ods-applications and edit the ConfigMap: gen-ai-aa-mcp-servers by adding the following section (Service endpoint/mcp) :

kind: ConfigMap
apiVersion: v1
metadata:
  name: gen-ai-aa-mcp-servers
  namespace: redhat-ods-applications
  ....
  ....
data:
  HR-MCP-Server: |
    {
      "url": "http://hr-mcp-server.hr-mcp.svc.cluster.local:8080/mcp",
      "description": "An MCP server for interacting with our HR DB tools."
    }

Or you can create MCPServer to auto-discovered using the OpenShift AI MCP server section

Something like this:

oc apply -f - <<EOF
apiVersion: mcp.opendatahub.io/v1alpha1
kind: MCPServer
metadata:
  name: my-hr-mcp-server
  namespace: hr-mcp
spec:
  image: image-registry.openshift-image-registry.svc:5000/test/hr-mcp-server@sha256:549f50c109f4c6d040e948edf3169fc811be7559ec171f66062fa06f0ad60929
  transportType: sse
  port: 8000
  envFrom:
    - configMapRef:
        name: hr-mcp-config
    - secretRef:
        name: hr-mcp-secret
EOF

But i didn't tested it, as i don't have the MCP Operstor enabled in my environment.

Now go to OpenShift UI, check the MCP Servers section:

Then create a playground for the MCP server and one of the existing models, and enjoy chatting to it:

To connect to it remotely from ChatBox for example, get the route URL or execute the following command.

oc get route hr-mcp-server -n hr-mcp -o jsonpath='{.spec.host}{"\n"}'

Add the http prefix and the path configured /mcp at the end, and configure it in ChatBox or any other applicaton as following:

And enjoy chatting with our HR MCP Server...

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/osa-ora/ocp-ai-custom-mcp-demo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server