Ghana-MCP
Provides Ghana-focused Wikipedia search using MediaWiki CirrusSearch scoped to Ghana and MediaWiki Geosearch centered on Accra, enabling retrieval of encyclopedic background, constitutional records, and landmark location context.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Ghana-MCPlatest news on Ghana's 2025 budget, plus KNUST research on tax policy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ghana Search: Ghana's Information Retrieval Engine
Ghana Search is an information retrieval engine and Model Context Protocol (MCP) server that allows users, developers, and AI agents to search verified Ghanaian digital sources in real time.
Live search portal: https://search.ghanaopenai.org
Supported Sources
Ghana Search queries the public search APIs of over 430 Ghanaian institutions and repositories, returning direct content URLs and downloadable PDFs rather than generic homepages:
Government Portals (164 websites): Direct search across ministries, departments, and agencies including the Ghana Revenue Authority (GRA), Food and Drugs Authority (FDA), Ghana Standards Authority (GSA), Ministry of Lands and Natural Resources, Lands Commission, and local assemblies.
District Assemblies (GhanaDistricts): News, development projects, and assembly reports across all 261 Ghanaian district assemblies.
Court Judgments and Legislation (GhaLII): Supreme Court, Court of Appeal, High Court rulings, Acts of Parliament, and Decrees with direct document and source download links.
Parliament of Ghana: Official parliamentary Bills, Hansard records, and committee reports with direct PDF downloads.
University Theses and Research: Academic research abstracts and direct PDF thesis download links from KNUST, University of Ghana (UGSpace), and University of Cape Coast (UCC).
National News Outlets: Real-time articles from B&FT Online, 3News, Citi Newsroom, Ghana News Agency (GNA), Yen.com.gh, The Chronicle, Ghana Business News, and Starr FM.
Ghana Yellow Pages & Commercial Directory (GhanaBusinessWeb): Direct search across verified Ghanaian commercial enterprises, pharmacies, hospitals, legal chambers, solar energy suppliers, hotels, and contractors with physical addresses, telephone contacts, and directory listings.
Ghanaian Reference: Scoped reference and historical background from Wikipedia (Ghana).
Related MCP server: Keepygaga RAG
Web Search Interface
Visit https://search.ghanaopenai.org to search directly from your browser with two specialized modes:
National Knowledge (Core):
Queries 164 verified government portals, university thesis repositories (KNUST/UG/UCC), Supreme Court rulings (GhaLII), parliamentary records, and national news networks.
Title-first & recent-first ranking with direct PDF download links.
Business Directory (Yellow Pages):
Two-way lookup: Search by product/commodity to find suppliers and stores (e.g. "solar panels", "tractor parts", "pharmacies Kumasi"), OR search by business name (e.g. "Ernest Chemists", "Solar 4 Ghana") to get branches, physical addresses, and direct phone call links.
Querying the APIs
Ghana Search offers dedicated endpoints for each capability:
1. National Knowledge Retrieval (POST /api/search)
curl -X POST https://search.ghanaopenai.org/api/search \
-H "Content-Type: application/json" \
-d '{
"text": "Ghana Revenue Authority VAT and electronic invoicing requirements",
"top_k": 5
}'2. Business Directory & Supplier Locator (POST /api/business/search)
curl -X POST https://search.ghanaopenai.org/api/business/search \
-H "Content-Type: application/json" \
-d '{
"query": "tractor parts Accra",
"top_k": 5
}'Request Parameters (POST /api/search)
Parameter | Type | Default | Description |
| string | Required | Your question or search topic |
| integer |
| Number of ranked results to return (max 500) |
| list | Knowledge sources | Defaults to verified knowledge sources: |
Note: All search endpoints and external providers strictly enforce a hard 4.0-second timeout budget to guarantee rapid responses without hanging.
AI Inference Frameworks & Tool Calling (vLLM & SGLang)
Ghana Search is built natively for open-weights LLM inference runtimes (vLLM and SGLang). It provides standard OpenAI-compatible tool specifications and execution endpoints so models (such as Qwen 2.5, Llama 3.1/3.3, Mistral, Command R) can autonomously retrieve verified Ghanaian sources to ground their responses.
1. vLLM Tool Calling
Launch vLLM with auto tool calling enabled:
vllm serve Qwen/Qwen2.5-7B-Instruct \
--enable-auto-tool-choice \
--tool-call-parser hermes \
--port 8000Autonomous agent loop using the standard OpenAI client:
import requests
from openai import OpenAI
# Connect to local vLLM instance
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
# 1. Fetch OpenAI-compatible tool definitions from Ghana Search
tools = requests.get("https://search.ghanaopenai.org/api/tools").json()["tools"]
messages = [
{
"role": "user",
"content": "What are the latest VAT invoicing requirements from the Ghana Revenue Authority?",
}
]
# 2. Model decides to call ghana_search
response = client.chat.completions.create(
model="Qwen/Qwen2.5-7B-Instruct",
messages=messages,
tools=tools,
tool_choice="auto",
)
choice = response.choices[0]
if choice.message.tool_calls:
tool_call = choice.message.tool_calls[0]
messages.append(choice.message)
# 3. Execute tool call via Ghana Search tool execution endpoint
tool_result = requests.post(
"https://search.ghanaopenai.org/api/tools/execute",
json={
"name": tool_call.function.name,
"arguments": tool_call.function.arguments, # Pass raw arguments directly
},
).json()
# 4. Feed grounded factual records back into conversation history
messages.append({
"role": "tool",
"tool_call_id": tool_call.id,
"content": tool_result["content"],
})
# 5. Generate final referenced answer
final_response = client.chat.completions.create(
model="Qwen/Qwen2.5-7B-Instruct",
messages=messages,
)
print(final_response.choices[0].message.content)2. SGLang Tool Calling
Launch SGLang server:
python3 -m sglang.launch_server \
--model-path meta-llama/Llama-3.1-8B-Instruct \
--port 30000Autonomous agent execution with SGLang:
import requests
from openai import OpenAI
client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")
# Fetch Ghana Search tool specifications
tools = requests.get("https://search.ghanaopenai.org/api/tools").json()["tools"]
messages = [
{
"role": "user",
"content": "Find recent KNUST research on solar energy battery storage.",
}
]
response = client.chat.completions.create(
model="meta-llama/Llama-3.1-8B-Instruct",
messages=messages,
tools=tools,
)
if response.choices[0].message.tool_calls:
call = response.choices[0].message.tool_calls[0]
messages.append(response.choices[0].message)
# Execute search
res = requests.post(
"https://search.ghanaopenai.org/api/tools/execute",
json={"name": call.function.name, "arguments": call.function.arguments},
).json()
messages.append({
"role": "tool",
"tool_call_id": call.id,
"content": res["content"],
})
answer = client.chat.completions.create(
model="meta-llama/Llama-3.1-8B-Instruct",
messages=messages,
)
print(answer.choices[0].message.content)3. Model Context Protocol (MCP) Remote Endpoint & Tools
Ghana Search provides two distinct, dedicated MCP tools:
MCP Tool Name | Functionality | Expected Input | Example Output |
| Verified national knowledge (gov, laws, theses, news) | Question or policy topic | Official acts, thesis abstracts, news reports |
| Yellow pages & product supplier locator | Product, service, or business name | Matching businesses, locations, and phone numbers |
For MCP clients and agent orchestrators connecting over Server-Sent Events (SSE):
SSE Endpoint:
https://search.ghanaopenai.org/mcp/sseTool Schema Endpoint:
https://search.ghanaopenai.org/api/toolsTool Execution Endpoint:
https://search.ghanaopenai.org/api/tools/executeCommercial Directory Endpoint:
https://search.ghanaopenai.org/api/business/search
Offline-First Search & Domain Knowledge Packs
Ghana Search is built from the ground up for offline-first deployments. In rural communities, farming districts, remote clinics, and schools without reliable internet, local LLMs (running via vLLM, Ollama, SGLang, or llama.cpp) can query pre-built Domain Knowledge Packs with 0ms internet latency and zero network access.
1. Build a Custom Offline Knowledge Pack
You can generate a standalone SQLite knowledge pack from any question list, domain file, or Hugging Face dataset using the built-in pack builder CLI:
# Build an agricultural offline knowledge pack from Hugging Face:
python3 -m ghana_mcp.builder \
--hf-dataset ghananlpcommunity/ghana-farmer-qa \
--column question \
--limit 500 \
--output-db data/ghana_farmer_qa_pack.db \
--export-jsonl data/ghana_farmer_qa_pack.jsonl
# Or build from a local text or CSV file of questions:
python3 -m ghana_mcp.builder \
--queries-file my_health_questions.txt \
--output-db data/ghana_health_pack.dbThe builder runs each question through Ghana Search, retrieves matching publications, university theses, government circulars, and laws, and stores the full article content into a portable SQLite database.
2. Run Ghana Search in 100% Offline Mode
Launch the server completely air-gapped without internet access:
# Launch server pointing to your domain knowledge pack
GHANA_SEARCH_OFFLINE=1 GHANA_SEARCH_DB=data/ghana_farmer_qa_pack.db python3 -m ghana_mcp.serverIn offline mode:
0 external network requests are performed.
Queries are matched instantly (< 5ms) against the local knowledge pack using Title-First & Recent-First ranking.
All MCP tools, REST endpoints (
/api/search), and tool execution APIs (/api/tools/execute) work seamlessly offline for local LLMs.
Offline Corpus and Backup
All permanently cached documents (titles, body text, publication dates, direct PDF URLs, and source metadata) are continuously backed up to the Hugging Face dataset repository:
Organization
Ghana Search is developed and maintained by Ghana Open AI (https://ghanaopenai.org).
License
MIT License. See LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Agent-native search engine with live web research optimized for AI agents.
Search your knowledge bases from any AI assistant using hybrid RAG.
Real-time fact-check, citation verification, and source-freshness for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes publisher journalism to LLMs and agent frameworks via search, retrieval, source grounding, and consistent citation, enabling accurate content retrieval with attribution and policy enforcement.-
- AlicenseAqualityCmaintenanceEnables local-first hybrid knowledge retrieval from authorized Markdown and plain-text files, combining full-text and vector search with reranking and traceable source references via a single search tool.1MIT
- FlicenseNot gradedqualityCmaintenanceProvides AI agents and RAG pipelines with production-grade web search, deep research, news, academic, extraction, crawling, and source verification tools. Enables citation-anchored, deduplicated, fresh, and security-hardened evidence gathering from across the web.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform LLM-optimized web searches, retrieve recent news articles with full text, and extract clean readable content from URLs. It returns synthesized answers, ranked cited sources, and page text suitable for grounding RAG workflows.28 npmMIT