MCP Webpage Timestamps is a powerful server tool that extracts webpage creation, modification, and publication timestamps from various sources. It leverages the Model Context Protocol (MCP) to provide comprehensive timestamp data for web scraping and temporal analysis of web content.
npm install -g mcp-webpage-timestamps
npx mcp-webpage-timestamps
For Claude Desktop users, you can install via Smithery:
npx -y @smithery/cli install @Fabien-desablens/mcp-webpage-timestamps --client claude
Add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"webpage-timestamps": {
"command": "npx",
"args": ["mcp-webpage-timestamps"],
"env": {}
}
}
}
Add to your MCP settings:
{
"mcpServers": {
"webpage-timestamps": {
"command": "npx",
"args": ["mcp-webpage-timestamps"]
}
}
}
The extract_timestamps
tool provides detailed timestamp information from a webpage:
{
"name": "extract_timestamps",
"arguments": {
"url": "https://example.com/article",
"config": {
"timeout": 15000,
"enableHeuristics": true
}
}
}
timeout
: Request timeout in milliseconds (default: 10000)userAgent
: Custom user agent string for requestsfollowRedirects
: Whether to follow HTTP redirects (default: true)maxRedirects
: Maximum number of redirects to follow (default: 5)enableHeuristics
: Enable heuristic timestamp detection (default: true)The batch_extract_timestamps
tool allows processing multiple URLs at once:
{
"name": "batch_extract_timestamps",
"arguments": {
"urls": [
"https://example.com/article1",
"https://example.com/article2",
"https://example.com/article3"
],
"config": {
"timeout": 10000
}
}
}
The server returns timestamp data in this format:
{
url: string;
createdAt?: Date;
modifiedAt?: Date;
publishedAt?: Date;
sources: TimestampSource[];
confidence: 'high' | 'medium' | 'low';
errors?: string[];
}
Each timestamp source includes:
{
type: 'html-meta' | 'http-header' | 'json-ld' | 'microdata' | 'opengraph' | 'twitter' | 'heuristic';
field: string;
value: string;
confidence: 'high' | 'medium' | 'low';
}
The server extracts timestamps from multiple sources:
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);
const extractor = new TimestampExtractor({
timeout: 15000,
userAgent: 'MyBot/1.0',
enableHeuristics: false,
maxRedirects: 3
});
const result = await extractor.extractTimestamps('https://example.com');
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))
);
The server provides robust error handling for various scenarios:
All errors are captured in the response's errors
array, making debugging straightforward.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "webpage-timestamps" '{"command":"npx","args":["mcp-webpage-timestamps"]}'
See the official Claude Code MCP documentation for more details.
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 > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"webpage-timestamps": {
"command": "npx",
"args": [
"mcp-webpage-timestamps"
]
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"webpage-timestamps": {
"command": "npx",
"args": [
"mcp-webpage-timestamps"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect