Skip to content

Configuration and running

Once you have the code installed, you need to configure the demo to connect to your Prefactor instance and then build and run the server.

The demo needs three environment variables to connect to your Prefactor instance. These should be available from your playground setup.

Create a file called mise.local.toml in the project root (this file is gitignored and won’t be committed):

[env]
MCP_AUTH_ISSUER = "<YOUR PREFACTOR MCP ISSUER>"
AUTH_CLIENT_ID = "<YOUR PREFACTOR CLIENT ID>"
AUTH_CLIENT_SECRET = "<YOUR PREFACTOR CLIENT SECRET>"

Replace the placeholder values with your actual Prefactor credentials:

  • MCP_AUTH_ISSUER: Your Prefactor MCP issuer URL (this should look like https://auth.prefactor.net/mcp.0123456789abcdefghjkmnpqrstvwxyz)
  • AUTH_CLIENT_ID: Your Prefactor client ID
  • AUTH_CLIENT_SECRET: Your Prefactor client secret

If you’re using mise, these environment variables will be automatically loaded when you run commands in this directory.

Compile the TypeScript code:

Terminal window
pnpm build

This creates the compiled JavaScript files in the dist directory.

Start the MCP server:

Terminal window
pnpm start

The server will start and listen on http://localhost:3000/mcp. You should see output indicating the server is running.