-
Notifications
You must be signed in to change notification settings - Fork 495
Add MCP agent server example #7
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work! Approving so you can keep iterating on top of this. I'll merge in the changes to have filesystem based logger, and then update this example to use that
@@ -0,0 +1,128 @@ | |||
from mcp.server.models import InitializationOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome. This might be something we put in the library itself
@@ -123,7 +127,7 @@ async def configure_logger(config: "Settings"): | |||
Configure logging and tracing based on the application config. | |||
""" | |||
event_filter: EventFilter = EventFilter(min_level=config.logger.level) | |||
print(f"Configuring logger with level: {config.logger.level}") | |||
logger.info(f"Configuring logger with level: {config.logger.level}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow very interesting that this works. When I tried this before I got a circular dependency error. But I might have fixed it accidentally while refactoring other things
@@ -123,7 +127,7 @@ async def configure_logger(config: "Settings"): | |||
Configure logging and tracing based on the application config. | |||
""" | |||
event_filter: EventFilter = EventFilter(min_level=config.logger.level) | |||
print(f"Configuring logger with level: {config.logger.level}") | |||
logger.info(f"Configuring logger with level: {config.logger.level}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow very interesting that this works. When I tried this before I got a circular dependency error. But I might have fixed it accidentally while refactoring other things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you notice any weird behavior feel free to remove this line entirely
This is a really really cool app and usecase @StreetLamb |
No description provided.