Skip to main content

langchain-feedmcp

LangChain 与 LangGraph 的 FeedMCP 官方工具包:让 Python Agent 用统一接口读取小红书(含蒲公英)、抖音(含星图与巨量算数)、微信公众号/视频号/搜一搜、微博、B站、知乎、快手及 TikTok、YouTube、X、Instagram、Reddit、LinkedIn 等 21 个平台 193 个公开数据接口。

官网中文文档 · 获取 API Key(送 $0.10 试用额度) · FeedMCP 主仓库


安装

pip install langchain-feedmcp
# 或从 GitHub 安装
pip install git+https://github.com/FeedMCP/langchain-feedmcp.git

快速上手

import os
from langchain_feedmcp import FeedMCPToolkit

toolkit = FeedMCPToolkit(
    api_key=os.environ.get("FEEDMCP_API_KEY"),  # find / describe 免 Key 免费
    default_max_price=0.05,  # 可选:单次调用价格上限保护 (X-Max-Price)
)
tools = toolkit.get_tools()
# [FeedMCPFindTool, FeedMCPDescribeTool, FeedMCPCallTool, FeedMCPAccountTool]

配合 LangGraph / LangChain Agent 使用

from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from langchain_feedmcp import FeedMCPToolkit

llm = ChatOpenAI(model="gpt-4o-mini")
tools = FeedMCPToolkit(default_max_price=0.05).get_tools()
agent = create_react_agent(llm, tools)

result = agent.invoke({
    "messages": [("user", "帮我找小红书上关于露营装备的高赞笔记,先查接口单价再拉取第一页")]
})

内置工具

工具名 鉴权 费用 说明
feedmcp_find 免 Key 免费 自然语言搜索匹配的 193 个接口与单价
feedmcp_describe 免 Key 免费 查看指定接口的必填参数、枚举值与精确单价
feedmcp_call API Key 按次计费($0.0003 起,失败免费) 执行单页数据查询,内置 X-Max-Price 与 Idempotency-Key
feedmcp_account API Key 免费 查询当前账户 USD 余额与近 24 小时用量

测试

uv run --with langchain-core --with httpx python -m unittest discover -s tests -v

License

MIT

Metadata

Release files for langchain-feedmcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-feedmcp 0.1.0
File Size Uploaded Provenance Actions
langchain_feedmcp-0.1.0.tar.gz 127.1 kB With provenance Details for langchain_feedmcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-feedmcp 0.1.0
File Interpreter ABI Platform Actions
langchain_feedmcp-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_feedmcp-0.1.0-py3-none-any.whl

Total release size: 135.7 kB

Release files / langchain_feedmcp-0.1.0.tar.gz

Download URL langchain_feedmcp-0.1.0.tar.gz
Size 127.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0eaaee0abb099b108183fc461a1f627afda24eb9de3b12d760742f1f3d70f0e6
BLAKE2b-256 checksum
How to use checksums
1077ab21c159be9c5470d22198e407812c19827a02298e5e4ad0ed65fcc147d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / langchain_feedmcp-0.1.0-py3-none-any.whl

Download URL langchain_feedmcp-0.1.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43ef1f960c32903428c4a3de92de8f443e4fffe27927d787068518a40412c7d7
BLAKE2b-256 checksum
How to use checksums
65711e0070e4722af8bc095cf430a402b9d7f13d3c0cfb5d74d5863850a03ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for langchain-feedmcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_feedmcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page