Skip to content

Commit c5d0572

Browse files
committed
docs: enhance Wayback Machine README with examples and troubleshooting
- Add link to MCP template at the top - Add emoji icons to features for better readability - Include Claude Desktop usage examples - Add CLI script examples for automation - Add troubleshooting section with common issues - Expand development commands documentation - Add community resources and forum links - Document debug mode for both CLI and MCP server
1 parent 34cc7b5 commit c5d0572

File tree

1 file changed

+88
-12
lines changed

1 file changed

+88
-12
lines changed

README.md

Lines changed: 88 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
An MCP (Model Context Protocol) server and CLI tool for interacting with the Internet Archive's Wayback Machine without requiring API keys.
1818

19+
**Built with**: [MCP TypeScript Template](https://github.com/Mearman/mcp-template)
20+
1921
## Overview
2022

2123
This tool can be used in two ways:
@@ -30,12 +32,15 @@ Features:
3032

3133
## Features
3234

33-
- **No API keys required** - Uses public Wayback Machine endpoints
34-
- **Save pages** - Archive any publicly accessible URL
35-
- **Retrieve archives** - Get archived versions with optional timestamps
36-
- **Archive statistics** - Get capture counts and yearly statistics
37-
- **Search archives** - Query available snapshots with date filtering
38-
- **Rate limiting** - Built-in rate limiting to respect service limits
35+
- 🔐 **No API keys required** - Uses public Wayback Machine endpoints
36+
- 💾 **Save pages** - Archive any publicly accessible URL
37+
- 🔄 **Retrieve archives** - Get archived versions with optional timestamps
38+
- 📊 **Archive statistics** - Get capture counts and yearly statistics
39+
- 🔍 **Search archives** - Query available snapshots with date filtering
40+
- ⏱️ **Rate limiting** - Built-in rate limiting to respect service limits
41+
- 💻 **Dual mode** - Use as MCP server or standalone CLI tool
42+
- 🎨 **Rich CLI output** - Colorized output with progress indicators
43+
- 🔒 **TypeScript** - Full type safety with Zod validation
3944

4045
## Tools
4146

@@ -222,16 +227,83 @@ Add to your Claude Desktop settings:
222227

223228
## Development
224229

230+
### Available Commands
231+
225232
```bash
226-
yarn dev # Run in development mode with hot reload
227-
yarn test # Run tests
228-
yarn test:watch # Run tests in watch mode
229-
yarn build # Build for production
230-
yarn start # Run production build
233+
yarn dev # Run in development mode with hot reload
234+
yarn test # Run tests with coverage
235+
yarn test:watch # Run tests in watch mode
236+
yarn build # Build for production
237+
yarn start # Run production build
238+
yarn lint # Check code style
239+
yarn lint:fix # Auto-fix code style issues
240+
yarn format # Format code with Biome
231241
```
232242

233243
### Testing
234-
The project uses Vitest for testing. Tests are located alongside source files with `.test.ts` extensions.
244+
245+
The project uses Vitest for testing with the following features:
246+
- Unit tests for all tools and utilities
247+
- Integration tests for CLI commands
248+
- Coverage reporting with c8
249+
- Tests located alongside source files (`.test.ts`)
250+
251+
Run tests:
252+
```bash
253+
# Run all tests with coverage
254+
yarn test
255+
256+
# Run tests in watch mode during development
257+
yarn test:watch
258+
259+
# Run CI tests with JSON reporter
260+
yarn test:ci
261+
```
262+
263+
## Examples
264+
265+
### Using with Claude Desktop
266+
267+
Once configured, you can ask Claude to:
268+
- "Save https://example.com to the Wayback Machine"
269+
- "Find archived versions of https://example.com from 2023"
270+
- "Check if https://example.com has been archived"
271+
- "Get the latest archived version of https://example.com"
272+
273+
### CLI Script Examples
274+
275+
```bash
276+
# Archive multiple URLs
277+
for url in "https://example.com" "https://example.org"; do
278+
wayback save "$url"
279+
sleep 5 # Be respectful with rate limiting
280+
done
281+
282+
# Check if a URL was archived today
283+
wayback search "https://example.com" --from $(date +%Y-%m-%d) --to $(date +%Y-%m-%d)
284+
285+
# Export archive data
286+
wayback search "https://example.com" --limit 100 > archives.txt
287+
```
288+
289+
## Troubleshooting
290+
291+
### Common Issues
292+
293+
1. **"URL not found in archive"**: The URL may not have been archived yet. Try saving it first.
294+
2. **Rate limit errors**: Add delays between requests or reduce request frequency.
295+
3. **Connection timeouts**: Check your internet connection and try again.
296+
4. **Invalid timestamp format**: Use YYYYMMDDhhmmss format (e.g., 20231225120000).
297+
298+
### Debug Mode
299+
300+
```bash
301+
# Enable debug output
302+
DEBUG=* wayback save https://example.com
303+
304+
# Check MCP server logs
305+
DEBUG=* node dist/index.js
306+
```
235307

236308
## Resources
237309

@@ -249,6 +321,10 @@ The project uses Vitest for testing. Tests are located alongside source files wi
249321
- Cache responses when possible
250322
- Include descriptive User-Agent header
251323

324+
### Community
325+
- [MCP Discord](https://discord.gg/mcp) - Get help and share your experience
326+
- [Internet Archive Forum](https://archive.org/about/forum.php) - Wayback Machine discussions
327+
252328
## Authenticated APIs (Not Implemented)
253329

254330
For completeness, here are Internet Archive APIs that require authentication but are **not included** in this MCP server:

0 commit comments

Comments
 (0)