Exposes a streamable HTTP handler using Express and Clerk for authenticated AI client interactions.
Also known as clerk/mcp-express-example
- Stars
- 5
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Aug 21, 2026
- License
- —
What is Express & Clerk Example MCP?
Express & Clerk Example exposes a streamable HTTP handler using Express and Clerk for authenticated AI client interactions.
Summary generated from the project's README
About Express & Clerk Example MCP server
Developers looking to build authenticated AI interfaces can use this proof of concept to implement a streamable HTTP handler. It combines Express with Clerk to manage identity, providing a template for how MCP servers can handle secure client interactions through a web server architecture.
Setting up the server requires Node.js version 22.18 or higher and a Clerk application with dynamic client registration enabled. Users must configure their Clerk API keys in a local environment file and can run the service using pnpm. While it defaults to HTTP on port 3000, developers can use mkcert to generate locally trusted certificates for HTTPS support on port 3001.
Connecting to the endpoint is straightforward for clients following the latest MCP specification. For instance, a Cursor configuration can point directly to the local URL to begin testing the authenticated streamable handler.
What you can do with it
- 1Testing authenticated MCP connectionsA developer can verify that an AI client can communicate with a secure endpoint by pointing Cursor to the local server URL.
- 2Implementing secure AI handlersYou can use this setup to prototype how Express and Clerk work together to provide authenticated access to MCP tools.
- 3Developing with local HTTPSDevelopers can set up a local certificate authority to test client interactions that require an encrypted connection.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachableclerk/mcp-express-example is public and reachablegithub.com/clerk/mcp-express-example ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-08-21github.com/clerk/mcp-express-example ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubMCP Server with Clerk & Express
A minimal example of an MCP server endpoint using Express and Clerk for authentication. At the moment, it only exposes a streamable http handler. It could be adapted to handle SSE as well if necessary though. The purpose of this example is to serve as a proof of concept!
Getting started
- Make sure you're running Node.js
>= 22.18— the dev script runs TypeScript directly using Node's type stripping. - Run
pnpm ito install dependencies. - Create a Clerk application, then toggle on the Dynamic client registration option in the OAuth applications page in the Clerk Dashboard.
- Run
cp .env.example .envand copy your Clerk API keys from the API keys page in the Clerk Dashboard into the.envfile. - Run
pnpm run devto start the server. - You should be able to connect to it now from any client that supports the latest version of the MCP spec. A cursor configuration is provided as a test.
Connecting to the server
To test in cursor, for example, add the following config to your mcp config file:
"mcp-clerk-express": {
"url": "http://localhost:3000/mcp"
}
HTTPS Setup (Optional)
By default, the server runs on HTTP only. To enable HTTPS for development (useful for testing with some clients), you'll need to generate locally trusted certificates:
-
Install mkcert (if not already installed):
# macOS brew install mkcert # Windows (using Chocolatey) choco install mkcert # Linux # See https://github.com/FiloSottile/mkcert#installation -
Setup local certificate authority:
mkcert -install -
Generate certificates:
mkcert localhost 127.0.0.1 ::1 mkdir -p cert mv localhost+2*.pem cert/ -
Restart the server - certificate files aren't watched, so stop and rerun
pnpm run dev. On startup, the server detects the certificates and starts both HTTP (port 3000) and HTTPS (port 3001) servers.
The certificates are gitignored, so each developer needs to generate their own locally trusted certificates.
Express & Clerk Example MCP questions
How do I connect to the server in Cursor?
Add the server configuration to your mcp config file using the provided URL.
What Node.js version is required?
You must be running Node.js version 22.18 or higher.
How can I enable HTTPS for development?
You can enable HTTPS by generating locally trusted certificates using mkcert.