This MCP server provides a lightweight implementation of the Model Control Protocol, enabling Cursor Agents to interact with the WorkOS API through Cloudflare Workers. It serves as a bridge between your agents and WorkOS functionality.
bun create mcp --clone https://github.com/zueai/workos-mcp
Configure Cursor to use your new MCP server:
Add your WorkOS credentials as environment secrets:
bunx wrangler secret put WORKOS_API_KEY
bunx wrangler secret put WORKOS_CLIENT_ID
After making changes to your MCP server, deploy the updates with:
bun run deploy
Then reload your Cursor window to access the updated tools.
The MCP server provides tools defined as methods in the MyWorker
class. Each method automatically becomes available as a tool for your agent.
To add a new tool, add a method to the MyWorker
class:
/**
* A warm, friendly greeting from your MCP server.
* @param name {string} the name of the person we are greeting.
* @return {string} the contents of our greeting.
*/
sayHello(name: string) {
return `Hello from an MCP Worker, ${name}!`;
}
Each tool requires proper JSDoc comments:
@param
tags: Define parameters with types and descriptions@return
tag: Specify the return value and typeThe MCP server comes with pre-configured tools for interacting with the WorkOS API. These tools are defined in the src/index.ts
file and include functionality for authentication, user management, and other WorkOS features.
To see the complete list of available tools, check the source file or review your agent's capabilities within Cursor after connecting to the MCP server.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.