Skip to content

Unify User-Agent to CKAN-MCP-Server/1.0 across all tools #24

@aborruso

Description

@aborruso

Problem

The server currently uses inconsistent User-Agent strings depending on the operation:

  • CKAN-MCP-Server/1.0 — CKAN API calls, quality checks, portal discovery
  • Mozilla/5.0 (compatible; CKAN-MCP-Server/1.0) — SPARQL queries
  • Mozilla/5.0 (X11; Linux x86_64) ... Chrome/120 — direct file downloads (src/utils/http.ts)

The Chrome UA was added to avoid portals that block non-browser requests, but it's not transparent.

Proposed Change

Unify all tools to use CKAN-MCP-Server/1.0.

Before Implementing

  • Test locally that all affected tools still work after the change
  • Verify file downloads (CSV) still succeed with the honest UA
  • Run full test suite: npm test
  • Run end-to-end HTTP server tests against real portals

Files to Change

  • src/utils/http.ts — two occurrences (Node.js axios path + Workers fetch path)
  • src/tools/sparql.ts — one occurrence

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions