An MCP server that provides documentation, code examples, and changelogs for WorkOS SDKs and developer tooling.
This MCP server provides four main tools:
- Documentation: Access WorkOS SDK documentation
- Examples: Browse code examples and implementations
- Changelogs: View package changelogs and version history (includes RSS feed parsing)
- Search: Search all documentation for keywords or phrases (NEW)
The server works both inside the WorkOS monorepo (using local content) and externally (with fallback to hosted content). Changelog data is sourced from both traditional CHANGELOG.md files and the live WorkOS changelog RSS feed.
npm install @workos/mcp-docs-server
Add to your MCP configuration:
{
"mcpServers": {
"workos": {
"command": "npx",
"args": ["@workos/mcp-docs-server"]
}
}
}
import { getTools } from '@workos/mcp-docs-server/get-tools';
const tools = await getTools();
console.log(tools);
npm install
npm run build
npm run build
This will:
- Build the TypeScript code
- Clone the latest WorkOS monorepo from GitHub
- Extract documentation from
packages/docs/content/
- Extract examples and changelogs from the monorepo
- Fetch and parse the latest changelog entries from the WorkOS RSS feed
- Clean up the temporary clone
You can also run just the content preparation (pulls latest docs by default):
npm run prepare-content
For development when you want to use local content instead of cloning:
npm run build:dev
Or just prepare local content:
npm run prepare-content:local
This will organize content from local directories:
- Documentation from
docs/
into.docs/organized/docs/
- Code examples from
examples/
into.docs/organized/examples/
- Changelogs from
packages/*/CHANGELOG.md
into.docs/organized/changelogs/
- Note: RSS changelog parsing is skipped in local mode
Note: The default behavior requires access to the private WorkOS GitHub repository. Use the :local
variants for development without repo access.
You can access the locally built MCP server by adding the build to your mcp.json
.
{
"mcpServers": {
"workos": {
"command": "node",
"args": ["/path/to/dist/index.js"]
}
}
}
For maintainers who need to build and publish new versions, see the Operator Guide for detailed instructions on:
- Prerequisites and required access
- Build process and expected output
- Publishing to npm
- Troubleshooting common issues
The MCP server provides a progressive discovery experience. Each tool supports browsing available content before accessing specific items.
Search all WorkOS documentation for keywords, phrases, error messages, or method names. This is the fastest way to find relevant documentation if you don't know the exact path or structure.
Parameters:
-
query
(string, required): The search term(s) to look for -
maxResults
(number, optional): Maximum number of results to return (default: 10)
Example Usage:
// Find docs mentioning SAML errors
query: "invalid SAML response"
// Find docs about webhooks
query: "webhook"
// Find docs about a method
query: "createConnection"
How it works:
- Uses pure Node.js (no grep/execSync) to search all documentation files
- Returns snippets with line numbers and context
- Shows the document path for each match so you can use
workos_docs
to read the full content
Get WorkOS SDK documentation content by path. Use this when you know the documentation structure or want to browse hierarchically. If you don't know the exact path, use workos_search
first to find relevant documents.
Parameters:
-
path
(string, required): Documentation path to retrieve. Use forward slashes to navigate folders. Examples: "sso/overview", "directory-sync/introduction", "user-management/authentication". Omit file extensions (.md, .mdx).
Example Usage:
// Read a specific document
path: "sso/overview"
Note: Zero-parameter discovery (listing all categories or directory contents) is not yet implemented. Use
workos_search
to find relevant paths.
Get WorkOS SDK code examples. Use this after checking documentation to find practical implementation examples.
Parameters:
-
example
(string, required): Example name or group to retrieve. Common groups: "sso", "directory-sync", "user-management", "audit-logs", "webhooks".
Example Usage:
// Get all examples in the SSO group
example: "sso"
Get WorkOS package changelogs to check version history, breaking changes, and new features. Useful for migration guides and understanding API evolution.
Parameters:
-
package
(string, required): Package name to get changelog for. Use "workos-platform" for general platform updates from the RSS feed, or specific packages like "@workos/node", "@workos/python", "@workos/ruby", "@workos/go", "@workos/php".
Example Usage:
// Get general platform changelog (from RSS feed)
package: "workos-platform"
// Get changelog for workos-node SDK
package: "@workos/node"
Data Sources:
-
RSS Feed: The
workos-platform
package provides the latest platform updates, feature announcements, and product changes sourced from https://workos.com/changelog/rss.xml - Markdown Files: SDK-specific packages provide traditional changelog data from CHANGELOG.md files in the monorepo
This MCP server follows a progressive discovery pattern aligned with MCP best practices:
-
Search-first workflow: Use
workos_search
to find relevant documentation paths -
Direct access: Use
workos_docs
,workos_examples
, orworkos_changelogs
with the discovered path or name - Clear navigation hints: Each result includes hints for further exploration
- Graceful fallbacks: When content isn't found, the server suggests similar options
This design allows AI assistants to efficiently explore available content without prior knowledge of the structure, making it easier to find relevant documentation, examples, or changelogs.
workos-docs-server/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── get-tools.ts # Tool configuration
│ ├── prepare.ts # Content preparation script
│ └── types.ts # Type definitions
├── .docs/
│ └── organized/ # Processed content (generated)
│ ├── docs/
│ ├── examples/
│ └── changelogs/
├── package.json
├── tsup.config.ts
└── README.md
-
prepare.ts (build step): Walks the monorepo and normalizes content into
.docs/organized/
- get-tools.ts: Checks for local organized content, falls back to remote URLs if missing
- index.ts: Provides MCP-compliant server that serves the tools
MIT