OCP AI Custom HR MCP Server

OCP AI Custom HR MCP Server

An MCP server for interacting with an HR database, enabling querying employee data and HR operations via natural language.

Category
访问服务器

README

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:

<img width="1536" height="1024" alt="HR-MCP-Server-OCP" src="https://github.com/user-attachments/assets/562d4372-7fde-4867-ad39-a38490d72e33" />

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:

<img width="1169" height="570" alt="Screenshot 2026-06-11 at 12 11 33 AM" src="https://github.com/user-attachments/assets/744a4fa9-a9ae-487a-9f5c-49b0d163e686" />

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:

<img width="1466" height="704" alt="Screenshot 2026-06-11 at 12 05 18 AM" src="https://github.com/user-attachments/assets/19924c77-fde4-4593-87ae-412bae7c7dcb" />

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

<img width="1477" height="721" alt="Screenshot 2026-06-11 at 12 04 44 AM" src="https://github.com/user-attachments/assets/1c8f1742-cf05-439d-8dd9-acf3e00e55d7" />

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:

<img width="767" height="682" alt="Screenshot 2026-06-11 at 12 07 04 AM" src="https://github.com/user-attachments/assets/2e7f2a26-11d7-4a40-97e9-bf27a714ae4a" />

And enjoy chatting with our HR MCP Server...

<img width="763" height="685" alt="Screenshot 2026-06-11 at 7 59 21 AM" src="https://github.com/user-attachments/assets/ccca83bb-7e29-418d-8c8e-84b80e569792" />

Example requests:

"leave balance for Osama Oransa?" "basic profile for Sara Ali" "Show my full profile for EMP001?" "policy for remote work?" "leave requests for Osama Oransa." "basic profile for EMP002"

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选