Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

lumoauth-fastmcp

Latest version: v1.5.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: lumoauth
0 Stars
0 Forks
6 Versions
693 Downloads
Python Repo language

Scan summary

lumoauth-fastmcp was last scanned on 29 Nov 2026 at version 1.5.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 6 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 1.5.0.
  • Downloads: 693 downloads.

Versions

6 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.5.0 LATEST 29 Nov 2026 No rules fired
1.4.0 19 Nov 2026 No rules fired
1.3.1 7 Nov 2026 No rules fired
1.3.0 5 Nov 2026 Not shown
1.2.0 31 Oct 2026 Not shown

No rules fired in 1.5.0

Findings

Findings for v1.5.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.5.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

LumoAuth for FastMCP

Add sign-in and per-tool access control to a FastMCP server in three lines.

lumoauth-fastmcp on PyPI Python 3.10+ FastMCP 4.1+ License: Apache-2.0

Quick start · How it works · Who is calling · Scopes and callers · Step-up approval (JIT) · Token Vault · Per-tool policy · Tracing · Troubleshooting · Docs


from fastmcp import FastMCP
from lumoauth_fastmcp import LumoAuthProvider

mcp = FastMCP("Invoices", auth=LumoAuthProvider())

Set LUMOAUTH_ORG_ID and LUMOAUTH_MCP_SERVER_ID, and that is the whole integration. LumoAuth signs users in and issues the tokens. Your server checks each token and runs the tool.

Standard discovery MCP clients read one well-known address on your server to find LumoAuth. No custom handshakes.

Sign-in and consent LumoAuth shows the sign-in and consent screens. Your server never handles a password.

Token checks on your server Each request is checked locally: signature, issuer, audience, expiry and DPoP binding.

The verified caller current_caller() returns a person, an AI agent, or an agent that acts for a person.

Rules per tool Require a scope, a person or an agent capability with one argument.

Policy in LumoAuth Grant each tool to a person or an agent in LumoAuth. A change applies within 30 seconds, without a restart.

Step-up approval (JIT) Require human approval (require_jit / ensure_jit) before an agent can run a high-risk tool or touch a specific record.

Token Vault for SaaS APIs Fetch short-lived GitHub, Slack, or Jira tokens (auth.vault_token(...)) scoped automatically to the current caller.

Trace correlation Propagate W3C traceparent headers so every tool authorization and Vault call links to your agent trace in LumoAuth's audit log.

Quick start

You need Python 3.10 or later and a LumoAuth organization. Create an organization if you do not have one yet.

1. Register your server

In the LumoAuth portal:

  1. Open AI Agents → MCP servers and click Register MCP server.
  2. Set Server name to Invoices and Resource URI to http://localhost:8000/mcp.
  3. Click Next twice, then click Register MCP server.
  4. On the server's page, click Edit, then Next. Make two changes:
    • Under Scopes, click Use defaults.
    • Switch off Require DPoP sender-constrained tokens. Claude Code and the FastMCP client do not send DPoP proofs, so they cannot connect while this switch is on.
  5. Click Next, then Save changes. Copy the Server id (mcp_…) from the top of the page.

The Resource URI is the exact URL that clients connect to. A token for one Resource URI does not work at another.

2. Run the server
pip install lumoauth-fastmcp

Save this as server.py:

from fastmcp import FastMCP
from lumoauth_fastmcp import LumoAuthProvider, current_caller

mcp = FastMCP("Invoices", auth=LumoAuthProvider())

@mcp.tool
def whoami() -> str:
    """Show who is calling."""
    return current_caller().sub

if __name__ == "__main__":
    mcp.run(transport="http", port=8000)

Start it with your organization's slug and the server id from step 1. The slug is the part after /orgs/ in the portal's URL.

export LUMOAUTH_ORG_ID=acme
export LUMOAUTH_MCP_SERVER_ID=mcp_0123456789abcdef01234567
python server.py

For the EU region, also set LUMOAUTH_URL=https://eu.app.lumoauth.dev.

3. Call it without a token
$ curl -i http://localhost:8000/mcp
HTTP/1.1 401 Unauthorized
www-authenticate: Bearer scope="mcp:read", resource_metadata="http://localhost:8000/.well-known/oauth-protected-resource/mcp"

Your server now rejects calls without a token. The 401 tells MCP clients where to find LumoAuth.

4. Sign in from a client

First, create an application for the client in the portal:

  1. Open Applications, click New application and choose Single-page or mobile app.
  2. Set Application name to Local MCP client and Redirect URI to http://localhost:8765/callback.
  3. Click Create application and copy the Client ID.
  4. On the Configuration tab, set Scopes to openid profile email offline_access mcp:read. Click Save configuration.

Then save this as client.py, with your client ID:

import asyncio

from fastmcp import Client
from fastmcp.client.auth import OAuth

auth = OAuth(client_id="client_0123456789abcdef0123456789abcdef", callback_port=8765)

async def main():
    async with Client("http://localhost:8000/mcp", auth=auth) as client:
        result = await client.call_tool("whoami")
        print(result.data)

asyncio.run(main())

Run it in a second terminal:

$ python client.py
01a18f7f-fe26-7f38-b46a-ac6bfabfbb78

Your browser opens on the LumoAuth sign-in page. After you sign in and approve, the script prints your user id. Your tool read that id from the verified token.

Claude Code needs no application. It identifies itself with its Client ID Metadata Document, which LumoAuth reads when you sign in. This works while Client ID metadata documents (CIMD) is on for your organization, which is the default (Security → Sign-in settings → Platform security):

claude mcp add --transport http invoices http://localhost:8000/mcp

claude mcp login invoices

When your organization has CIMD off, use the application from above instead:

claude mcp add --transport http \
  --client-id client_0123456789abcdef0123456789abcdef \
  --callback-port 8765 \
  invoices http://localhost:8000/mcp

claude mcp login invoices

Your browser opens on the same sign-in page. Then claude mcp list shows the connection:

invoices: http://localhost:8000/mcp (HTTP) - ✔ Connected

Other MCP clients connect the same way: with a metadata document, or with a client ID and a callback port. Troubleshooting explains the errors that you may see.

Before you go to production
  • Register a separate server with your public https:// address. LumoAuth accepts plain http:// only for localhost, 127.0.0.1 and [::1].
  • Under Allowed clients, choose Only the clients I pick.
  • Switch on Require DPoP sender-constrained tokens if all your clients can send proofs. See DPoP.

How it works

LumoAuth is the authorization server. It shows the consent screen and issues access tokens whose audience is your server's Resource URI. Your FastMCP server stays a resource server, and the provider gives it what the MCP specification asks of one:

  • Discovery. The server publishes protected resource metadata at /.well-known/oauth-protected-resource/.... This document names your LumoAuth organization as the authorization server.
  • Challenges. A request without a valid token gets 401 with a WWW-Authenticate header that points to that document. The challenge names the scopes that the registration advertises. It also states the real reason when a token is rejected: expired, wrong audience, replayed DPoP proof, and so on.
  • Verification. Tokens are verified locally: signature against the organization's keys, issuer, audience, expiry, at+jwt type, and no portal test tokens. A DPoP-bound token must arrive with the DPoP scheme and a fresh proof for this request.
  • Identity. Tools get the verified caller: a user, an AI agent, or an agent acting for a user.

The provider reads the server's registration from LumoAuth once at start-up: the Resource URI, the advertised scopes, and whether only DPoP-bound tokens are accepted. Restart the server after you change the registration.

Authentication applies to HTTP transports. A server that runs over stdio is started by the user's own MCP client and has no OAuth step.

Who is calling

current_caller() returns the verified claims of the current request as lumoauth.verify.AccessTokenClaims. This is the same object that verify_access_token in the LumoAuth Python SDK returns.

from lumoauth_fastmcp import current_caller

@mcp.tool
def list_invoices() -> list[dict]:
    caller = current_caller()
    if caller.is_agent:
        log.info("agent %s", caller.agent_id)          # "agt_…"
    elif caller.is_delegated:
        log.info("agent %s for user %s", caller.actor, caller.sub)
    return invoices_for(caller.sub)

current_caller() returns None on transports without OAuth, such as stdio and in-memory clients.

Property Meaning
caller.sub The user ID, or agent_agt_… for an autonomous agent
caller.is_agent, caller.agent_id True for an AI agent, and its agt_… ID
caller.is_delegated, caller.actor True when an agent acts on behalf of the user caller.sub
caller.scopes, caller.capabilities Granted OAuth scopes and agent capabilities
caller.is_dpop_bound, caller.dpop_thumbprint True when the token is bound to a DPoP key, and the key's JWK SHA-256 thumbprint (cnf.jkt, RFC 7638), else None
caller.is_jit, caller.authorization_details True when the caller holds a Just-in-Time (RFC 9396) approval, and its granted details
caller.traceparent, caller.trace_id The validated W3C traceparent header and 32-character trace ID of the request

Scopes and callers

Pass the checks to FastMCP's auth= argument or to AuthMiddleware:

from fastmcp.server.middleware import AuthMiddleware
from lumoauth_fastmcp import require_agent, require_scopes, require_user

@mcp.tool(auth=require_scopes("invoices:refund"))
def refund(invoice_id: str) -> str: ...

@mcp.tool(auth=require_user())                       # people only, no agents
def change_bank_details(iban: str) -> str: ...

@mcp.tool(auth=require_agent("reminders:send"))   # agents with this capability
def send_reminder(invoice_id: str) -> str: ...

require_user(allow_delegation=True) also admits an agent that acts for a person.

Add a new scope in two places: the server's Scopes, and the Scopes of each application that may ask for it. The checks follow LumoAuth's rule: a granted scope that ends in :* (such as invoices:*) covers the scopes under it, such as invoices:refund. Every other scope compares exactly. Prefer narrow scopes, because the MCP security best practices list wildcard scopes as a common mistake.

A component-level check hides the component from callers who fail it. To get an insufficient_scope step-up instead, put the scope check in AuthMiddleware. The client can then ask the user for the missing scope.

mcp = FastMCP(
    "Invoices",
    auth=LumoAuthProvider(),
    middleware=[AuthMiddleware(auth=require_scopes("invoices:read"))],
)

Step-up approval for sensitive tools (JIT)

Why it is useful: Some tools—such as refunding an invoice, wiring money, or deleting a production database—are too risky for an AI agent to run with a standing token alone. With Just-in-Time (JIT) authorization (RFC 9396 Rich Authorization Requests), your tool requires a short-lived approval for that specific action or record. When an agent calls the tool without one, the server rejects the call with an insufficient_authorization_details hint telling the agent exactly what approval to ask a human for (for example, via Slack or mobile push).

The hint is one authorization_details object, the shape that POST /jit/request takes. The error carries it in authorization_details_hint, in the Insufficient-Authorization-Details value (base64 JSON) and in its text (authorization_details_hint={…}). When more than one approval is missing, the hint names the first one; the agent asks for it, calls again, and gets the next one.

Guarding a tool with require_jit and ensure_jit

Use require_jit() on @mcp.tool(auth=...) for static action requirements, and ensure_jit() inside the tool body when the required identifier or locations depend on the runtime arguments passed to the tool:

from lumoauth_fastmcp import ensure_jit, require_jit

# 1. Declarative check: hides the tool until the caller has a "payment_initiation" grant
@mcp.tool(auth=require_jit("payment_initiation", actions=["refund"]))
def refund(invoice_id: str) -> str:
    # 2. Argument-bound check: ensures the JIT approval covers THIS specific invoice_id
    ensure_jit("payment_initiation", actions=["refund"], identifier=invoice_id)
    return f"Refunded {invoice_id}"
Keeping the tool visible for automatic agent step-up

If you want agents to see the tool in tools/list with their normal MCP token and receive the insufficient_authorization_details step-up hint when they call tools/call, either call ensure_jit(...) inside the tool body or configure jit= on auth.tool_policy():

auth = LumoAuthProvider()
mcp = FastMCP(
    "Invoices",
    auth=auth,
    middleware=[
        auth.tool_policy(
            jit={"refund": {"type": "payment_initiation", "actions": ["refund"]}}
        )
    ],
)
How clients send a JIT token

The agent asks LumoAuth for the approval (POST /jit/request), a person approves it, and the agent gets the JIT token (POST /jit/request/{id}/token, JITContext.get_token() in the lumoauth package). It sends that token with its normal MCP access token, in the X-LumoAuth-Jit-Token header:

Authorization: Bearer <MCP access token>
X-LumoAuth-Jit-Token: <JIT token>

LumoAuthProvider accepts the JIT token only when all of these are true:

  • It is a JWT with typ: JWT, signed with a key of your organization (RS*, PS* or ES*).
  • Its iss is your organization's issuer, and its aud is your organization's slug. Set LUMOAUTH_ORG_ID when you configure only the issuer of a custom domain.
  • It has jit: true and has not expired.
  • It belongs to the caller: its sub is the caller's sub, and the agent that it names (permissions.agent_id) is the caller's agent (act.sub of a delegated token, else sub).

Then its permissions.authorization_details are added to current_caller().authorization_details. A JIT token that fails a check is ignored. The JIT check of the tool then refuses the call, and its error ends with the reason, for example The X-LumoAuth-Jit-Token header was not accepted: the JIT token has expired.

The provider checks the token locally. LumoAuth can revoke a JIT token before it expires, for example when the agent completes its task. A JIT token lives 15 minutes at most. For an action with consequences, also ask token introspection in the tool.

authorization_details are also read from the MCP access token itself. LumoAuth does not issue MCP access tokens with them today, so the header is the way to send an approval.

Calling third-party APIs with Token Vault

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases lumoauth-fastmcp

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229