searxng-mcp-client
v1.0.0
Published
MCP client for SearXNG metasearch engine
Maintainers
Readme
SearXNG MCP Client - Fully Online
A Model Context Protocol (MCP) client for SearXNG metasearch engine that works 100% online with no local dependencies.
🌐 Fully Online Architecture
Cursor MCP Config
↓ npx command
Node.js MCP Client (npm package)
↓ HTTP requests
Railway Web Server (your deployment)
↓ SearXNG API calls
Public SearXNG Instance🚀 Quick Setup (Option 1: npm package)
1. Publish to npm (if you want to make it publicly available)
cd /Users/leonardoviri/lab/searxng
npm publish2. Update your MCP config
Update your ~/.cursor/mcp.json:
{
"mcpServers": {
"searxng": {
"command": "npx",
"args": ["searxng-mcp-client"],
"env": {
"SEARXNG_MCP_WEB_URL": "https://searxng-production-ea9d.up.railway.app"
},
"tags": ["search", "web", "metasearch"]
}
}
}🔧 Quick Setup (Option 2: Local but online-connected)
If you don't want to publish to npm yet, you can still eliminate the Python dependency:
1. Install dependencies
cd /Users/leonardoviri/lab/searxng
npm install2. Update your MCP config
Update your ~/.cursor/mcp.json:
{
"mcpServers": {
"searxng": {
"command": "node",
"args": ["/Users/leonardoviri/lab/searxng/index.js"],
"env": {
"SEARXNG_MCP_WEB_URL": "https://searxng-production-ea9d.up.railway.app"
},
"tags": ["search", "web", "metasearch"]
}
}
}✅ What's Now Fully Online
- ✅ Web Server: Deployed on Railway
- ✅ Search Backend: Uses public SearXNG instance
- ✅ MCP Client: Node.js (no Python dependency)
- ✅ All Communication: HTTP requests to online services
🎯 Available Search Tools
Your MCP client now provides:
mcp_searxng_search- General web searchmcp_searxng_search_images- Image searchmcp_searxng_search_news- News searchmcp_searxng_search_videos- Video searchmcp_searxng_search_science- Scientific paper searchmcp_searxng_advanced_search- Advanced search with operators
🔍 Usage Examples
// Basic search
{
"query": "machine learning trends 2024",
"max_results": 10
}
// Advanced search with site restriction
{
"query": "python tutorials",
"site": "github.com",
"max_results": 15
}
// News search with time filter
{
"query": "artificial intelligence news",
"time_range": "day",
"max_results": 8
}🐛 Troubleshooting
Test your Railway deployment:
curl https://searxng-production-ea9d.up.railway.app/healthTest the Node.js client locally:
cd /Users/leonardoviri/lab/searxng
node index.jsCommon Issues:
- "Module not found" - Run
npm install - "Connection refused" - Check Railway deployment status
- "Tool not found" - Verify Railway app is running and
/toolsendpoint works
🚀 Deployment Options
Option A: Private npm package
npm publish --access=restrictedOption B: Public npm package
npm publish --access=publicOption C: GitHub package
npm publish --registry=https://npm.pkg.github.com📁 File Structure
searxng/
├── index.js # Node.js MCP client (replaces Python)
├── package.json # npm package configuration
├── searxng_web_server.py # FastAPI server (deployed on Railway)
├── requirements.txt # Python dependencies (Railway)
├── Procfile # Railway deployment config
├── railway.json # Railway settings
└── README.md # This file🎉 Benefits of This Setup
- 🌐 100% Online - No local Python files needed
- 📦 npm Distribution - Can be installed anywhere with
npx - ⚡ Fast - Direct HTTP calls to Railway
- 🔄 Scalable - Railway handles all the heavy lifting
- 🛡️ Reliable - No local dependencies to break
- 🚀 Easy Updates - Update Railway deployment or npm package independently
🔄 Migration Complete!
You've successfully migrated from:
Python MCP Server (local) → Node.js MCP Client (npm) → Railway Web Server (online)Your SearXNG MCP is now fully online and ready for production! 🎯
