This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a TypeScript project that implements a Model Context Protocol (MCP) server named mcp-boss-zp. The server allows a large language model to interact with the Boss Zhipin (Boss 直聘) API to search for jobs and send greetings to recruiters.
The core logic is in src/main.ts, which initializes an McpServer and defines three resources:
boss-zp-greeting: Handles URIs likeboss-zp://greeting/{securityId}/{jobId}to send a greeting for a specific job.boss-zp-recommendJobs: Handles URIs likeboss-zp://recommendJobs/{page}/{encryptExpectId}/{experience}/{jobType}/{salary}to fetch recommended job listings. It supports pagination and filtering.boss-zp-getConfig: Handlesboss-zp://getConfigto provide configuration data (e.g., mappings for experience, job type, salary) for job searches.
The server communicates using StdioServerTransport, meaning it uses standard input/output for communication.
Business logic is separated into the src/api/ directory:
src/api/jobLists.ts: Contains the logic to fetch job lists.src/api/greetBoss.ts: Contains the logic for sending greetings.src/api/fetch.ts: A generic fetch wrapper for making HTTP requests to the Boss Zhipin API.
-
Build the project:
pnpm build
This command compiles the TypeScript code from
src/into JavaScript in thedist/directory and makes the output files executable. -
Run the server (as per
readme.mdinstructions for MCP clients):npx -y mcp-boss-zp
This command requires environment variables
COOKIEandBSTto be set for authentication with the Boss Zhipin API.