Skip to main content
Glama
portfolio-mcp

portfolio-mcp

by NawafSheikh

portfolio-mcp

一个 MCP 服务器,用于读取一个包含多个项目的目录,并告诉你其中有什么:每个项目使用什么技术栈、是否在 git 中、部署在哪里、哪些已经过时,以及哪些最接近盈利。

它是只读的。它永远不会写入、移动或删除它扫描的任何内容。

安装

npx portfolio-mcp --root /path/to/your/projects

使用 Claude Code 注册它:

claude mcp add --scope user portfolio \
  -e PORTFOLIO_ROOT=/path/to/your/projects \
  -- npx -y portfolio-mcp

或者在读取 mcpServers 的任何客户端中:

{
  "mcpServers": {
    "portfolio": {
      "command": "npx",
      "args": ["-y", "portfolio-mcp"],
      "env": { "PORTFOLIO_ROOT": "/path/to/your/projects" }
    }
  }
}

Related MCP server: Charlie Work

配置

没有任何硬编码。扫描根目录按以下顺序解析:

  1. 命令行中的 --root <path>(或 --root=<path>)

  2. PORTFOLIO_ROOT 环境变量

  3. 进程的工作目录

变量

默认值

用途

PORTFOLIO_ROOT

工作目录

存放要扫描项目的目录

PORTFOLIO_VPS_HOST

未设置

标识自托管部署的主机名或地址。未设置时,永远不会报告 vps 平台

PORTFOLIO_OFFLINE

未设置

设置为 1 以拒绝唯一会访问包注册表的工具

_archive、_backups、node_modules、.git 以及点开头的目录都会被跳过。

工具

清单

工具

说明

list_projects

所有项目,可按技术栈、部署状态、平台或 GitHub 是否存在进行筛选

get_project

深入查看单个项目:技术栈、依赖、git、部署、就绪情况、代码行数

search_projects

按名称、描述、框架、依赖或类别进行匹配

部署

工具

说明

deployment_map

所有项目按平台分组:Vercel、Netlify、Railway、Docker、自托管、仅本地

check_health

单个项目携带的部署配置,以及其 git 状态

git_overview

未提交的改动、缺失的远程仓库、超过 90 天未更新的仓库、完全没有 git 的目录

收入

工具

说明

revenue_scan

对单个项目进行 1 到 10 的打分,涵盖认证、支付、落地页、部署、API、README

find_opportunities

对所有项目进行排序,并找出其中速胜的机会

suggest_actions

给出单个项目的具体后续步骤,按优先级排序

learn_patterns

汇总视图:常用框架、反复出现的技术栈、优势

维护

工具

说明

outdated_deps

对单个项目运行 npm outdated、npm audit 和 pip list --outdated

stale_projects

按距离上次提交的天数排序项目

它涉及的内容

需要明确这一点,因为这个服务器会读取你关心的目录:

  • 只读。 没有工具会写入、移动、重命名或删除文件。

  • 路径隔离。 项目名是一个目录项。路径分隔符、..、绝对路径、盘符、空字节和 Windows 设备名都会被拒绝,解析后的路径随后会被检查是否位于配置的根目录内。没有任何办法让它读取相邻目录。

  • 不调用 shell。 每个子进程都通过 execFileSync 并使用参数数组运行。目录名永远不会被拼接成命令字符串。

  • 子进程。 git 用于获取仓库状态;npm / pip 只在 outdated_deps 中运行。

  • 网络。 只有 outdated_deps 会访问 npm 和 PyPI 包注册表,因为这是 npm outdated、npm audit 和 pip list --outdated 的行为。设置 PORTFOLIO_OFFLINE=1 后,它会拒绝访问。其他所有工具都在本地运行。

  • 不读取凭据。 服务器不读取任何令牌,也不向任何地方发送任何内容。

评分

revenue_scan 和 find_opportunities 会根据易于检测的信号产生 1 到 10 的评分:部署配置、认证库、支付库、登录页入口、README、git 远程、API 框架,再加上一个类别乘数。这是一种用于对大型目录进行排序的分诊启发式方法,而不是估值。请将排名视为“先看这些”,而不是一个本身就具有意义的数字。

开发

npm ci
npm run build
npm test          # builds, then runs node --test
npm pack --dry-run

许可证

MIT。见 LICENSE。

Available Tools

12 tools
check_healthB

Check if a deployed project is reachable. Pings known URLs for Vercel/Netlify projects.

Inputs: name (required).

deployment_mapA

Full deployment overview: what's on Vercel, VPS, Netlify, Railway, Docker, or local-only. Grouped by platform.

Inputs: no named parameters.

find_opportunitiesA

Rank ALL projects by revenue potential. Returns top opportunities with scores, what's ready, what's missing, effort estimate, and suggested pricing.

Inputs: no named parameters.

get_projectB

Get deep info about one project: stack, deps, git, deployment, revenue readiness, LOC.

Inputs: name (required).

git_overviewA

Scan all projects for git state: uncommitted changes, no remote, stale repos (90+ days without commits).

Inputs: no named parameters.

learn_patternsA

Scan ALL projects to learn the developer's patterns: preferred frameworks, common stacks, architecture choices, strengths. Claude uses this to build better.

Inputs: no named parameters.

list_projectsB

List all projects with optional filters. Returns name, stack, deployment, github, last modified.

Inputs: stack, status, platform, hasGithub.

outdated_depsB

Check a project for outdated npm/pip dependencies and security vulnerabilities.

Inputs: name (required).

revenue_scanA

Analyze a project's monetization readiness. Checks auth, payments, landing page, deployment, API, README. Returns score 1-10 and suggested path.

Inputs: name (required).

search_projectsA

Search across project names, READMEs, package descriptions, and dependency names.

Inputs: query (required).

stale_projectsB

Find projects with no git commits in 90+ days, sorted by staleness.

Inputs: no named parameters.

suggest_actionsB

For a project, generate concrete monetization steps in priority order.

Inputs: name (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 12 tools

    Disambiguation2/5

    Several tools have overlapping boundaries. git_overview and stale_projects both identify projects with no commits in 90+ days, and deployment_map and list_projects both provide project lists with deployment information. This creates real ambiguity for an agent choosing between them.

    Naming Consistency4/5

    Most tools follow a clear verb_noun pattern like list_projects, get_project, search_projects, check_health, and find_opportunities. The exceptions are deployment_map and git_overview, which are noun phrases rather than verb-led names, but the naming remains largely predictable and readable.

    Tool Count4/5

    Twelve tools is within a reasonable range for a portfolio analysis server and each tool serves a distinct functional area overall. The count is slightly higher than necessary due to redundant stale-project logic and the partial overlap between deployment_map and list_projects, but it is not excessive.

    Completeness4/5

    The tool surface covers project discovery, deep inspection, deployment status, health checks, git hygiene, dependency vulnerabilities, revenue analysis, and opportunity ranking. Minor gaps exist, such as no bulk dependency scan across all projects and no direct action/deploy tools, but these are workable within the server's apparent analysis-focused purpose.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Scans codebases for TODOs, FIXMEs, code complexity, file stats, and dependencies, generating a health report with a letter grade. Zero configuration required.
      5 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Scans repositories to produce a readiness score and actionable fixes across positioning, tryability, community, MCP, and monetization, plus generates launch assets and sponsor-tier ideas.
      5 npm
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Scores local git repositories for README substance, license, package description, TypeScript config, tests, and GitHub Actions, providing a numbered hygiene report.
      2
      MIT