Skip to content

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

Merged
merged 8 commits into from
Jan 29, 2025

Conversation

StreetLamb
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@saqadri saqadri left a 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
Copy link
Collaborator

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}")
Copy link
Collaborator

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}")
Copy link
Collaborator

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

Copy link
Collaborator

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

@saqadri
Copy link
Collaborator

saqadri commented Jan 29, 2025

This is a really really cool app and usecase @StreetLamb

@StreetLamb StreetLamb changed the title [WIP] Add MCP agent server example Add MCP agent server example Jan 29, 2025
@saqadri saqadri merged commit eb02dff into lastmile-ai:main Jan 29, 2025
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

Successfully merging this pull request may close these issues.

2 participants