
RedNote MCP
A friendly tool to help you access and interact with Xiaohongshu (RedNote) content through Model Context Protocol.
What is RedNote MCP?
RedNote MCP is a user-friendly tool designed to help users access and interact with Xiaohongshu (RedNote) content through the Model Context Protocol.
How to use RedNote MCP?
To use RedNote MCP, install it via NPM or build it from source. After installation, run rednote-mcp init
to log in and set up your account, which saves your login information securely.
Key features of RedNote MCP?
- Automatic cookie management for seamless login
- Keyword search through notes
- Command-line tools for easy interaction
- URL-based content viewing
Use cases of RedNote MCP?
- Accessing and managing Xiaohongshu notes efficiently.
- Searching for specific content within notes using keywords.
- Integrating with other tools via command-line interface.
FAQ from RedNote MCP?
- Is RedNote MCP easy to set up?
Yes! Just follow the installation instructions and run the initialization command.
- Can I use RedNote MCP without logging in?
No, logging in is required to access and manage your notes.
- What if my login expires?
You can simply run the
init
command again to log in.
RedNote MCP
A friendly tool to help you access and interact with Xiaohongshu (RedNote) content through Model Context Protocol.
https://github.com/user-attachments/assets/06b2c67f-d9ed-4a30-8f1d-9743f3edaa3a
Getting Started
Before getting started, make sure the playwright is installed:
npx playwright install
Install via NPM
The easiest way to get started is to install RedNote MCP globally:
# Install the package globally
npm install -g rednote-mcp
# Set up your account
rednote-mcp init # This will save your login info to ~/.mcp/rednote/cookies.json
Build from Source
If you prefer to build from source:
# Get the code
git clone https://github.com/ifuryst/rednote-mcp.git
cd rednote-mcp
# Set up the project
npm install
# Optional: Install globally for easier CLI access
npm install -g .
# Or just run it directly for initial setup
npm run dev -- init
What's Included
Here's what you can do with RedNote MCP:
- Log in and stay logged in (with automatic cookie management)
- Search through notes using keywords
- Use our handy command-line tools
- View note content using URLs
Coming soon:
- Access comment sections using URLs
How to Use
First Time Setup
Before you start, you'll need to log in. You have a few options:
rednote-mcp init
# If you installed from source:
npm run dev -- init
# Or simply use the login option in mcp-client
Here's what happens:
- Your browser will open automatically
- You'll see the Xiaohongshu login page
- Log in like you normally would
- Once you're in, we'll save your login info to
~/.mcp/rednote/cookies.json
Setting up in Cursor
To use RedNote MCP in Cursor, add this to your settings.json:
{
"mcpServers": {
"RedNote MCP": {
"command": "rednote-mcp",
"args": [
"--stdio"
]
}
}
}
Or if you prefer using npx:
{
"mcpServers": {
"RedNote MCP": {
"command": "npx",
"args": [
"rednote-mcp",
"--stdio"
]
}
}
}
A few things to note:
- You can use either the global command (
rednote-mcp
) ornpx
- Make sure to include
--stdio
- it's needed for Cursor communication
Development
What You'll Need
- Node.js version 16 or newer
- npm version 7 or newer
Development Commands
# Get everything installed
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Run the test suite
npm test
Debugging with MCP Inspector
Need to debug? MCP Inspector is your friend:
npx @modelcontextprotocol/inspector npx rednote-mcp --stdio
This will:
- Start up the Inspector
- Run RedNote MCP through it
- Give you a nice interface to watch requests and responses
- Help you understand what's happening under the hood
Important Things to Know
- Don't forget to run
init
when you first start - Keep your cookie file safe - it has your login info
- Your login might expire occasionally - just log in again when it does
- Make sure you have Node.js set up properly
Want to Contribute?
We'd love your help! Here's how:
- Fork this repo
- Create a branch for your feature (
git checkout -b feature/CoolNewThing
) - Make your changes (
git commit -m 'Added this cool new thing'
) - Push it up (
git push origin feature/CoolNewThing
) - Open a Pull Request
License
This project is under the MIT License - check out the LICENSE file for the details