akij-hr-data-mcp
Provides read-only access to a configured Google Drive folder, with tools for listing, searching, retrieving metadata, and extracting content from various file types (e.g., XLSX, CSV, PDF, DOCX, images, and native Google Docs/Sheets/Slides files).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@akij-hr-data-mcpList all Excel files in the HR data folder"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
akij-hr-data-mcp
A production-ready, read-only, remote Model Context Protocol (MCP) server that exposes a single Google Drive folder — the AKIJ HR DATA repository — to MCP-compatible clients over modern Streamable HTTP transport.
It is a general-purpose Drive MCP: it handles XLSX, XLS, CSV, PDF, DOCX, TXT, images, and native Google Docs/Sheets/Slides files — not an Excel-only tool.
1. What this project does
Connects to Google Drive using a service account (no user OAuth flow, no browser login).
Restricts every operation to one configured folder (
GOOGLE_DRIVE_FOLDER_ID) and its subfolders. Files outside that tree are never returned, even if the service account could technically see them.Exposes 11 MCP tools for discovering and reading files (list, search, metadata, content, and format-specific extraction for Excel/CSV/PDF/DOCX).
Runs as a standard Node/Express HTTP server with a single
POST /mcpendpoint (Streamable HTTP transport) and aGET /healthendpoint, deployable to Render (or any Node host) so it keeps running when your PC is off.Enforces API-key authentication on every MCP request.
Is strictly read-only — there is no code path that can upload, edit, delete, rename, move, or share a Drive file, or change permissions.
Related MCP server: Google Drive MCP Server
2. Architecture
Google Drive (AKIJ HR DATA folder)
↓ Drive API v3 (read-only scope)
Google Service Account (GCP_KEY_BASE64)
↓
GoogleDriveClient (src/google-drive.ts) — enforces folder-tree scope
↓
MCP Server (src/mcp-server.ts) — 11 tools, Zod-validated inputs
↓
Express app (src/index.ts) — API-key auth, Streamable HTTP transport
↓ POST /mcp (stateless, one transport per request)
↓
Render (always-on host)
↓ HTTPS
Remote MCP Clients (Claude, other MCP-compatible clients)The server is stateless: each POST /mcp request gets its own McpServer + StreamableHTTPServerTransport instance (sessionIdGenerator: undefined), so there's no session affinity requirement and it scales horizontally on Render without sticky sessions.
Project structure
src/
index.ts Express app: /health, /mcp, startup
config.ts Environment variable loading/validation
auth.ts API-key authentication middleware
google-auth.ts Decodes GCP_KEY_BASE64 → JWT auth client
google-drive.ts Drive API client with folder-scope enforcement
mcp-server.ts McpServer wiring: registers all 11 tools
tools/
files.ts list_files, get_file_metadata, get_file_content, list_supported_files
search.ts search_files, search_repository
excel.ts inspect_excel, read_excel_sheet
csv.ts read_csv
pdf.ts extract_pdf_text
docx.ts extract_docx_text
utils/
errors.ts Typed AppError hierarchy + safe error serialization
limits.ts Size/row/timeout/pagination limits
mime-types.ts MIME → file-category classification
tests/ Jest test suite (46 tests, 10 suites)
.env.example
.gitignore
render.yaml Render Blueprint (optional one-click deploy)
README.md
package.json
tsconfig.json
jest.config.cjs3. Prerequisites
Node.js 20+ and npm
A Google Cloud project with the Google Drive API enabled
A Google service account with Viewer access shared on the AKIJ HR DATA Drive folder
A GitHub account (for deploying to Render from a repo)
A Render account
4. Installation
npm install5. Environment variables
Variable | Required | Description |
| no (default | Port the HTTP server listens on. Render sets this automatically. |
| yes | The Drive folder ID this MCP is restricted to. |
| yes | Base64-encoded service-account JSON key. |
| yes | Comma-separated list of valid API keys for |
See .env.example for the template (no real secrets are committed).
6. Google Cloud setup
Go to console.cloud.google.com and select/create a project.
APIs & Services → Library → enable Google Drive API.
APIs & Services → Credentials → Create Credentials → Service Account.
Give it a name (e.g.
akij-hr-data-mcp), no project-level IAM role is needed.Open the new service account → Keys → Add Key → Create new key → JSON. This downloads a
gcp-key.jsonfile — do not commit this file.Note the service account's email address (looks like
akij-hr-data-mcp@your-project.iam.gserviceaccount.com).
7. Google Drive permissions
Open the AKIJ HR DATA folder in Google Drive (folder ID
1oxYLPcC9MPVuxsbeP0kGgYhLmkxt0w2o).Click Share, paste the service account's email, and grant Viewer access.
Do not grant Editor/Owner — this server never writes to Drive, so Viewer is sufficient and safer.
8. Local setup
npm install
cp .env.example .env
# fill in GOOGLE_DRIVE_FOLDER_ID, GCP_KEY_BASE64, API_KEYS in .env
npm run devnpm run dev runs the TypeScript server directly with tsx watch (no build step needed for local iteration).
9. Generating GCP_KEY_BASE64
You should never paste the raw service-account JSON into chat, source code, or .env.example. Generate the base64 value locally from your downloaded gcp-key.json and put it only in your local .env (gitignored) or in Render's environment variable settings.
PowerShell:
[Convert]::ToBase64String([IO.File]::ReadAllBytes("$HOME\Downloads\gcp-key.json")) | Set-ClipboardThis reads the key file and copies the base64 string directly to your clipboard — paste it as the value of GCP_KEY_BASE64 in .env (locally) or in the Render dashboard (for deployment). Adjust the path if gcp-key.json isn't in your Downloads folder.
If you'd rather print it to the terminal instead of the clipboard:
[Convert]::ToBase64String([IO.File]::ReadAllBytes("$HOME\Downloads\gcp-key.json"))10. Local testing
Start the server:
npm run devCheck health:
curl http://localhost:10000/healthCall an MCP tool (example: list_files) with curl, using the initialize → tools/call sequence, or point any Streamable-HTTP-capable MCP client at http://localhost:10000/mcp with header X-Api-Key: <one of your API_KEYS>.
11. Building
npm run buildCompiles src/ (TypeScript, NodeNext ESM) to dist/. Run npm run typecheck to type-check without emitting files.
Run the test suite:
npm testThis runs Jest in-band (46 tests across 10 suites: config, auth, Google auth, Drive folder-scope enforcement, all 11 tools, and the /health//mcp HTTP endpoints).
12. GitHub setup
git init
git add .
git commit -m "Initial commit: akij-hr-data-mcp"
git branch -M main
git remote add origin https://github.com/<your-username>/akij-hr-data-mcp.git
git push -u origin main.env, gcp-key.json, *.pem, and *.key are already gitignored — verify with git status before committing that nothing secret is staged.
13. Render deployment
Go to render.com → New → Web Service.
Connect your GitHub repo (
akij-hr-data-mcp).Render will detect
render.yaml(Blueprint) automatically, or configure manually:Build Command:
npm install && npm run buildStart Command:
npm startHealth Check Path:
/health
Add the environment variables (section 14) in the Render dashboard — never commit them.
Deploy. Render builds, starts the service, and keeps it running independent of your PC.
14. Render environment variables
Set these in Render → your service → Environment:
PORT=10000
GOOGLE_DRIVE_FOLDER_ID=1oxYLPcC9MPVuxsbeP0kGgYhLmkxt0w2o
GCP_KEY_BASE64=<paste the base64 string from step 9>
API_KEYS=<comma-separated production keys, e.g. key-abc123,key-def456>Generate strong random API keys, e.g.:
[Convert]::ToBase64String([Guid]::NewGuid().ToByteArray()) -replace '[+/=]',''15. Health endpoint
GET /health{ "status": "ok", "timestamp": "2026-08-17T12:00:00.000Z" }No authentication required; exposes no secrets or internal state.
16. MCP endpoint
POST /mcpImplements the MCP Streamable HTTP transport (
@modelcontextprotocol/sdkStreamableHTTPServerTransport), stateless (sessionIdGenerator: undefined) — no SSE-only fallback.Requires authentication:
Authorization: Bearer <API_KEY>orX-Api-Key: <API_KEY>header.GET /mcpandDELETE /mcpreturn405— this server doesn't maintain sessions or support the optional SSE stream.
17. Connecting the remote MCP to clients
Once deployed, your MCP endpoint is:
https://<your-render-service>.onrender.com/mcpFor MCP clients that support remote/HTTP servers, add a server entry with:
URL:
https://<your-render-service>.onrender.com/mcpTransport: Streamable HTTP
Headers:
X-Api-Key: <one of your API_KEYS>(orAuthorization: Bearer <API_KEY>)
Example generic client config:
{
"mcpServers": {
"akij-hr-data": {
"url": "https://<your-render-service>.onrender.com/mcp",
"headers": {
"X-Api-Key": "<API_KEY>"
}
}
}
}18. Security
Read-only: no upload/delete/edit/rename/move/share/permission tool exists in this codebase.
Folder-scoped:
GoogleDriveClient.assertFileInScopewalks each file'sparentschain up to the configured root before any metadata or content is returned; files outside the tree raise aForbiddenError.API-key auth: every
POST /mcprequest is checked againstAPI_KEYSwith a timing-safe comparison (crypto.timingSafeEqual). Missing/invalid keys get401.Credentials never logged or returned: the decoded service-account JSON stays inside
google-auth.ts; no tool, log line, or error message can surface it. Error responses are passed throughtoSafeErrorMessage, which strips stack traces and raw upstream error bodies.Size/output limits: downloads are capped (
LIMITS.MAX_DOWNLOAD_BYTES/MAX_PARSE_BYTES), text extraction is truncated (MAX_TEXT_OUTPUT_CHARS), rows are paginated (DEFAULT_ROW_LIMIT/MAX_ROW_LIMIT), and every outbound Google API call has a timeout (GOOGLE_API_TIMEOUT_MS).Extensible auth:
req.identityis a small, stable shape ({ keyId }) designed so a future per-user-key, OAuth, or role-based authorization layer can attach richer claims without changing every call site.Known dependency advisory: the
xlsx(SheetJS) package used for legacy.xlsparsing has a published high-severity advisory (prototype pollution / ReDoS). It's used only for internal, access-controlled files from your own Drive folder (not arbitrary internet uploads) and files are size-capped before parsing. Runnpm auditperiodically and consider replacing it if a patched release becomes available.
Security checklist
gcp-key.jsonnever committed to git.envnever committed to gitAPI_KEYSset to strong, random values in Render (not the local dev value)Service account has Viewer only on the Drive folder
GOOGLE_DRIVE_FOLDER_IDmatches the intended repository folderRender environment variables set directly in the dashboard, never in
render.yaml's committed values
19. Troubleshooting
Symptom | Cause | Fix |
Server exits immediately with a | Missing/invalid env var | Check the exact variable named in the error message against section 5 |
| Wrong file encoded, or copy/paste truncated the string | Regenerate with the PowerShell command in section 9 |
| Service account not shared on the folder, or shared with the wrong email | Re-check section 7; confirm the |
| You passed a | Use |
| Missing/incorrect API key | Send |
| File exceeds the configured byte limit | This is intentional; large files are rejected rather than loaded fully into memory (see |
Render service sleeps / cold-starts slowly | Free/starter Render plans idle after inactivity | Upgrade the Render plan, or accept the cold-start delay on the first request |
Tests hang for minutes locally |
| Already mitigated: |
Remaining manual steps (only you can do these)
Generate
GCP_KEY_BASE64from your downloadedgcp-key.json(section 9) and put it in your local.envfor testing.Share the AKIJ HR DATA Drive folder with your service account's email as Viewer (section 7).
Run locally (
npm run dev) and confirmGET /healthand a reallist_filescall work against your real Drive folder.Push to GitHub (section 12).
Create the Render Web Service, connect the repo, and set the four environment variables in the Render dashboard (sections 13–14) — Render will build and deploy automatically.
Generate production
API_KEYS(different from any local dev key) and store them securely for your MCP clients.Connect your MCP client to
https://<your-render-service>.onrender.com/mcp(section 17).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -license-qualityAmaintenanceThis MCP server integrates with Google Drive to allow listing, reading, and searching over files.4,90789,405MIT
- Alicense-qualityDmaintenanceA server that provides a Machine Control Protocol (MCP) interface to search, access, and interact with Google Drive files and folders, enabling AI assistants to work with Google Drive content.8MIT
- Flicense-qualityCmaintenanceA read-only Google Drive MCP server that allows searching files, reading file content (with auto-export for Google Docs, Sheets, Slides), and retrieving file metadata via OAuth authentication.262
- AlicenseAqualityAmaintenanceMCP server for interacting with Google Drive using a service account, restricted to a specific root folder. Supports file operations like search, list, create, update, and read.4396MIT
Related MCP Connectors
MCP server for Google search results via SERP API
MCP server for AgentDocs (agentdocs.eu): read, search, write, comment on & share Markdown docs.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/mdshahabdulaziz-beep/mcp-akij'
If you have feedback or need assistance with the MCP directory API, please join our Discord server