SN

ski043/nextjs-financial-agent-mcp-arcade-dev

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

15 stars 11 forks 质量 53 趋势 21

一个智能的金融AI代理,它分析你的投资组合,获取实时市场数据,并通过多渠道提供个性化的见解,这些都由Arcade提供动力.

概览

一个智能的金融AI代理,它分析你的投资组合,获取实时市场数据,并通过多渠道提供个性化的见解,这些都由Arcade提供动力. MCPMarshal演示了如何使用一种将数据来源、持续内存和多渠道展示之间的关切区分开来的方法来构建生产准备的AI剂. 该应用程序展示了Arcade对Gmail,Notion,和Google Docs集成的无缝OAuth处理. - 管理持有量、购买价格和数量的多个投资组合 -- -- 自定义MCP服务器检索活股票价格、公司基本面和市场新闻 -- -- :LLM自主研究你的持有量,决定获取哪些数据以及关注点在哪里 -- -- :向Gmail、Notion或Google Docs发布单击OAuth的报告 -- -- 每周cron工作自动生成和电子邮件组合报告 -- -- :提问并观看AI自动调用工具以获取它需要的数据 拱门是...

概述(AI 翻译)

一个智能的金融AI代理,它分析你的投资组合,获取实时市场数据,并通过多渠道提供个性化的见解,这些都由Arcade提供动力.

□ 概览

MCP-Marshal演示了如何使用三层结构 建立一个生产准备的AI剂,这种结构将数据来源、持续内存和多渠道演示之间的关切分开。 该应用程序展示了Arcade对Gmail,Notion,和Google Docs集成的无缝OAuth处理.

~ 它会做什么 ~

  • 追踪你的组合**: 以持有量、购买价格和数量管理多种投资组合
  • Fetches实时数据:定制MCP服务器检索活股票价格、公司基本面和市场新闻
  • ** 积极报告生成**:LLM自主研究你的持有量,决定获取哪些数据以及将注意力集中在何处
  • ** " 任何地方的交付 " **:向Gmail、Notion或Google Docs发布单击 OAuth的报告
  • ** 排定自动化**: 每周工作自动生成和电子邮件组合报告
  • ** 代理聊天**:提问和观看AI自动调用工具,以获取它所需要的数据

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCPMarshal - Financial AI Agent

An intelligent financial AI agent that analyzes your investment portfolio, fetches real-time market data, and delivers personalized insights through multiple channels, all powered by Arcade.

Overview

MCPMarshal demonstrates how to build a production-ready AI agent using a three-layer architecture that separates concerns between data sourcing, persistent memory, and multi-channel presentation. The application showcases Arcade’s seamless OAuth handling for Gmail, Notion, and Google Docs integration.

What It Does

  • Tracks Your Portfolio: Manage multiple investment portfolios with holdings, purchase prices, and quantities
  • Fetches Real-Time Data: Custom MCP server retrieves live stock prices, company fundamentals, and market news
  • Agentic Report Generation: LLM autonomously researches your holdings, deciding what data to fetch and where to focus attention
  • Delivers Anywhere: Publish reports to Gmail, Notion, or Google Docs with one-click OAuth
  • Scheduled Automation: Weekly cron jobs automatically generate and email portfolio reports
  • Agentic Chat: Ask questions and watch the AI autonomously call tools to fetch the data it needs

Architecture

Layer Breakdown

Layer Purpose Technology
Data Source Fetches real-time financial data Custom MCP Server (Python + arcade-mcp)
Memory Persists portfolios, reports, and chat history PostgreSQL with Prisma ORM
Presentation Delivers insights through multiple channels Next.js Dashboard, Gmail, Notion, Google Docs

Arcade Integration

Arcade is the backbone that enables seamless multi-channel publishing without the complexity of managing OAuth flows manually.

How Arcade Powers This Application

1. Tool Execution via Arcade SDK

import Arcade from "@arcadeai/arcadejs";

const arcadeClient = new Arcade({ apiKey: process.env.ARCADE_API_KEY });

// Execute any tool with automatic auth handling
const response = await arcadeClient.tools.execute({
  tool_name: "Gmail.SendEmail",
  input: {
    subject: "Weekly Portfolio Report",
    body: reportHtml,
    recipient: userEmail,
    content_type: "html",
  },
  user_id: userId,
});

2. OAuth Authorization Flow

// Check if user has authorized Gmail
const authResponse = await arcadeClient.tools.authorize({
  tool_name: "Gmail.SendEmail",
  user_id: userId,
});

if (authResponse.status === "pending") {
  // Redirect user to Arcade's OAuth consent screen
  return { authorizationUrl: authResponse.authorization_url };
}

// User is authorized, proceed with tool execution

3. Supported Integrations

Tool Arcade Tool Name Use Case
Gmail Gmail.SendEmail Send portfolio reports via email
在 GitHub 查看完整 README

安装

npx prisma db push
新手?先看 mcpskill.org 教程 →