MCP for letting Claude search Ravelry
What is gpaul mcp MCP ravelry
Ravelry MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with the Ravelry API, allowing AI assistants to search for, explore, and retrieve knitting and crochet patterns.
*
*
๐ Overview
This MCP server wraps the Ravelry API to create a reliable interface that can be used by AI assistants. It provides tools to:
- Search for knitting and crochet patterns
- Get detailed pattern information
- Retrieve multiple pattern details at once
This project was inspired by my girlfriend, whose passion for knitting and crochet encouraged me to create this bridge between AI assistants and the Ravelry crafting community. Since she's not very tech-savvy and somewhat skeptical about AI, this serves as my way of connecting with her interests and showing how technology can enhance her crafting experience rather than replace it.
๐ Features
- ๐ Pattern Search: Search Ravelry's database of patterns using keywords and filters
- ๐ Pattern Details: Get comprehensive information about specific patterns
- ๐งถ Craft Filtering: Filter patterns by craft type (knitting or crochet)
- ๐ฐ Price Options: Filter patterns by availability (free, paid, etc.)
- ๐ค AI Assistant Integration: Designed to work with AI assistants through the Model Context Protocol
๐ Prerequisites
- Node.js (v14 or higher)
- npm or yarn
- Ravelry API credentials (username and password)
๐ง Installation
-
Clone the repository
git clone <repository-url> cd ravelry-mcp
-
Install dependencies
npm install
-
Set up environment variables
# Create development environment file cp .env.example .env.development # Create production environment file cp .env.example .env.production
-
Configure API credentials
- Get your Ravelry username and password
- Add your credentials to both
.env.development
and.env.production
files:AUTH_USER=your_ravelry_username AUTH_PASS=your_ravelry_password
๐ฎ Usage
Development Mode
npm run dev
This starts the MCP server in development mode with hot reload.
Production Mode
npm run build
npm start
Or use the shorthand:
npm run prod
๐ Integrating with Claude Desktop
To add this MCP server to Claude Desktop and enable Ravelry browsing capabilities:
-
Start the MCP server Make sure your server is running locally or on a remote host that Claude Desktop can access.
-
Open Claude Desktop settings
- Launch Claude Desktop
- Click on your profile picture or icon in the top right
- Select "Settings" from the dropdown menu
-
Navigate to Extensions settings
- In the Settings sidebar, click on "Extensions"
- Select "Add Custom MCP"
4.1 Configure the MCP connection
- Name:
Ravelry MCP
(or any name you prefer) - URL: Enter the URL where your MCP server is running (e.g.,
http://localhost:3000
for local development) - Click "Add MCP"
4.2 Alternative: Configure the MCP connection via command
- You first need to build the project and provide your full path to the compiled server
- Add the following to your Claude Desktop configuration:
"ravelry": {
"command": "node",
"args": [
"YOUR_CUSTOM_PATH/dist/index.js"
]
}
-
Enable the MCP
- Toggle the switch next to your newly added Ravelry MCP to enable it
- Claude Desktop will attempt to connect to your MCP server
-
Verify connection
- Start a new conversation with Claude
- Type "Can you help me find some knitting patterns on Ravelry?"
- Claude should now be able to use the Ravelry tools to search and browse patterns
-
Troubleshooting
- If Claude cannot connect to your MCP server, check that:
- The server is running and accessible from Claude Desktop
- The correct URL is configured in Claude Desktop settings
- Your API credentials are valid and properly configured in the server
- If Claude cannot connect to your MCP server, check that:
Usage Examples with Claude
Once connected, you can ask Claude to:
- "Find me some free crochet hat patterns on Ravelry"
- "Search for knitting patterns for socks"
- "Get more details about pattern ID 12345"
- "Find patterns that are suitable for beginners"
๐ง Available Tools
The server exposes several tools that can be used by AI assistants:
search-patterns
Searches for patterns based on query parameters.
Parameters:
query
: Search term (required)page
: Page number for pagination (default: 1)craft
: Craft type (e.g., "knitting", "crochet")availability
: Price filter (default: "free", options: "free", "ravelry", "online")
get-pattern-details
Retrieves detailed information for a specific pattern.
Parameters:
id
: Pattern ID (required)
get-multiple-pattern-details
Retrieves details for multiple patterns at once.
Parameters:
ids
: Array of pattern IDs (required)
๐ How It Works
The server uses axios to make authenticated requests to the Ravelry API:
- Authenticates requests using Basic Auth with your Ravelry credentials
- Makes requests to various Ravelry API endpoints
- Parses and returns the data in a structured format
- Exposes endpoints as MCP tools that can be called by AI assistants
๐ ๏ธ Project Structure
src/
โโโ class/
โ โโโ ravelry.class.ts # Main client for Ravelry API
โโโ endpoints/
โ โโโ getMultiplePatternDetails.ts # Get details for multiple patterns
โ โโโ getPatternDetails.ts # Get details for a single pattern
โ โโโ searchPatterns.ts # Search for patterns
โ โโโ index.ts # Endpoint exports
โโโ types/
โ โโโ patternDetailed.d.ts # Type definitions for detailed patterns
โ โโโ patternSimple.d.ts # Type definitions for simple patterns
โโโ index.ts # Entry point and MCP server setup
โ๏ธ Development
Environment Configuration
The server uses different environment files for development and production:
.env.development
- Used when running in development mode.env.production
- Used when running in production mode
Testing
Run the test suite with:
npm test
Linting and Formatting
# Run ESLint
npm run lint
# Fix ESLint errors
npm run lint:fix
# Format code with Prettier
npm run format
๐ Notes for Deployment
When deploying to production:
- Ensure your
.env.production
file contains valid Ravelry credentials - The build process will embed these credentials in the compiled code
- Use
npm run prod
to build and start the production server
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Leave a Comment
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
Brave Search MCP
Integrate Brave Search capabilities into Claude through MCP. Enables real-time web searches with privacy-focused results and comprehensive web coverage.
chrisdoc hevy mcp
sylphlab pdf reader mcp
An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.
aashari mcp server atlassian bitbucket
Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.
aashari mcp server atlassian confluence
Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.
prisma prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
Zzzccs123 mcp sentry
mcp sentry for typescript sdk
zhuzhoulin dify mcp server
zhongmingyuan mcp my mac
zhixiaoqiang desktop image manager mcp
MCP ๆๅกๅจ๏ผ็จไบ็ฎก็ๆก้ขๅพ็ใๆฅ็่ฏฆๆ ใๅ็ผฉใ็งปๅจ็ญ๏ผๅฎๅ จ่ฎฉTraeๅฎ็ฐ๏ผ
Submit Your MCP Server
Share your MCP server with the community
Submit Now