This guide explains how to test the Wikipedia MCP server with Claude Desktop or through a simple test client.
The Wikipedia MCP server is designed to be used with Claude Desktop or other clients that support the Model Context Protocol (MCP). Here's how to test it with Claude Desktop:
- Claude Desktop installed on your computer
- Wikipedia MCP server installed (see main README.md for installation instructions)
-
Configure Claude Desktop to use the Wikipedia MCP server:
Edit your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Add the following configuration:
{ "mcpServers": { "wikipedia": { "command": "wikipedia-mcp" } } } - macOS:
-
Start Claude Desktop
Claude Desktop will automatically start the Wikipedia MCP server when needed.
-
Test with prompts
In Claude Desktop, try using these prompts to test the Wikipedia integration:
- "Tell me about quantum computing using the Wikipedia information."
- "Summarize the history of artificial intelligence based on Wikipedia."
- "What does Wikipedia say about climate change?"
- "Find Wikipedia articles related to machine learning."
- "Get me the introduction section of the article on neural networks from Wikipedia."
- Check Claude Desktop logs for any errors related to the MCP server
- Make sure the path to the
wikipedia-mcpcommand is in your system PATH - If using a virtual environment, ensure Claude Desktop can access it
- On Windows, you might need to specify the full path to the executable
If you don't have Claude Desktop, you can use the included test client to verify the Wikipedia MCP server is working correctly.
-
Ensure you have the Wikipedia MCP package installed
-
Run the test client:
python3 test_mcp_client.py
-
The test client will:
- Start the Wikipedia MCP server
- Send a tool discovery request
- Display the available tools
- Verify the server is functioning correctly
When the test client runs successfully, you should see output similar to:
Starting Wikipedia MCP server...
Sending discovery message to server...
Server Response:
{
"type": "discover_tools_response",
"version": "1.0.0",
"tools": [
{
"name": "search_wikipedia",
"description": "Search Wikipedia for articles matching a query.",
"parameters": {
"query": {
"type": "string",
"description": "The search term"
},
"limit": {
"type": "integer",
"description": "Maximum number of results to return",
"default": 10
}
}
},
// Other tools will be listed here
]
}
Available MCP Tools:
- search_wikipedia: Search Wikipedia for articles matching a query.
- get_article: Get the full content of a Wikipedia article.
- get_summary: Get a summary of a Wikipedia article.
- get_related_topics: Get topics related to a Wikipedia article based on links and categories.
Test successful! The Wikipedia MCP server is working correctly.
You can also manually test the server by sending MCP commands:
-
Start the server in one terminal:
python3 -m wikipedia_mcp
-
In another terminal, send a JSON message:
echo '{"type": "discover_tools", "version": "1.0.0"}' | python3 -m wikipedia_mcp
This should return a JSON response with the available tools.
For more advanced testing, you can use the Python MCP client library:
from mcp.client import Client
# Create an MCP client connected to the Wikipedia server
client = Client(["python3", "-m", "wikipedia_mcp"])
# Discover available tools
tools = client.discover_tools()
print(f"Available tools: {tools}")
# Call a tool
result = client.call_tool("search_wikipedia", {"query": "quantum computing", "limit": 5})
print(f"Search results: {result}")
# Close the client
client.close()This allows you to programmatically interact with the Wikipedia MCP server from your Python code.
If you encounter any issues while testing the Wikipedia MCP server, please report them on the GitHub repository: