16
16
17
17
An MCP (Model Context Protocol) server and CLI tool for interacting with the Internet Archive's Wayback Machine without requiring API keys.
18
18
19
+ ** Built with** : [ MCP TypeScript Template] ( https://github.com/Mearman/mcp-template )
20
+
19
21
## Overview
20
22
21
23
This tool can be used in two ways:
@@ -30,12 +32,15 @@ Features:
30
32
31
33
## Features
32
34
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
39
44
40
45
## Tools
41
46
@@ -222,16 +227,83 @@ Add to your Claude Desktop settings:
222
227
223
228
## Development
224
229
230
+ ### Available Commands
231
+
225
232
``` 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
231
241
```
232
242
233
243
### 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
+ ```
235
307
236
308
## Resources
237
309
@@ -249,6 +321,10 @@ The project uses Vitest for testing. Tests are located alongside source files wi
249
321
- Cache responses when possible
250
322
- Include descriptive User-Agent header
251
323
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
+
252
328
## Authenticated APIs (Not Implemented)
253
329
254
330
For completeness, here are Internet Archive APIs that require authentication but are ** not included** in this MCP server:
0 commit comments