CFPB consumer complaints

io.github.bnovariniv0.1.3更新于 Oct 8, 2026

CFPB consumer complaints: 18M records, 3.85M archived narratives. Search, counts, trends.

已验证Streamable HTTP可网页运行Data & AnalyticsFinance

概览

AI 生成的概览

让助手查询 1820 万条 CFPB 消费者投诉和 385 万条存档叙述,用于计数、趋势、公司画像和关键词检索。

功能
以 Parquet 数据形式提供 CFPB 消费者投诉数据库,并通过 MCP 服务器供助手查询。工具包括 dataset_info、list_values、find_company、complaint_counts、trend、company_profile、compare_companies、search_narratives、count_narratives 和 get_complaint。可按公司、产品和日期统计与观察投诉趋势、比较公司,并对消费者叙述做关键词检索。
适用场景
适合消费者金融研究:某家银行或贷款机构的投诉量与趋势、公司之间的比较,以及查找提到透支费等话题的叙述。按日期、公司或产品过滤时效果最好,因为不加过滤的叙述检索很慢。
运行要求
提供远程端点,未声明需要身份验证。本地方式为用 pip 安装的 Python 包,以 stdio 命令启动;首次运行会下载约 700 MB 的 Parquet 文件到缓存目录。可选变量 CFPB_DATA_URL 和 CFPB_DATA_DIR 用于更改数据来源或读取目录。
安装前请注意
投诉是未经核实的消费者指控,计数为原始数据、未按公司规模折算,最近几个月数据不完整,叙述覆盖截至 2026-08-14 且 2015 年前没有。同一公司可能以多个名称出现。不加过滤的叙述检索约需十秒,跨全部年份的计数需 30 到 45 秒。

安装

在 SourceWeft 中

  1. 打开 控制台中的 CFPB consumer complaints,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "cfpb-complaints-analysis": {
      "type": "http",
      "url": "https://cfpb-complaints-analysis.fly.dev/mcp"
    }
  }
}

README

cfpb-complaints-analysis

The CFPB Consumer Complaint Database as clean Parquet, plus an MCP server so an AI assistant can query it: 18.2 million complaints (2011 to today) and 3.85 million consumer narratives.

What is in it

LayerSourceCoverage
Structured complaintsCFPB's public complaint file, files.consumerfinance.gov/ccdb/complaints.csv.zip18,239,728 complaints, received 2011-12-01 to 2026-10-07 (rebuild to refresh)
NarrativesCFPB FOIA Reading Room, "CFPB Consumer Complaint Database Narratives Archive"3,851,415 narratives, published through 2026-08-14, none before 2015

Both are CFPB's own files. Nothing comes from a third party. CFPB describes the narratives as public domain for FOIA purposes, and says on its data page that complaint data is "freely available for anyone to use, analyze, and build on."

The narrative freeze

CFPB stopped publishing complaint narratives in September 2026 (database release 24, and the Aug 14, 2026 announcement that it would cease discretionary publication of narratives and visualizations). It moved the previously published narratives to its FOIA Reading Room. The live complaint file has no narrative column any more.

This project joins the archived narratives back to the live complaints by Complaint ID. So:

  • Narratives exist only for complaints CFPB had published with one through 2026-08-14. Complaints from after that have none, and it will stay that way.
  • Fewer than half of complaints ever had a narrative: the consumer had to consent, and none were published before 2015.
  • The archive thins out near the end: about 17,000 narratives each for May and June 2026, about 10,000 for July, and 1 for August. This is in CFPB's source files, so 2026 narrative counts are not comparable to earlier months.
  • Narratives are scrubbed by CFPB (personal data shows as XXXX).
  • Structured fields keep updating when you rebuild from CFPB's live file.

Use it

pip install cfpb-complaints-analysiscfpb-complaints-mcp

The first run downloads the Parquet files (about 700 MB) from the hosted service to ~/.cache/cfpb-complaints-analysis. Set CFPB_DATA_URL to fetch them from somewhere else, or CFPB_DATA_DIR to use a folder you built yourself. Add the server to your MCP client as a stdio command, or use the hosted endpoint listed in the MCP registry as io.github.bnovarini/cfpb-complaints-analysis.

Tools: dataset_info, list_values, find_company, complaint_counts, trend, company_profile, compare_companies, search_narratives, count_narratives, get_complaint.

Example questions: What do people complain about at Navy Federal versus PenFed? How did mortgage complaints about Rocket change by year? Find 2024 narratives that mention "overdraft fee" at a credit union.

Build it yourself from CFPB's sources: cfpb-complaints --data data build.

Read this before quoting numbers

  • Complaints are unverified consumer allegations. CFPB says so itself.
  • Counts are raw. A large company will have more complaints than a small one; nothing is scaled by customers or accounts.
  • CFPB lists some firms under several names. Use find_company and company_contains to include all variants.
  • The newest months are partial: complaints are still being sent to companies, and "In progress" is a status, not an outcome.
  • Keyword narrative search scans text. Unfiltered searches take about ten seconds, and counts across all years can take 30 to 45 seconds. A date, company or product filter makes them much faster.

Checks

Every count is reconciled to CFPB's own published numbers. See docs/AUDIT.md, including the figures that do not match and why.

License

MIT for the code. The data is CFPB's.

来源:README.md,提交 79c73df

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v0.1.3最新Oct 8, 2026