Skip to main content
Glama
tanevanwifferen

DocsScraper

README.md
# DocsScraper MCP Server

An MCP server that connects to the DocsScraper web API to provide semantic search capabilities through documentation chunks.

## Features

- **Semantic Search**: Search through documentation chunks using embeddings and AI validation
- **API Integration**: Connects to your DocsScraper web application via REST API
- **Fallback Sources**: Automatically falls back to scraper sources when no local results are found
- **Configurable Results**: Control the number of search results (1-10, default: 5)
- **Service Filtering**: Filter search results by specific service names (case-insensitive)

## Configuration

The server requires the following environment variables:

- `DOCS_SCRAPER_API_KEY`: API key for authentication (required)

## Tools

### search_docs

Search through documentation chunks using semantic search.

**Parameters:**
- `query` (string, required): The search query to find relevant documentation
- `top` (number, optional): Maximum number of results to return (1-10, default: 5)
- `service` (string, required): Service name to filter results by (case-insensitive)

**Examples:**
```json
{
  "query": "how to configure authentication",
  "service": "Binance",
  "top": 3
}
```

```json
{
  "query": "React hooks documentation",
  "top": 5,
  "service": "React"
}
```

## Resources

### docs-scraper://api/info

Provides information about the connected DocsScraper API, including:
- Base URL configuration
- API key status
- Endpoint details
- Authentication method

## API Integration

This server connects to the DocsScraper web API endpoint:
- **Endpoint**: `GET /api/chunks/search`
- **Authentication**: API Key via `X-API-Key` header
- **Parameters**: `query` (string), `top` (number), `service` (string, optional)

The search endpoint:
1. Uses embeddings to find semantically similar chunks
2. Applies AI validation to ensure relevance
3. Falls back to scraper sources if no local results are found
4. Returns chunks with scores and source information

## Installation

```bash
npm install
npm run build
```

## Config in mcp.json

```json
{
  "mcpServers": {
    "docs-scraper": {
      "command": "node",
      "args": [
        "/Users/tanevanwifferen/Documents/Cline/MCP/docs-scraper-server/build/index.js"
      ],
      "env": {
        "DOCS_SCRAPER_API_KEY": "###",
        "DOCS_SCRAPER_BASE_URL": "https://api.mcpdocsscraper.click"
      },
      "disabled": false,
      "alwaysAllow": [
        "search_docs"
      ],
      "timeout": 900 // important, we need a lot of time to do our requests
    }
}
```

## Usage

The server is designed to be used with MCP-compatible clients. Configure your client to connect to this server with the appropriate environment variables set.

## Error Handling

The server provides detailed error messages for common issues:
- Authentication failures (401)
- Invalid requests (400)
- Connection issues (ECONNREFUSED)

## Development

```bash
# Build the server
npm run build

# Watch for changes during development
npm run watch

# Test with MCP inspector
npm run inspector

TDQS

B3.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'search_docs' has a single, clear purpose of searching documentation chunks using semantic search, so agents cannot misselect among multiple options.

Naming Consistency5/5

The naming follows a consistent verb_noun pattern with 'search_docs', and since there is only one tool, there are no deviations or mixed conventions to evaluate. The naming is straightforward and predictable.

Tool Count2/5

A single tool for a server named 'DocsScraper' feels too thin for the apparent scope, as scraping documentation typically involves more operations like fetching, parsing, or updating content. One tool may limit functionality and agent workflows, making it borderline inadequate.

Completeness2/5

The tool surface is severely incomplete for a documentation scraping domain. While 'search_docs' provides search capability, there are obvious gaps such as no tools for retrieving, listing, or managing documentation sources, which are essential for comprehensive scraping operations.

Maintenance

ActivityInactive
ResponsivenessNo issues