mcp-auth-keydris-template
OfficialProvides a GitHub API integration via the github-whoami demo tool, which fetches the authenticated user's profile using credentials redeemed at call time through the Keydris middleware.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-auth-keydris-template@mcp-auth-keydris-template Call github-whoami to fetch my GitHub info."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
keydris-manufact-template: Credential-Free MCP Server Template for mcp-use
A template for building credential-free MCP servers with mcp-use, with the Keydris kit reader wired in as middleware. The server holds no API key, no PAT, no secret of any kind: it redeems a single-use, action-scoped KIT action token for the credential each tool call needs, at call time.
What this is
This is a template, not a finished server: clone it, keep the middleware, and replace the demo tool with your own. It was bootstrapped with create-mcp-use-app and adds the Keydris kit reader as mcp-use middleware, following the upstream keydris-reader libraries.
Requires a Keydris account. The tokens this server redeems are minted and evaluated by the Keydris proxy, gateway, and vault. Sign up at keydris.com to get a gateway URL to redeem against; without one, the server starts and lists its tools, but every credentialed call is refused.
Related MCP server: mcp-gate
The flow
proxy ──► POST /mcp
params._meta["keydris/kit_action_token"] = token
──► this server
tool builds its upstream request, then:
this server ──► POST {KEYDRIS_GATEWAY_URL}
{token, mcp:{method,action_name,parameters},
target:{host,path,method}}
◄── {credentials:[{type,name,prefix,value}]}
this server ──► the upstream API, credential appliedFor each tools/call, the server redeems the single-use KIT action token the Keydris proxy injected on params._meta["keydris/kit_action_token"] (or, as a legacy fallback, on the authorization header) for the credential that one call needs — at the moment the outbound request is made, because the gateway requires the downstream target alongside the action.
How the template is wired
src/keydris/— the kit reader.token.tsandcredentials.tsare vendored verbatim from@keydris/kit-reader;types.tsandredeem.tsare vendored and updated to the current gateway contract (the upstream package predates thetargetrequirement);middleware.tsis the mcp-use adapter.index.tsregisters the middleware once:server.use("mcp:tools/call", keydrisCredentials(reader)). It does not redeem — it arms a one-shot spend bound to the wire-exact MCP call. Onlytools/callis armed;initializeandtools/listnever touch the gateway, so a client with no token can still connect and see what is on offer.Inside a tool, make the one credentialed request with
keydrisFetch(ctx, url, init)— it derives the target from the URL, redeems, injects the credential, and sends. See thegithub-whoamitool. For custom transports,kitSpendFrom(ctx)returns the raw spend andapplyCredentials(...)does the injection.One token authorizes one outbound request: the gateway consumes it atomically, and a second spend is refused locally. Failures arrive as
{ ok: false, problem }and are returned as tool errors the agent can read, never thrown. Never logcredentials(theproblemside is safe to log).
Getting Started
Prerequisites
A Keydris account, and the gateway URL it gives you to redeem against
Node 22+
Run the development server
npm install
npm run devOpen http://localhost:3000/mcp/inspector with your browser to test your server.
You can start building by editing the entry file. Add tools and prompts — the server auto-reloads as you edit.
Run npm run typecheck to refresh MCP view types and check the project with its local TypeScript compiler.
Configuration
Configure via .env (see .env.example):
Variable | Default | Meaning |
| (required — no fallback) | Where this server redeems the KIT action token it was handed. Must be |
|
| Legacy header accepted as a fallback; tokens normally arrive in MCP |
|
| Upstream API base for the |
Learn More
To learn more about mcp-use, MCP, and the kit reader:
mcp-use Documentation — guides, API reference, and tutorials
keydris-reader — the upstream Node and Python kit-reader libraries this template vendors
keydris.com — the proxy, gateway, and vault the tokens are redeemed against
Deploy on Manufact Cloud
npm run deployThis server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
An authenticated remote MCP server for user-owned devices and one-shot capability invocation.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Related MCP Servers
- AlicenseAqualityFmaintenanceProvides secure OAuth2-based credential management for MCP servers, allowing agents to obtain short-lived token references without exposing raw secrets.714 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables serving multiple MCP toolkits behind one server with capability-based access control, so different callers see and can call only the tools they are authorized for, over stdio or streamable HTTP with bearer-token auth.MIT
- AlicenseNot gradedqualityBmaintenanceEnables secure, auditable, and rate-limited access to Model Context Protocol servers while preserving each caller's identity.MIT
- FlicenseNot gradedqualityBmaintenanceEnables centralized authentication and authorization for MCP servers, with OAuth 2.1, static API keys, and JWT verification via drop-in middleware.-