Overview
The Prefactor MCP demo is a working example of an MCP server that implements MCP Authorization using Prefactor. This demo shows you how to build an MCP server that requires authentication before clients can access your tools.
This section walks you through getting the demo up and running so you can see MCP Authorization in action.
What you’ll learn
Section titled “What you’ll learn”By working through this demo, you’ll see:
- How to set up an MCP server with authentication
- How MCP clients authenticate with your server
- How to validate bearer tokens from Prefactor
- How to access authenticated user information in your tools
Prerequisites
Section titled “Prerequisites”Before you start, make sure you have:
- Completed the playground setup in Prefactor (you should have received an invite email)
- Your Prefactor MCP issuer URL
- Your Prefactor client ID and client secret
- Node.js and pnpm installed (or mise, which will install them for you)
This guide assumes you’ve already completed the Prefactor playground setup and have your credentials ready. If you need to change the configuration later, we’ll cover that in a separate section.
Coming up
Section titled “Coming up”- Installation - Clone the repository and install dependencies
- Configuration and running - Set up environment variables and start the server
- Connecting with MCP clients - Connect to the server using various MCP clients
- What’s happening under the hood - Understanding how the demo server works internally