advice-slip-mcp-server
v1.0.0
Published
MCP server for the Advice Slip API - provides random advice and search functionality
Downloads
113
Maintainers
Readme
Advice Slip MCP Server
A Model Context Protocol (MCP) server that wraps the Advice Slip API, providing access to random advice slips and search functionality.
Features
- Get Random Advice: Retrieve a random piece of advice with a unique ID
- Get Advice by ID: Fetch specific advice slips using their ID number
- Search Advice: Search for advice slips containing specific keywords
Installation
Using npm (global)
npm install -g @mcp-server/advice-slipFrom source
git clone <repository-url>
cd advice-slip-mcp-server
npm install
npm run buildConfiguration
Add this server to your Claude Code configuration file (usually ~/.config/claude-code/config.json or %APPDATA%\claude-code\config.json on Windows):
{
"mcpServers": {
"advice-slip": {
"command": "node",
"args": ["path/to/advice-slip-mcp-server/dist/index.js"]
}
}
}If installed globally:
{
"mcpServers": {
"advice-slip": {
"command": "advice-slip-mcp"
}
}
}Available Tools
1. get_random_advice
Get a random advice slip.
Parameters: None
Example Response:
{
"slip": {
"id": 1,
"advice": "Always keep your nails clean."
}
}2. get_advice_by_id
Get a specific advice slip by its ID.
Parameters:
id(number, required): The advice slip ID (positive integer)
Example:
{
"id": 42
}Response:
{
"slip": {
"id": 42,
"advice": "Your temper is very valuable."
}
}3. search_advice
Search for advice slips containing a specific term or keyword.
Parameters:
query(string, required): The search term
Example:
{
"query": "life"
}Response:
{
"query": {
"total_results": 2,
"slips": [
{"id": 5, "advice": "Be yourself."},
{"id": 17, "advice": "Trust your instincts."}
]
}
}API Source
This MCP server wraps the free Advice Slip JSON API, which requires no authentication.
Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run watchLicense
MIT
