Skip to main content
Glama
Fabien-desablens

MCP Webpage Timestamps

MCP Webpage Timestamps

npm version License: MIT Node.js Version

A powerful Model Context Protocol (MCP) server for extracting webpage creation, modification, and publication timestamps. This tool is designed for web scraping and temporal analysis of web content.

Features

  • Comprehensive Timestamp Extraction: Extracts creation, modification, and publication timestamps from webpages

  • Multiple Data Sources: Supports HTML meta tags, HTTP headers, JSON-LD, microdata, OpenGraph, Twitter cards, and heuristic analysis

  • Confidence Scoring: Provides confidence levels (high/medium/low) for extracted timestamps

  • Batch Processing: Extract timestamps from multiple URLs simultaneously

  • Configurable: Customizable timeout, user agent, redirect handling, and heuristic options

  • Production Ready: Robust error handling, comprehensive logging, and TypeScript support

Related MCP server: Scrapezy MCP Server

Installation

Quick Install

npm install -g mcp-webpage-timestamps

Usage with npx

npx mcp-webpage-timestamps

Installing via Smithery

To install mcp-webpage-timestamps for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @Fabien-desablens/mcp-webpage-timestamps --client claude

Prerequisites

  • Node.js 18.0.0 or higher

  • npm or yarn

Development Install

git clone https://github.com/Fabien-desablens/mcp-webpage-timestamps.git
cd mcp-webpage-timestamps
npm install
npm run build

Usage

As MCP Server

The server can be used with any MCP-compatible client. Here's how to configure it:

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "webpage-timestamps": {
      "command": "npx",
      "args": ["mcp-webpage-timestamps"],
      "env": {}
    }
  }
}

Cline Configuration

Add to your MCP settings:

{
  "mcpServers": {
    "webpage-timestamps": {
      "command": "npx",
      "args": ["mcp-webpage-timestamps"]
    }
  }
}

Direct Usage

# Start the server
npm start

# Or run in development mode
npm run dev

API Reference

Tools

extract_timestamps

Extract timestamps from a single webpage.

Parameters:

  • url (string, required): The URL of the webpage to extract timestamps from

  • config (object, optional): Configuration options

Configuration Options:

  • timeout (number): Request timeout in milliseconds (default: 10000)

  • userAgent (string): User agent string for requests

  • followRedirects (boolean): Whether to follow HTTP redirects (default: true)

  • maxRedirects (number): Maximum number of redirects to follow (default: 5)

  • enableHeuristics (boolean): Enable heuristic timestamp detection (default: true)

Example:

{
  "name": "extract_timestamps",
  "arguments": {
    "url": "https://example.com/article",
    "config": {
      "timeout": 15000,
      "enableHeuristics": true
    }
  }
}

batch_extract_timestamps

Extract timestamps from multiple webpages in batch.

Parameters:

  • urls (array of strings, required): Array of URLs to extract timestamps from

  • config (object, optional): Same configuration options as extract_timestamps

Example:

{
  "name": "batch_extract_timestamps",
  "arguments": {
    "urls": [
      "https://example.com/article1",
      "https://example.com/article2",
      "https://example.com/article3"
    ],
    "config": {
      "timeout": 10000
    }
  }
}

Response Format

Both tools return a JSON object with the following structure:

{
  url: string;
  createdAt?: Date;
  modifiedAt?: Date;
  publishedAt?: Date;
  sources: TimestampSource[];
  confidence: 'high' | 'medium' | 'low';
  errors?: string[];
}

TimestampSource:

{
  type: 'html-meta' | 'http-header' | 'json-ld' | 'microdata' | 'opengraph' | 'twitter' | 'heuristic';
  field: string;
  value: string;
  confidence: 'high' | 'medium' | 'low';
}

Supported Timestamp Sources

HTML Meta Tags

  • article:published_time

  • article:modified_time

  • date

  • pubdate

  • publishdate

  • last-modified

  • dc.date.created

  • dc.date.modified

  • dcterms.created

  • dcterms.modified

HTTP Headers

  • Last-Modified

  • Date

JSON-LD Structured Data

  • datePublished

  • dateModified

  • dateCreated

Microdata

  • datePublished

  • dateModified

OpenGraph

  • og:article:published_time

  • og:article:modified_time

  • og:updated_time

Twitter Cards

  • twitter:data1 (when containing date information)

Heuristic Analysis

  • Time elements with datetime attributes

  • Common date patterns in text

  • Date-related CSS classes

Development

Scripts

# Development with hot reload
npm run dev

# Build the project
npm run build

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Lint code
npm run lint

# Fix linting issues
npm run lint:fix

# Format code
npm run format

Testing

The project includes comprehensive tests:

# Run all tests
npm test

# Run tests with coverage
npm test -- --coverage

# Run specific test file
npm test -- extractor.test.ts

Code Quality

  • TypeScript: Full TypeScript support with strict type checking

  • ESLint: Code linting with recommended rules

  • Prettier: Code formatting

  • Jest: Unit and integration testing

  • 95%+ Test Coverage: Comprehensive test suite

Examples

Basic Usage

import { TimestampExtractor } from './src/extractor.js';

const extractor = new TimestampExtractor();
const result = await extractor.extractTimestamps('https://example.com/article');

console.log('Published:', result.publishedAt);
console.log('Modified:', result.modifiedAt);
console.log('Confidence:', result.confidence);
console.log('Sources:', result.sources.length);

Custom Configuration

const extractor = new TimestampExtractor({
  timeout: 15000,
  userAgent: 'MyBot/1.0',
  enableHeuristics: false,
  maxRedirects: 3
});

const result = await extractor.extractTimestamps('https://example.com');

Batch Processing

const urls = [
  'https://example.com/article1',
  'https://example.com/article2',
  'https://example.com/article3'
];

const results = await Promise.all(
  urls.map(url => extractor.extractTimestamps(url))
);

Use Cases

  • Content Analysis: Analyze temporal aspects of web content

  • Web Scraping: Extract temporal metadata from scraped pages

  • SEO Analysis: Analyze publication and modification patterns

  • Research: Study temporal aspects of web content

  • Content Management: Track content lifecycle and updates

Error Handling

The extractor handles various error conditions gracefully:

  • Network Errors: Timeout, connection refused, DNS resolution failures

  • HTTP Errors: 404, 500, and other HTTP status codes

  • Parsing Errors: Invalid HTML, malformed JSON-LD, unparseable dates

  • Configuration Errors: Invalid URLs, timeout values, etc.

All errors are captured in the errors array of the response, allowing for robust error handling and debugging.

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

  1. Fork the repository

  2. Clone your fork: git clone https://github.com/Fabien-desablens/mcp-webpage-timestamps.git

  3. Install dependencies: npm install

  4. Create a branch: git checkout -b feature/your-feature

  5. Make your changes

  6. Run tests: npm test

  7. Commit your changes: git commit -m 'Add some feature'

  8. Push to the branch: git push origin feature/your-feature

  9. Submit a pull request

Code Style

  • Follow the existing code style

  • Use TypeScript for all new code

  • Add tests for new functionality

  • Update documentation as needed

License

MIT License - see the LICENSE file for details.

Support

Changelog

See CHANGELOG.md for a detailed history of changes.

Acknowledgments

Available Tools

2 tools
batch_extract_timestampsB

Extract timestamps from multiple webpages in batch

ParametersJSON Schema
NameRequiredDescriptionDefault
urlsYesArray of URLs to extract timestamps from
configNoOptional configuration for the extraction

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but fails to describe critical behaviors: it doesn't mention error handling (e.g., what happens if some URLs fail), rate limits, authentication requirements, output format, or whether the operation is idempotent. For a batch web scraping tool with zero annotation coverage, this is a significant gap that leaves the agent guessing about practical usage constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core functionality ('Extract timestamps from multiple webpages in batch') with zero wasted words. It immediately communicates the key differentiator (batch processing) without unnecessary elaboration. Every word earns its place, making it easy for an agent to parse and understand the tool's scope quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a batch web scraping tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., array of results per URL, error formats), behavioral aspects like concurrency or retries, or how it differs meaningfully from the sibling tool beyond the obvious 'batch' vs 'single'. For a tool that likely involves network requests and data extraction, more context is needed for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with detailed documentation for both the 'urls' array and nested 'config' object parameters. The description adds no parameter-specific information beyond what's in the schema, so it doesn't enhance understanding of parameter meanings or usage. However, since schema coverage is high, the baseline score of 3 is appropriate as the schema does the heavy lifting for parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('extract timestamps') and resource ('from multiple webpages in batch'), making the purpose immediately understandable. It distinguishes from the sibling tool 'extract_timestamps' by specifying 'multiple webpages in batch', indicating this is a bulk operation rather than single-page extraction. However, it doesn't specify what format the timestamps will be in or what constitutes a 'timestamp' (e.g., publication dates, modification times, or embedded temporal data).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through 'multiple webpages in batch', suggesting this tool is for bulk processing rather than single URLs, which differentiates it from the sibling 'extract_timestamps'. However, it lacks explicit guidance on when to use this tool versus the sibling (e.g., performance trade-offs, error handling differences) or any prerequisites (e.g., URL accessibility, authentication needs). The guidance is present but minimal and not comprehensive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

extract_timestampsC

Extract creation, modification, and publication timestamps from a webpage

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the webpage to extract timestamps from
configNoOptional configuration for the extraction

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but lacks details on error handling, rate limits, authentication needs, or output format. For a tool that interacts with external webpages, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and efficiently conveys the core functionality, earning a top score for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It does not explain what the extracted timestamps look like, potential errors, or behavioral traits like network dependencies. For a tool with external interactions, this leaves critical gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the parameters. The description does not add any semantic details beyond the schema, such as examples or edge cases. Baseline 3 is appropriate as the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('extract') and the resource ('timestamps from a webpage'), specifying the types of timestamps (creation, modification, publication). It distinguishes from the sibling tool 'batch_extract_timestamps' by implying this is for single URLs, though not explicitly stated. However, it lacks explicit sibling differentiation, keeping it at a 4.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as the sibling 'batch_extract_timestamps' for multiple URLs. It does not mention prerequisites, exclusions, or specific contexts for usage, resulting in minimal guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

C2.9/5.0
Disambiguation2/5

The two tools have overlapping purposes with unclear boundaries. 'extract_timestamps' handles a single webpage, while 'batch_extract_timestamps' handles multiple webpages, but both essentially perform the same core timestamp extraction function. An agent might struggle to choose between them when processing a single webpage, as the batch tool could theoretically handle that case too.

Naming Consistency5/5

The naming follows a perfectly consistent pattern with clear verb_noun structure. Both tools use 'extract_timestamps' as the base noun phrase, with 'batch_' as a descriptive prefix for the multi-page version. There are no deviations in style or convention.

Tool Count2/5

With only 2 tools, this server feels severely under-scoped for timestamp extraction from webpages. A more complete surface would likely include tools for validating timestamps, formatting them, or handling different timestamp types. The minimal tool count suggests incomplete coverage of the domain.

Completeness2/5

The toolset is severely incomplete for webpage timestamp extraction. While it covers extraction from single and multiple pages, there are obvious gaps: no tools for timestamp validation, conversion between formats, filtering by date ranges, or handling edge cases like missing timestamps. This limited surface will likely cause agent failures in real-world scenarios.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fabien-desablens/mcp-webpage-timestamps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server