The Ravelry MCP Server provides an interface between AI assistants and the Ravelry API, making it possible to search for, explore, and retrieve knitting and crochet patterns through the Model Context Protocol (MCP).
Before installing the Ravelry MCP Server, ensure you have:
git clone <repository-url>
cd ravelry-mcp
npm install
# Create development environment file
cp .env.example .env.development
# Create production environment file
cp .env.example .env.production
Get your Ravelry username and password and add them to both environment files:
AUTH_USER=your_ravelry_username
AUTH_PASS=your_ravelry_password
To start the server with hot reload functionality:
npm run dev
Build and start the server for production use:
npm run build
npm start
Or use the shorthand command:
npm run prod
To enable Ravelry browsing capabilities in Claude:
Ensure your server is running locally or on an accessible remote host.
Option 1: Using the UI
Ravelry MCP
(or any preferred name)http://localhost:3000
for local development)Option 2: Using configuration command
"ravelry": {
"command": "node",
"args": [
"YOUR_CUSTOM_PATH/dist/index.js"
]
}
If Claude cannot connect to your MCP server, check that:
The server provides these tools for AI assistants:
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")Retrieves detailed information for a specific pattern.
Parameters:
id
: Pattern ID (required)Retrieves details for multiple patterns at once.
Parameters:
ids
: Array of pattern IDs (required)Once connected, you can ask Claude:
The server supports various filtering options including:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.