Initial Checks
Description
expected behaivor / actual behavior
looking at the provided sample code i would assume current_time would show up as a regular resource, because it needs no arguments from the llm / user.
however, is is only being listed as a resource template and cannot be invoked via the inspector.
Example Code
from contextlib import asynccontextmanager
from mcp import ServerSession
from mcp.server import FastMCP
from mcp.server.fastmcp import Context
class AppContext:
pass
@asynccontextmanager
async def lifespan(server: FastMCP):
yield AppContext()
mcp = FastMCP("Demo", lifespan=lifespan)
@mcp.resource("time://current")
async def current_time(ctx: Context[ServerSession, AppContext]):
return "11:41"
Python & MCP Python SDK
`uv run python` shows `3.13.8`
`uv pip freeze` shows `mcp==1.21.1`
Initial Checks
Description
expected behaivor / actual behavior
looking at the provided sample code i would assume
current_timewould show up as a regular resource, because it needs no arguments from the llm / user.however, is is only being listed as a resource template and cannot be invoked via the inspector.
Example Code
Python & MCP Python SDK