Skip to content

MCP External Library Callback Support #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xorroproprop opened this issue May 19, 2025 · 0 comments
Open

MCP External Library Callback Support #755

xorroproprop opened this issue May 19, 2025 · 0 comments

Comments

@xorroproprop
Copy link

There currently doesn't seem to be a way for handling potential callbacks from 3rd party libraries. I found that using thread locking allowed the callback function to execute. However, I think there could be a more "graceful" way of handling this.

`python
from foo import func
from mcp.server.fastmcp import FastMCP

def cb_func()
print(bar)

@mcp.tool(name="callback_foo")
def callback():
foo = func(file_path, cb_func)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant