Aegis Risk
Provides tools for reading and writing portfolio risk assessment data to a local SQLite database.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Aegis RiskAnalyze my portfolio's risk based on latest market news."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🛡️ Aegis Risk: Multi-Agent Financial Portfolio Risk Analyzer

A real-world production-grade AI portfolio project demonstrating Agentic AI, Model Context Protocol (MCP), LangGraph orchestration, State Management, and GCP Cloud Run deployment with Vertex AI.
This project simulates a financial advisory system where multiple specialized AI agents collaborate to analyze market news, calculate portfolio exposure, assess compliance risks, and generate detailed assessment reports stored in a local database.
🏗️ Architecture Overview
The system utilizes a client-server architecture separating the Model Orchestration Client (LangGraph) from the Data & Tools Server (MCP Protocol) to achieve secure, modular data integration.
graph TD
User([User Web Interface]) <-->|SSE / REST API| FastAPI[FastAPI Backend Server]
subgraph Client Application
FastAPI <-->|Orchestrates| LG[LangGraph Engine]
LG <-->|State Checkpoint| Mem[MemorySaver Checkpointer]
subgraph Multi-Agent System
LG --> Agent1[Researcher Agent]
LG --> Agent2[Portfolio Analyst Agent]
LG --> Agent3[Risk Manager Agent]
LG --> Agent4[Compliance Auditor Agent]
end
end
subgraph Custom MCP Server
MCP_Client[MCP Client stdio] <-->|JSON-RPC| MCP_Server[MCP Server subprocess]
Agent1 <-->|Call tools| MCP_Client
Agent3 <-->|Call tools| MCP_Client
MCP_Server <-->|Scrape & Fetch| Web[Mock Financial News API]
MCP_Server <-->|Read/Write| DB[(SQLite Database)]
end
subgraph Google Cloud Platform
FastAPI -.->|IAM Auth| Vertex[GCP Vertex AI / Gemini 1.5 Flash]
end
classDef primary fill:#8b5cf6,stroke:#333,stroke-width:2px,color:#fff;
classDef secondary fill:#06b6d4,stroke:#333,stroke-width:2px,color:#fff;
class LG,Agent1,Agent2,Agent3,Agent4 primary;
class MCP_Server,DB secondary;🤝 The Multi-Agent Loop
Market News Researcher: Discovers if the stock is currently held in the user's holdings and pulls the latest headlines using custom MCP tools.
Portfolio Analyst: Correlates news catalysts with the current portfolio exposure (shares, average cost basis) and performs quantitative calculations.
Risk Manager: Drafts a detailed Markdown report and classifies risk (Low, Medium, High). Invokes the database tool to save the assessment.
Compliance Auditor: Reviews the drafted report. If compliance rules are met, it approves the report. If not, it issues feedback and routes back to the Risk Manager for revision.
Related MCP server: MonteWalk
🛠️ Tech Stack & Key Concepts
LangGraph: Orchestrates the multi-agent execution DAG with a defined state schema, custom routing edges, and checking loops.
Model Context Protocol (MCP): Establishes a standard protocol connection via
stdioto run a localized database and scraping toolkit.FastAPI: Manages lifespan connections for the MCP subprocess and serves Server-Sent Events (SSE) to deliver real-time agent console logs to the UI.
Tailored UI Aesthetics: Premium glassmorphic design utilizing rich dark palettes, dynamic SVG indicators, pulsing loaders, and a live pipeline visualizer.
GCP Vertex AI: Connects to the Gemini models natively via GCP Service Accounts (IAM roles) avoiding manual API key management in production.
🚀 Local Quickstart
Prerequisites
Python 3.12+
Git
An API Key (Google Gemini API key) OR authenticated Google Cloud SDK.
1. Clone & Set Up Environment
# Clone the repository
git clone <your-repo-url>
cd multiagent-mcp-gcp-portfolio
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt2. Configure Environment Variables
Create a .env file in the project root:
# For local testing fallback (Standard Gemini API)
GOOGLE_API_KEY=your_gemini_api_key_here
# For GCP Vertex AI (set to false for local testing with API key)
USE_VERTEX_AI=false3. Run Verification Tests
Before starting the web server, run the automated integration test to verify the LangGraph-MCP connection:
python test_agents.pyThis script will launch the MCP server in a background subprocess, run the agentic workflow, save a report to the SQLite DB, and verify the database entry.
4. Start the Web App
python app.pyOpen your browser and navigate to http://localhost:8000.
☁️ GCP Deployment (Cloud Run + Vertex AI)
The production architecture deploys the container to Google Cloud Run, which calls Gemini via Vertex AI. Authentication is managed entirely through GCP Service Accounts.
Prerequisites
Installed and authenticated Google Cloud SDK (
gcloud auth login).A GCP project with billing enabled.
Automated Deployment
We provide an automated bash script to configure permissions and deploy:
chmod +x deploy.sh
./deploy.shWhat this script does under the hood:
Enables GCP APIs: Cloud Run, Artifact Registry, Vertex AI, Cloud Build.
Creates a Service Account (
agentic-portfolio-sa).Binds the
roles/aiplatform.user(Vertex AI User) role to the Service Account, granting permission to call Gemini.Builds the Docker image locally and pushes it to Google Artifact Registry.
Deploys the service to GCP Cloud Run using the Service Account.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceAn MCP server that integrates with local Ollama LLMs to provide financial analysis through four specialized agents (Market Analyst, Portfolio Manager, Risk Analyst, and Explainability Agent) with comprehensive banking tools.Last updated
- AlicenseCqualityDmaintenanceProvides AI agents with institutional-grade quantitative finance tools including real-time market data, paper trading via Alpaca, risk analysis with Monte Carlo simulations, backtesting, and multi-source news sentiment analysis for portfolio management and trading strategy development.Last updated315MIT
- AlicenseAqualityCmaintenanceA portfolio analysis MCP server that enables AI agents to manage investment portfolios, fetch financial data from Yahoo Finance and CoinGecko, and perform advanced analysis like weight optimization and Monte Carlo simulations. It utilizes reference-based caching to efficiently handle large datasets without bloating the LLM's context window.Last updated261MIT
- Flicense-qualityDmaintenanceA multi-agent MCP server for comprehensive stock research and analysis using natural language queries, backed by SEC filings and real-time market data.Last updated
Related MCP Connectors
The financial MCP for AI agents - 90+ financial tables, SEC filings, signals, alt-data.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Crypto transaction firewall and risk tools for MCP agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/isal-amir/investment-analyst-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server