npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wac-public-mcp-server/asset-allocation

v0.6.5

Published

MCP server for asset allocation

Downloads

18

Readme

asset-allocation 资产配置 MCP 服务器

npm version npm downloads

简介

这是一个资产配置的 MCP 服务器,提供两种主要功能:生成资产配置和分析资产配置。该服务器可以根据用户的投资风格和资产规模生成推荐的资产配置,并提供相应的分析。

  1. generate-asset-allocation: 成资产配置。
  2. analyze-asset-allocation: 分析给定的资产配置。

功能

工具列表

1. generate-asset-allocation

  • 描述: 根据投资风格生成资产配置。
  • 输入参数:
    • riskAppetite (string): 投资风格,可选值为 保守型稳健型进取型
    • assetScale (number): 资产配置的规模。
  • 返回结构:
    {
      "assetAllocation": {
          "input": "好的,你的理财需求我已悉心领会。你的目标清晰明确,考虑到你偏好稳健且风险较低的投资方式,我推荐“保守型”配置策略,即60%稳健资产+40%进阶资产。以下是详细分析:\n\n1. **稳健为主,确保资金安全**: 该方案通过60%的稳健资产配置,如固收类国内基金和美国固收类ETF,可以提供稳定的收益,降低整体组合的波动性。这些资产具有较低的风险和较高的流动性,适合保守型投资者。\n2. **适度进取,捕捉市场机会**: 40%的进阶资产配置,如权益型国内基金和A股低估行业的优质股票,可以在市场上涨时捕捉更多收益机会。这些资产虽然风险较高,但在保守型投资者的承受范围内,能够为组合带来一定的增值潜力。\n3. **平衡配置,优化风险收益**: 通过稳健资产和进阶资产的合理搭配,该方案在确保资金安全的同时,适度参与市场机会,实现风险与收益的平衡。这种配置方式在当前市场环境下,既能享受稳健资产的稳定收益,又能适度参与进阶资产的收益机会。\n\n综上,保守型配置策略在确保资金安全的同时,适度参与市场机会,非常适合你当前的投资需求和风险偏好。\n\n优选产品列表供投资参考:"
      },
      "fundList": {
        "type": "fundList",
        "data": [
          {
            "dailyIncrDate": "04-28",
            "dailyIncrRate": 0,
            "fundCode": "110017",
            "fundName": "易方达增强回报债券A",
            "gr1yearIncrRate": 3.68,
            "gr1yearIncrText": "近一年收益率",
            "netRate": 1.361,
            "url": "http://fund.wacaijijin.com/product/pages/fund/gj/detail?productCode=110017"
          }
        ]
      },
      "stockList": {
        "type": "stockList",
        "data": [
          {
            "name": "陕西能源",
            "code": "001286.SZ",
            "price": 9.4,
            "comprehensiveValuation5yLevel": 2,
            "financialQualityLevel": 3,
            "peTtm": "12.70",
            "pb": "1.50",
            "dividendRate": "3.72",
            "pctChange250": "-4.08",
            "url": "https://fucha.yuancaiyun.com/m/stockDetail?code=001286.SZ"
          }
        ]
      },
      "etfList": {
        "type": "etf",
        "data": [
          {
            "id": 2537,
            "securityCode": "TSLL",
            "securityName": "Direxion Daily TSLA Bull 1.5X Shares ETF",
            "shortCode": "TSLL",
            "industry": "特斯拉公司",
            "fundCategory": "股票",
            "annualReturn": "135.5300",
            "maxDrawdown": "-66.2100",
            "fundSize": "33.9000"
          }
        ]
      }
    }

2. analyze-asset-allocation

  • 描述: 分析给定的资产配置。
  • 输入参数:
    • riskAppetite (string): 投资风格,可选值为 保守型稳健型进取型
    • assetList (array): 资产列表,每个资产包含以下字段:
      • type (string): 资产类型,可选值为 股票债券基金期货现金
      • detail (string): 资产的详细信息。
      • percentage (number): 资产的占比。
  • 返回结构:
    {
      "analyze": "投资风格是进取型,这种类型的投资者通常寻求较高的回报,更愿意承担风险。然而,此处的资产配置看起来较为保守。进取型投资者的资产配置通常会倾向于更高风险和更高收益的资产如股票、房地产、私募基金等。\n\n当前的资产配置为50%现金和50%债券。一方面,现金虽然安全,但收益较低,不适合进取型投资者。另一方面,债券虽然比现金收益稍高,但相对于股票和其他高收益资产,其收益仍然较低。\n\n建议的优化方案是:\n- 现金:降低到20%,以保留一部分流动性和应对紧急情况的资金。\n- 债券:降低到20%,以保持一定的稳定收益。\n- 股票:增加到40%,这对于进取型投资者来说是一个适中的比例,股票虽然风险较高,但收益也可能较高。\n- 房地产:增加到10%,可以为投资组合提供稳定的收益和对抗通货膨胀的保护。\n- 其他高风险高收益资产(如:私募基金、期权、商品等):增加到10%,这些高风险高收益的资产可以提高投资组合的整体收益。\n\n另外,投资者还应考虑多元化投资,以降低单一资产的风险。同时,也需要定期进行资产配置的调整,以适应市场情况的变化。"
    }

环境变量

运行服务器需要以下环境变量:

  • WACAI_MCP_SECRET_KEY: 用于 API 请求的密钥。

密钥申请 点此申请

安装与运行

全局安装

运行以下命令全局安装:

npm install -g @wac-public-mcp-server/asset-allocation

启动服务器

全局安装后,可以通过以下命令启动服务器:

mcp-server-asset-allocation

服务器将通过标准输入输出 (stdio) 进行通信。

客户端配置

{
  "mcpServers": {
    "asset-allocation": {
      "command": "mcp-server-asset-allocation",
      "args": [],
      "env": {
        "WACAI_MCP_SECRET_KEY": "YOUR_SECRET_KEY"
      }
    }
  }
}

wac-mcp-server-asset-allocation

许可证

此项目遵循 MIT 许可证。