Skip to main content
Glama
bsmi021

MCP Webscan Server

by bsmi021

MCP Webscan Server

A Model Context Protocol (MCP) server for web content scanning and analysis. This server provides tools for fetching, analyzing, and extracting information from web pages.

Features

  • Page Fetching: Convert web pages to Markdown for easy analysis

  • Link Extraction: Extract and analyze links from web pages

  • Site Crawling: Recursively crawl websites to discover content

  • Link Checking: Identify broken links on web pages

  • Pattern Matching: Find URLs matching specific patterns

  • Sitemap Generation: Generate XML sitemaps for websites

Related MCP server: Open Crawler MCP Server

Installation

Installing via Smithery

To install Webscan for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install mcp-server-webscan --client claude

Manual Installation

# Clone the repository
git clone <repository-url>
cd mcp-server-webscan

# Install dependencies
npm install

# Build the project
npm run build

Usage

Starting the Server

npm start

The server runs on stdio transport, making it compatible with MCP clients like Claude Desktop.

Available Tools

  1. fetch-page

    • Fetches a web page and converts it to Markdown.

    • Parameters:

      • url (required): URL of the page to fetch.

      • selector (optional): CSS selector to target specific content.

  2. extract-links

    • Extracts all links from a web page with their text.

    • Parameters:

      • url (required): URL of the page to analyze.

      • baseUrl (optional): Base URL to filter links.

      • limit (optional, default: 100): Maximum number of links to return.

  3. crawl-site

    • Recursively crawls a website up to a specified depth.

    • Parameters:

      • url (required): Starting URL to crawl.

      • maxDepth (optional, default: 2): Maximum crawl depth (0-5).

  4. check-links

    • Checks for broken links on a page.

    • Parameters:

      • url (required): URL to check links for.

  5. find-patterns

    • Finds URLs matching a specific pattern.

    • Parameters:

      • url (required): URL to search in.

      • pattern (required): JavaScript-compatible regex pattern to match URLs against.

  6. generate-site-map

    • Generates a simple XML sitemap by crawling.

    • Parameters:

      • url (required): Root URL for sitemap crawl.

      • maxDepth (optional, default: 2): Maximum crawl depth for discovering URLs (0-5).

      • limit (optional, default: 1000): Maximum number of URLs to include in the sitemap.

Example Usage with Claude Desktop

  1. Configure the server in your Claude Desktop settings:

{
  "mcpServers": {
    "webscan": {
      "command": "node",
      "args": ["path/to/mcp-server-webscan/build/index.js"], // Corrected path
      "env": {
        "NODE_ENV": "development",
        "LOG_LEVEL": "info" // Example: Set log level via env var
      }
    }
  }
}
  1. Use the tools in your conversations:

Could you fetch the content from https://example.com and convert it to Markdown?

Development

Prerequisites

  • Node.js >= 18

  • npm

Project Structure (Post-Refactor)

mcp-server-webscan/
├── src/
│   ├── config/
│   │   └── ConfigurationManager.ts
│   ├── services/
│   │   ├── CheckLinksService.ts
│   │   ├── CrawlSiteService.ts
│   │   ├── ExtractLinksService.ts
│   │   ├── FetchPageService.ts
│   │   ├── FindPatternsService.ts
│   │   ├── GenerateSitemapService.ts
│   │   └── index.ts
│   ├── tools/
│   │   ├── checkLinksTool.ts
│   │   ├── checkLinksToolParams.ts
│   │   ├── crawlSiteTool.ts
│   │   ├── crawlSiteToolParams.ts
│   │   ├── extractLinksTool.ts
│   │   ├── extractLinksToolParams.ts
│   │   ├── fetchPageTool.ts
│   │   ├── fetchPageToolParams.ts
│   │   ├── findPatterns.ts
│   │   ├── findPatternsToolParams.ts
│   │   ├── generateSitemapTool.ts
│   │   ├── generateSitemapToolParams.ts
│   │   └── index.ts
│   ├── types/
│   │   ├── checkLinksTypes.ts
│   │   ├── crawlSiteTypes.ts
│   │   ├── extractLinksTypes.ts
│   │   ├── fetchPageTypes.ts
│   │   ├── findPatternsTypes.ts
│   │   ├── generateSitemapTypes.ts
│   │   └── index.ts
│   ├── utils/
│   │   ├── errors.ts
│   │   ├── index.ts
│   │   ├── logger.ts
│   │   ├── markdownConverter.ts
│   │   └── webUtils.ts
│   ├── initialize.ts
│   └── index.ts    # Main server entry point
├── build/          # Compiled JavaScript (Corrected)
├── node_modules/
├── .clinerules
├── .gitignore
├── Dockerfile
├── LICENSE
├── mcp-consistant-servers-guide.md
├── package.json
├── package-lock.json
├── README.md
├── RFC-2025-001-Refactor.md
├── smithery.yaml
└── tsconfig.json

Building

npm run build

Development Mode

npm run dev

Running evals

The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found here.

OPENAI_API_KEY=your-key  npx mcp-eval src/evals/evals.ts src/tools/extractLinksTool.ts

Error Handling

The server implements comprehensive error handling:

  • Invalid parameters

  • Network errors

  • Content parsing errors

  • URL validation

All errors are properly formatted according to the MCP specification.

Contributing

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add some amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

License

MIT License - see the LICENSE file for details

Available Tools

6 tools
crawl-siteA

Recursively crawls a website starting from a given URL up to a specified maximum depth. It follows links within the same origin and returns a list of all unique URLs found during the crawl.

ParametersJSON Schema
NameRequiredDescriptionDefault
maxDepthNoThe maximum depth to crawl relative to the starting URL. 0 means only the starting URL is fetched. Max allowed depth is 5 to prevent excessive crawling. Defaults to 2.
urlYesThe starting URL for the crawl. Must be a valid HTTP or HTTPS URL.

TDQS

A3.9/5.0
Behavior3/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. It discloses key behaviors: recursion, same-origin link following, and returning unique URLs. However, it lacks details on rate limits, timeouts, authentication needs, or error handling, which are important for a crawling operation. The description does not contradict any annotations.

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 two sentences, front-loaded with the core purpose and followed by behavioral details. Every sentence earns its place by explaining the crawling process and output without redundancy or fluff, making it highly efficient and easy to parse.

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

Completeness3/5

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

Given the tool's complexity (crawling with recursion and depth limits), no annotations, and no output schema, the description is adequate but incomplete. It covers the basic operation and output format (list of unique URLs), but lacks information on pagination, response structure, or potential side effects, which could hinder an agent's ability to use it effectively in varied contexts.

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

Parameters4/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 parameters. The description adds minimal value beyond the schema by mentioning 'starting URL' and 'maximum depth' in context, but does not provide additional semantics like examples or edge cases. With high schema coverage, the baseline is 3, but the description slightly enhances understanding, warranting a 4.

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

Purpose5/5

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

The description clearly states the specific action ('recursively crawls'), resource ('a website'), and scope ('starting from a given URL up to a specified maximum depth'). It distinguishes from siblings by specifying it follows links within the same origin and returns unique URLs, unlike tools like 'fetch-page' (single page) or 'extract-links' (link extraction without crawling).

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 for discovering all URLs on a site via crawling, but does not explicitly state when to use this tool versus alternatives like 'check-links' (likely for link validation) or 'generate-site-map' (for structured sitemaps). No exclusions or prerequisites are mentioned, leaving some ambiguity about optimal use cases.

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

fetch-pageA

Fetches the HTML content of a given URL. Optionally, it can select a specific part of the HTML using a CSS selector and convert only that part (or the whole body if no selector is provided) to Markdown format. Returns the resulting Markdown text.

ParametersJSON Schema
NameRequiredDescriptionDefault
selectorNoOptional CSS selector (e.g., '#main-content', '.article-body'). If provided, only the HTML content within the first matching element will be converted to Markdown. If omitted or if the selector doesn't match, the content of the 'body' tag will be used.
urlYesThe fully qualified URL of the web page to fetch. Must be a valid HTTP or HTTPS URL.

TDQS

A4/5.0
Behavior3/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 describes the core behavior (fetching HTML, CSS selection, Markdown conversion) and fallback behavior (uses body tag if selector doesn't match). However, it doesn't mention error handling, rate limits, authentication needs, or performance characteristics that would be important for a web fetching tool.

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 efficiently structured in three sentences: purpose statement, optional functionality, and return value. Every sentence earns its place by adding distinct information without redundancy. It's appropriately sized for a tool with two parameters and clear functionality.

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

Completeness4/5

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

For a tool with no annotations and no output schema, the description provides good coverage of what the tool does, how parameters interact, and what it returns. It could be more complete by mentioning potential limitations (e.g., JavaScript-rendered content, timeouts) or authentication requirements, but covers the essential functionality well given the context.

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

Parameters4/5

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

The schema has 100% description coverage, providing excellent parameter documentation. The description adds value by explaining the relationship between parameters (selector is optional, affects what gets converted) and the overall workflow (fetch → optionally select → convert to Markdown). It provides context beyond individual parameter descriptions.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('fetches', 'select', 'convert') and resources ('HTML content', 'URL', 'Markdown format'). It distinguishes from siblings like 'check-links' or 'extract-links' by focusing on content retrieval and conversion rather than link analysis or crawling.

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 through its functional explanation (fetch HTML, optionally select with CSS, convert to Markdown), but doesn't explicitly state when to use this tool versus alternatives like 'crawl-site' for multiple pages or 'extract-links' for link extraction. No explicit when-not or alternative guidance is provided.

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

find-patternsA

Fetches a web page, extracts all anchor ('a') links, resolves their absolute URLs, and returns a list of links whose URLs match a given JavaScript-compatible regular expression pattern. Includes the URL and anchor text for each match.

ParametersJSON Schema
NameRequiredDescriptionDefault
patternYesA JavaScript-compatible regular expression pattern (without enclosing slashes or flags) used to test against the absolute URLs of the links found on the page. Example: 'product\/\d+' to find product links.
urlYesThe fully qualified URL of the web page to search for link patterns. Must be a valid HTTP or HTTPS URL.

TDQS

A4/5.0
Behavior3/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 describes the tool's behavior well (fetching, extracting, resolving, filtering links) but lacks details on error handling, performance characteristics (e.g., timeouts, rate limits), or authentication needs. It doesn't contradict any annotations.

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 front-loaded with the core functionality in a single, efficient sentence. Every phrase adds value: it specifies the action, the resource (anchor links), the processing (resolving URLs), the filtering mechanism (regex pattern), and the output format (list with URL and anchor text). No wasted words.

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

Completeness4/5

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

Given the tool's moderate complexity (web scraping with regex filtering), no annotations, and no output schema, the description is mostly complete. It explains what the tool does and the output format but could benefit from mentioning potential limitations (e.g., handling of JavaScript-rendered content or pagination). It adequately covers the core functionality without being exhaustive.

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 schema description coverage is 100%, providing detailed documentation for both parameters. The description adds minimal value beyond the schema by mentioning the regex is used to 'test against the absolute URLs' and that it returns 'URL and anchor text for each match,' but doesn't explain parameter interactions or edge cases. Baseline 3 is appropriate given the comprehensive schema.

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

Purpose5/5

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

The description clearly states the specific action ('fetches a web page, extracts all anchor links, resolves their absolute URLs, and returns a list of links') and distinguishes it from siblings by specifying the filtering mechanism ('match a given JavaScript-compatible regular expression pattern'). It goes beyond a simple tautology by detailing the multi-step process.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool (finding links matching a regex pattern on a web page) but doesn't explicitly mention when not to use it or name alternatives among the sibling tools. It implies usage for pattern-based link extraction without direct comparison to tools like 'extract-links' or 'fetch-page'.

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

generate-site-mapA

Crawls a website starting from a given URL up to a specified depth and generates an XML sitemap containing the discovered URLs (up to a specified limit).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of URLs to include in the generated sitemap XML. Defaults to 1000. Max allowed is 5000.
maxDepthNoThe maximum depth to crawl relative to the starting URL to discover pages for the sitemap. 0 means only the starting URL. Max allowed depth is 5. Defaults to 2.
urlYesThe starting URL for the crawl to generate the sitemap. Must be a valid HTTP or HTTPS URL.

TDQS

A3.5/5.0
Behavior3/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 describes the crawling process and output generation, but lacks details on performance (e.g., rate limits, timeouts), error handling, or authentication needs. It mentions constraints ('up to a specified limit', 'up to a specified depth'), which adds some context, but overall behavioral traits are minimally covered.

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, well-structured sentence that efficiently conveys the core functionality without redundancy. It front-loads key actions ('crawls', 'generates') and includes essential constraints, making every word contribute meaningfully to understanding the tool's purpose.

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

Completeness3/5

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

Given the tool's moderate complexity (crawling with depth/limit constraints) and no annotations or output schema, the description is adequate but incomplete. It covers the basic operation and output type, but lacks details on return values (e.g., XML structure, error responses) and behavioral aspects like performance or prerequisites, which are needed for full contextual understanding.

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 all parameters (url, maxDepth, limit) with details like defaults, ranges, and formats. The description adds no additional parameter semantics beyond what the schema provides, such as explaining interactions between parameters or edge cases, meeting the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('crawls a website', 'generates an XML sitemap') and the resource ('discovered URLs'), distinguishing it from siblings like 'check-links' (validation) or 'fetch-page' (single page retrieval). It explicitly mentions the scope ('starting from a given URL up to a specified depth') and output format ('XML sitemap'), making the purpose unambiguous.

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 like 'crawl-site' or 'extract-links'. It does not mention prerequisites, exclusions, or comparative contexts, leaving the agent to infer usage solely from the tool name and description without explicit direction.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv1.0.0
    • First observedcheck-links
    • First observedcrawl-site
    • First observedextract-links
    • First observedfetch-page
    • First observedfind-patterns
    • First observedgenerate-site-map

TDQS

A3.9/5.0
Disambiguation3/5

There is significant overlap between tools, particularly check-links, extract-links, and find-patterns, which all involve extracting and analyzing links from web pages, leading to potential confusion. However, crawl-site and generate-site-map have more distinct purposes for recursive crawling and sitemap generation, respectively, and fetch-page stands out for content retrieval and conversion.

Naming Consistency5/5

All tool names follow a consistent kebab-case pattern with clear verb-noun structures (e.g., check-links, crawl-site, extract-links). This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming style.

Tool Count5/5

With 6 tools, the count is well-scoped for a web scanning server, covering key operations like link checking, crawling, content fetching, and sitemap generation. Each tool has a clear role, avoiding bloat while providing comprehensive coverage for the domain.

Completeness4/5

The tool set covers core web scanning tasks such as link extraction, validation, crawling, and sitemap generation, with fetch-page adding content retrieval and conversion. A minor gap exists in lacking tools for security scanning (e.g., vulnerability checks) or performance analysis, but the provided tools support most common workflows effectively.

Maintenance

ActivityInactive
ResponsivenessSyncing

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/bsmi021/mcp-server-webscan'

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