Skip to main content
Glama
EmpCloud Product and Resource Search

EmpCloud Product and Resource Search

EmpCloud Product and Resource Search - Gemini CLI Extension

TypeScript Model Context Protocol License: MIT

A production-ready Gemini CLI extension and Model Context Protocol (MCP) server that enables developers, AI assistants, and users to search and discover public workforce management products, features, documentation, and web resources from EmpCloud.


Table of Contents

  1. Project Overview

  2. Features

  3. MCP Tools

  4. Requirements

  5. Installation & Linking

  6. Development Setup & Build

  7. Automated & Manual Testing

  8. Example Prompts

  9. Architecture & Content Source

  10. Security & Reliability

  11. Troubleshooting

  12. GitHub Publishing Instructions

  13. License


Related MCP server: workday-docs-mcp

Project Overview

When using the Gemini CLI, users frequently need up-to-date links and summaries about EmpCloud modules—such as biometric attendance, HRMS, payroll management, field force tracking, or employee monitoring (EmpMonitor).

This extension connects the Gemini CLI with the verified public WordPress REST API on empcloud.com. It queries live public content, enriches search results with verified Yoast SEO metadata and excerpts, and returns clean, clickable links directly to the user without touching private accounts or internal systems.


Features

  • Public Website Search: Live querying of EmpCloud's public WordPress REST API (/wp-json/wp/v2/search).

  • Rich Snippets & Summaries: Enriches search results with public Yoast SEO descriptions and excerpts where available.

  • Website Info Tool: Provides high-level platform information, module listings, and supported API capabilities.

  • Strict Domain Filtering: Validates all returned links against an allowlist (empcloud.com, www.empcloud.com) to guard against malicious redirections.

  • HTML Sanitization: Strips HTML formatting tags and decodes common entities (&, ’, ") into clean plain text.

  • Timeout & Error Resilience: Configurable request timeouts (default: 8s), graceful fallbacks, and user-friendly error messages.

  • Full Gemini CLI Compatibility: Includes a valid gemini-extension.json manifest utilizing the standard ${extensionPath} variable.


MCP Tools

The extension exposes two Model Context Protocol (MCP) tools:

1. search_empcloud

Searches public EmpCloud content using verified WordPress REST API endpoints.

  • Parameters:

    • query (string, required): Search keywords or phrases (e.g., "attendance", "payroll", "HRMS", "biometrics").

    • limit (number, optional, default: 5, min: 1, max: 10): Number of results to return.

  • Output: Markdown-formatted list containing page titles, clickable URLs, resource types, and summaries.

2. get_empcloud_website_info

Retrieves general platform metadata and supported modules from the EmpCloud public website.

  • Parameters: None.

  • Output: Website title, tagline, canonical URLs, supported workforce management modules, and REST API namespaces.


Requirements

  • Node.js: v18.0.0 or later (tested on Node v20.20.0 LTS)

  • npm: v9.0.0 or later

  • Gemini CLI: Google Gemini CLI (optional for local testing, required for CLI integration)


Installation & Linking

Option A: Local Development & Linking into Gemini CLI

  1. Clone or download this repository:

    git clone https://github.com/your-org/empcloud-gemini-extension.git
    cd empcloud-gemini-extension
  2. Install dependencies and compile TypeScript:

    npm install
    npm run build
  3. Link the extension to your local Gemini CLI (creates a symlink for live iteration):

    gemini extensions link .

    Or install as a standalone local copy:

    gemini extensions install .
  4. Verify that the extension is registered:

    gemini extensions list

Development Setup & Build

1. Install Dependencies

npm install

2. Build the TypeScript Project

Compiles the TypeScript source from src/ to dist/:

npm run build

To continuously watch and compile during development:

npm run watch

3. Run the MCP Server Standalone

You can start the MCP server directly over standard input/output (stdio):

npm start

Automated & Manual Testing

Automated Unit Tests (Offline / Mocked)

The automated test suite runs via Vitest with fully mocked HTTP responses to ensure speed and independence from external network availability:

npm test

Test coverage includes:

  • Successful search: Verifies titles, URLs, and Yoast meta descriptions.

  • Empty search results: Verifies friendly guidance when no matching pages exist.

  • Input validation: Rejects empty queries, out-of-bounds limits (< 1 or > 10).

  • Network / Website failure: Verifies graceful handling of connection failures and timeouts.

  • HTTP status errors: Verifies handling of 500, 404, and other HTTP status codes.

  • Result clamping: Ensures limit does not exceed 10.

  • Security & URL filtering: Validates allowed domains and discards untrusted links.

  • HTML sanitization: Tests entity decoding and tag stripping.

Manual Live Integration Test

A live manual test script is provided in scripts/manual-test.js to verify real queries against https://empcloud.com:

npm run test:manual
# or directly:
node scripts/manual-test.js

Example Prompts

Once installed in the Gemini CLI, you can ask Gemini natural language questions:

  • "Find EmpCloud information about attendance management and show me the relevant links."

  • "Search EmpCloud for payroll features."

  • "Find articles about employee monitoring."

  • "Show me EmpCloud product pages related to HRMS."

  • "What workforce management modules does EmpCloud offer?"

Gemini will automatically invoke search_empcloud or get_empcloud_website_info and format the response.


Architecture & Content Source

Verified Public Content Sources

  1. Search Endpoint: https://empcloud.com/wp-json/wp/v2/search?search={query}&per_page={limit}

    • Returns structured records with id, title, url, type, and subtype.

  2. Page Detail & Metadata Enrichment: https://empcloud.com/wp-json/wp/v2/pages/{id}?_fields=id,excerpt,yoast_head_json

    • Fetches SEO meta descriptions and excerpts to provide summaries without downloading full page bodies.

  3. Site Metadata Endpoint: https://empcloud.com/wp-json/

    • Returns public site title, tagline, and supported REST namespaces.

Project Layout

empcloud-gemini-extension/
├── gemini-extension.json         # Gemini CLI extension manifest
├── GEMINI.md                     # Model instructions context playbook
├── package.json                  # NPM dependencies & scripts
├── tsconfig.json                 # TypeScript build configuration
├── .gitignore                    # Git exclusions
├── LICENSE                       # MIT License
├── README.md                     # Documentation & usage guide
├── src/
│   ├── index.ts                  # MCP server entry point (stdio)
│   ├── wordpress/
│   │   ├── client.ts             # HTTP client with timeouts, validation, sanitization
│   │   └── api.ts                # EmpCloud WordPress API functions
│   └── tools/
│       ├── search-empcloud.ts    # Tool: search_empcloud
│       └── website-info.ts       # Tool: get_empcloud_website_info
├── tests/
│   ├── search-empcloud.test.ts   # Vitest unit test suite (12 tests)
│   └── manual-test.ts            # TypeScript manual test definition
├── scripts/
│   └── manual-test.js            # Node runner for live endpoint test
└── dist/                         # Compiled JavaScript output

Security & Reliability

  • Public Data Only: Only queries public WordPress REST API endpoints.

  • No Credentials Required: Does not require, store, or accept any user credentials, API keys, or private tokens.

  • Read-Only Operations: Strictly performs HTTP GET requests. No write, update, create, or delete operations exist.

  • Domain Whitelist: Rejects any response or redirection outside empcloud.com and www.empcloud.com.

  • Request Timeouts: All requests utilize AbortController with an 8-second default timeout to prevent hanging.

  • Privacy Assurance: Zero access to private employee data, biometric scans, payroll figures, or customer accounts.


Troubleshooting

1. gemini extensions validate or gemini command not found

If the gemini command is not available in your terminal PATH, verify that you have installed the official Gemini CLI:

npm install -g @google/gemini-cli
# or follow installation instructions at https://github.com/google-gemini/gemini-cli

Note: You can develop, build, and test this extension completely independently without having the Gemini CLI installed globally.

2. Search returns "Failed to connect to EmpCloud website"

  • Verify that your machine has an active internet connection.

  • Check if https://empcloud.com is reachable in your browser or with curl -I https://empcloud.com.

  • If behind a corporate proxy, set the HTTP_PROXY and HTTPS_PROXY environment variables.

3. MCP JSON-RPC Communication Error

  • Ensure no code writes to stdout (console.log) during server execution. All logging in src/index.ts is routed to stderr (console.error) to preserve the integrity of the stdio JSON-RPC stream.


GitHub Publishing Instructions

To publish this extension to GitHub as an open-source project or extension registry item:

  1. Initialize Git Repository:

    git init
    git add .
    git commit -m "feat: initial commit of EmpCloud Gemini CLI extension"
  2. Create Remote Repository on GitHub:

    • Go to GitHub New Repository.

    • Name the repository empcloud-gemini-extension.

    • Set visibility to Public (or Private based on organizational requirements).

    • Do not initialize with README or .gitignore (already present).

  3. Push to GitHub:

    git remote add origin https://github.com/<your-username-or-org>/empcloud-gemini-extension.git
    git branch -M main
    git push -u origin main
  4. Tag a Release:

    git tag -a v1.0.0 -m "Release v1.0.0: Initial production release"
    git push origin v1.0.0
  5. Install via Git in Gemini CLI: Users can install the published extension directly via GitHub URL:

    gemini extensions install https://github.com/<your-username-or-org>/empcloud-gemini-extension

License

This project is licensed under the MIT License.

Available Tools

2 tools
get_empcloud_website_infoB

Retrieve general public information about EmpCloud, its primary workforce management modules, and official website URLs.

Inputs: no named parameters.

search_empcloudB

Search publicly available EmpCloud products, features, documentation, and website resources by keywords (e.g. attendance, payroll, HRMS, monitoring).

Inputs: query (required), limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 2 tools

    Disambiguation4/5

    search_empcloud is keyword-based retrieval across products/features/docs, while get_empcloud_website_info targets a fixed 'about' summary with module list and URLs. There is some overlap since a keyword search could surface the same general info, but the descriptions make the primary intent of each reasonably clear.

    Naming Consistency4/5

    Both names are snake_case and start with a verb (search_, get_), giving a predictable pattern. The second name is a longer noun phrase (empcloud_website_info) than the first (empcloud), a minor deviation but still readable and consistent in style.

    Tool Count3/5

    Two tools is thin for a search-oriented server; a single search plus a fixed info tool leaves little room for scoped operations. The count is defensible for a narrow read-only lookup service, but it sits at the borderline of feeling under-scoped.

    Completeness3/5

    The read-only search surface covers keyword search and general company info, but obvious gaps remain: no get-by-id/product-detail tool, no listing or filtering of modules, and no way to fetch a specific documentation page returned by search. Agents can work around this by re-searching, but the lifecycle is incomplete.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables AI coding agents to search, read, and cite official Workday developer documentation, grounding their answers in real docs instead of hallucinating. Particularly useful for building Workday Extend apps.
      4
      1
      -
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables browser-based AI agents to interact with a WordPress site through WebMCP-registered tools, allowing them to read, search, navigate, and optionally create or modify content, taxonomies, comments, and user data via the WordPress REST API.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to manage WordPress posts, pages, media, taxonomies, comments, users, settings, and custom fields through the WordPress REST API. Supports secure authentication, OAuth deployment, search, and safe write controls.
      MIT