-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurePR welcomePRs for this issue are welcome and will be reviewed by maintainersPRs for this issue are welcome and will be reviewed by maintainersfeature requestRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedgood first issueGood for newcomersGood for newcomersready for workEnough information for someone to start working onEnough information for someone to start working onv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Milestone
Description
Question
I noticed that the FastMCP server does not have the options to manually specify the capabilities of the server, however it is possible to do so with the low-level server.
My current workaround to advertise the capabilities is like so:
mcp = FastMCP("test-server")
# Manually set notification options
lowlevel_server: Server = mcp._mcp_server
lowlevel_server.notification_options.resources_changed = True
lowlevel_server.notification_options.tools_changed = True
# Now, we override the mcp.run()
async def main():
async with stdio_server() as (r, w):
init_opts = lowlevel_server.create_initialization_options(
lowlevel_server.notification_options,
{}
)
await lowlevel_server.run(r, w, init_opts)
if __name__ == "__main__":
anyio.run(main)
Is there any other way to specify the capabilities of the FastMCP server? Is there a reason not to?
Thanks!
Additional Context
No response
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurePR welcomePRs for this issue are welcome and will be reviewed by maintainersPRs for this issue are welcome and will be reviewed by maintainersfeature requestRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedgood first issueGood for newcomersGood for newcomersready for workEnough information for someone to start working onEnough information for someone to start working onv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes