We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VinnyCarter05/investing-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
"""
Generate financial advisor report."""
import asyncio
import shutil
from pathlib import Path
from datetime import datetime
import sys
# Add src to path
sys.path.insert(0, str(Path(__file__).parent / "src"))
from tools.advisor_report import AdvisorReportGenerator
async def main():
"""Generate the full HTML financial advisor report."""
# Initialize paths
project_root = Path(__file__).parent.resolve()
reports_path = project_root.parent / "data" / "reports"
output_base = reports_path / "advisor_reports"
# Create output directories
timestamp = datetime.now().strftime("%Y-%m-%d_%H%M%S")
output_dir = output_base / timestamp
latest_dir = output_base / "latest"
output_dir.mkdir(parents=True, exist_ok=True)
# Generate report
print("Generating financial advisor report...")
generator = AdvisorReportGenerator(str(reports_path))
report_data = generator.generate_report_data()
html_output = generator.render_html(report_data)
# Write HTML file
html_file = output_dir / "advisor_report.html"
html_file.write_text(html_output, encoding='utf-8')
# Copy Monte Carlo visualizations
mc_charts_dir = output_dir / "charts" / "monte_carlo"
mc_charts_dir.mkdir(parents=True, exist_ok=True)
mc_viz = report_data['visualizations']['monte_carlo']
for chart_name, chart_path_str in mc_viz.items():
if chart_path_str:
chart_path = Path(chart_path_str)
if chart_path.exists():
shutil.copy(chart_path, mc_charts_dir / chart_path.name)
# Update latest symlink
if latest_dir.exists() or latest_dir.is_symlink():
if latest_dir.is_symlink():
latest_dir.unlink()
else:
shutil.rmtree(latest_dir)
# Create a relative symlink for portability
# latest_dir.symlink_to(output_dir.name)
# Note: Using absolute path for symlink to avoid issues with different working directories.
latest_dir.symlink_to(output_dir, target_is_directory=True)
print(f"โ
Report generated successfully!")
print(f"๐ Report file: {html_file}")
print(f"๐ Latest link: {latest_dir / 'advisor_report.html'}")
print(f"\nOpen in browser:")
print(f" open '{html_file.resolve()}'")
if __name__ == "__main__":
asyncio.run(main())