Skip to main content

Usage

docs-mcp-server remove <library> [options]

Arguments

library
string
required
Name of the library to remove

Options

--version, -v
string
Version to remove (optional). If omitted, removes the latest version.
--server-url
string
URL of external pipeline worker RPC endpoint (e.g., http://localhost:8080/api).When specified, removes documentation from the remote worker.

Examples

Remove Latest Version

# Remove the latest version of React
docs-mcp-server remove react

Remove Specific Version

# Remove React 18.0.0
docs-mcp-server remove react --version 18.0.0

Remove from Remote Worker

# Remove from remote documentation index
docs-mcp-server remove react --version 18.0.0 \
  --server-url http://worker.example.com:8080/api

Output

Successful removal:
 Successfully removed [email protected].
Without version:
 Successfully removed react.

Behavior

Version Not Specified

When no version is provided, the command removes the latest indexed version:
docs-mcp-server remove react
# Removes the most recent React version in the index

Multiple Versions

The command only removes the specified version. Other versions remain:
# Before: [email protected], [email protected], [email protected]
docs-mcp-server remove react --version 18.0.0
# After: [email protected], [email protected]

Complete Removal

To remove all versions, run the command for each version:
docs-mcp-server remove react --version 18.0.0
docs-mcp-server remove react --version 17.0.2
docs-mcp-server remove react --version 16.14.0
Or list versions first:
# Get all versions
docs-mcp-server list

# Remove each version
for version in 18.0.0 17.0.2 16.14.0; do
  docs-mcp-server remove react --version $version
done

Permanent Deletion

Removal is permanent and cannot be undone. To restore:
# Re-scrape the library
docs-mcp-server scrape react https://react.dev --version 18.0.0

Error Handling

Library Not Found
 Failed to remove mylib: Library not found in index
Verify the library exists:
docs-mcp-server list
Version Not Found
 Failed to remove [email protected]: Version not found
Check available versions:
docs-mcp-server list

Use Cases

Free Up Storage

Remove old or unused versions:
# Remove outdated versions
docs-mcp-server remove react --version 16.14.0
docs-mcp-server remove react --version 17.0.2

Clean Before Re-scraping

Remove and re-index to ensure fresh data:
# Remove old version
docs-mcp-server remove react --version 18.0.0

# Scrape fresh version
docs-mcp-server scrape react https://react.dev --version 18.0.0
The scrape command with --clean (default) automatically removes existing data before scraping, so explicit removal is usually not necessary.

Remove Incorrect Data

Fix scraping mistakes:
# Wrong library name used
docs-mcp-server remove wrong-name

# Scrape with correct name
docs-mcp-server scrape correct-name https://example.com

Performance

The remove command is fast and does not require embedding model initialization. It only deletes records from the document store. Removal time depends on the number of documents:
  • Small libraries (< 100 pages): < 1 second
  • Medium libraries (100-500 pages): 1-3 seconds
  • Large libraries (> 500 pages): 3-10 seconds

Verification

Confirm removal with the list command:
# Before removal
docs-mcp-server list
# Shows: [email protected], [email protected]

docs-mcp-server remove react --version 18.0.0

# After removal
docs-mcp-server list
# Shows: [email protected]

See Also

  • scrape - Add or re-index documentation
  • list - View indexed libraries and versions
  • refresh - Update existing documentation without removing

Build docs developers (and LLMs) love