Skip to main content
Glama
scotthelm

Wikipedia MCP Server

by scotthelm

Wikipedia MCP Server

An MCP (Model Context Protocol) server for Wikipedia API interactions.

Overview

This server provides tools for interacting with the Wikipedia API through the Model Context Protocol. It allows AI assistants to access Wikipedia content, search for articles, get historical events, and retrieve images.

Related MCP server: wikipedia-mcp

Features

The server provides the following tools:

  • onThisDay: Get historical events that occurred on a specific date

  • findPage: Search for Wikipedia pages matching a query

  • getPage: Get content of a Wikipedia page by title

  • getImagesForPage: Get images from a Wikipedia page by title

Installation

npm install @shelm/wikipedia-mcp-server

For development:

git clone https://github.com/scotthelm/wikipedia-mcp-server.git
cd wikipedia-mcp-server
npm install
npm run build

Usage

Running the Server

npx @shelm/wikipedia-mcp-server

This will start the MCP server, which communicates over stdio.

Using Programmatically

You can also use the package programmatically in your own projects:

import {
  WikipediaServer,
  isValidOnThisDayArgs,
  isValidFindPageArgs,
  isValidGetPageArgs,
  isValidGetImagesForPageArgs,
} from "@shelm/wikipedia-mcp-server";

// Create a new server instance
const server = new WikipediaServer();

// Run the server
server.run().catch(console.error);

// Or use the validation functions and handlers directly
if (isValidOnThisDayArgs({ date: "2023-01-01" })) {
  const result = await server.handleOnThisDay({ date: "2023-01-01" });
  console.log(result);
}

Example Client

An example client is provided to demonstrate how to interact with the server:

node example-client.js

This will:

  1. Start the server

  2. Query for available tools

  3. Demonstrate each tool with sample queries

  4. Display the results in a simple web interface at http://localhost:3000

Development

Building

npm run build

Running in Development Mode

npm run dev

Testing

This project can be tested manually using the example client:

node example-client.js

This will demonstrate all the available tools with sample queries.

MCP Server Configuration

To use this server with Claude or other MCP-compatible assistants, add it to your MCP configuration:

{
  "mcpServers": {
    "wikipedia": {
      "command": "npx",
      "args": ["@shelm/wikipedia-mcp-server"],
      "env": {}
    }
  }
}

Attribution

This would not be possible without the great work done by the folks who created the wikipedia package

License

MIT

Available Tools

4 tools
findPageA

Search for Wikipedia pages matching a query

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

TDQS

A3.5/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 full burden. It only states 'matching a query' without disclosing behavior such as result format, pagination, limits, or error handling. This is insufficient for a search 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 one sentence (7 words), highly concise with no wasted content. It efficiently conveys the core function.

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?

For a simple search tool with one parameter and no output schema, the description is adequate but incomplete. It lacks details on return values or search behavior, which would be helpful for an 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% (the 'query' parameter is described as 'Search query'). The tool description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.

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 'Search for Wikipedia pages matching a query', specifying the verb (Search) and resource (Wikipedia pages). This distinguishes it from sibling tools: onThisDay (events), getPage (specific page), and getImagesForPage (images).

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 use when you need to find Wikipedia pages by query, but provides no explicit guidance on when to use this tool versus alternatives (e.g., getPage for exact titles). It is minimally viable but lacks exclusion criteria or context.

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

getImagesForPageB

Get images from a Wikipedia page by title

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of images to retrieve (default: 50)
titleYesPage title

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are present, so the description bears full burden for behavioral disclosure. It only says 'Get images from a Wikipedia page by title' without revealing whether it is read-only, any rate limits, pagination behavior, or error handling. This is insufficient for a tool with no annotations.

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

Conciseness4/5

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

The description is a single, clear sentence with no wasted words. While it is appropriately concise for a simple tool, it omits useful details that could be included without sacrificing brevity.

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 low complexity (2 parameters, no output schema, no annotations), the description should at least hint at the return format (e.g., URLs or thumbnails) or any constraints. It lacks completeness, providing only the bare minimum.

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 coverage is 100% with descriptions for both parameters ('title' and 'limit'). The description adds no extra meaning beyond what the schema already provides, so it meets the baseline but does not enhance understanding.

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 it 'Get[s] images from a Wikipedia page by title', which is a specific verb-resource pair. It distinguishes itself from siblings like 'getPage' (full page) and 'findPage' (search) by focusing solely on images.

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 when images from a Wikipedia page are needed, but it does not explicitly state when to use this tool versus alternatives like 'getPage' or 'onThisDay'. No exclusions or scenarios are provided.

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

getPageB

Get content of a Wikipedia page by title

ParametersJSON Schema
NameRequiredDescriptionDefault
titleYesPage title

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description must fully disclose behavior, but it only states 'Get content'. It does not explain what 'content' includes (e.g., full text vs. summary), potential limitations (rate limits, size), or whether it is read-only. This is insufficient for safe invocation.

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

Conciseness4/5

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

The description is a single, concise sentence with no wasted words. However, it could be slightly expanded to add value without losing brevity.

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 has no output schema, the description should indicate what the returned content looks like. It does not, and while the tool is simple, more context on the response format would improve completeness.

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 coverage is 100% with a single parameter 'title' described as 'Page title'. The description adds no additional meaning beyond the schema, so it meets the baseline of 3 for high 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 verb 'Get' and resource 'content of a Wikipedia page', and specifies the input 'by title'. It effectively distinguishes from sibling tools like findPage (search) and getImagesForPage (images).

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?

No usage guidance is provided. The description does not indicate when to use this tool instead of alternatives, nor does it mention any prerequisites or context for use.

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

onThisDayB

Get historical events that occurred on a specific date

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYesISO8601 date portion (YYYY-MM-DD)

TDQS

B3.3/5.0
Behavior2/5

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

No annotations provided. Description does not disclose any behavioral traits (e.g., read-only nature, response format, rate limits). Minimal transparency beyond purpose.

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?

Single sentence with precise verb and resource. Front-loaded and no extraneous words.

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?

For a simple tool with one parameter and no output schema, the description is adequate but lacks details on return format or any pagination. Could be more complete.

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 has 100% description coverage for the parameter. Description adds no additional meaning beyond what the schema already provides, so baseline score of 3 applies.

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?

Description clearly states verb 'Get' and resource 'historical events' for a specific date. Distinct from sibling tools that deal with pages and images.

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?

No guidance on when to use this tool versus alternatives. No exclusions or context provided.

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

TDQS

A3.6/5.0
Disambiguation5/5

Each tool targets a distinct task: historical events, page search, page content retrieval, and image retrieval. No overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent verb+noun pattern (onThisDay, findPage, getPage, getImagesForPage) using camelCase.

Tool Count4/5

4 tools is slightly on the low side but reasonable for a focused Wikipedia server covering core read operations.

Completeness3/5

The server covers basic search and retrieval, but lacks tools for getting page summaries, categories, or links, which are common Wikipedia operations.

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

  • A
    license
    A
    quality
    C
    maintenance
    Enables LLMs to search for keywords and fetch full page content from Wikipedia across various languages. It provides direct access to Wikipedia information through search and fetch tools.
    2
    4
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables AI agents to search, read, and explore Wikipedia articles via tools like summaries, categories, and random articles, with no API keys required.
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides access to Wikipedia through 10 tools including search, article retrieval, summarization, and fact extraction, with multi-language support and robust error handling.
  • A
    license
    Not graded
    quality
    C
    maintenance
    Wraps the Wikipedia REST API to allow AI agents to query Wikipedia content without authentication.
    16
    MIT

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/scotthelm/wikipedia-mcp-server'

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