SearXNG MCP Server
SearXNG - A2A | AG-UI | MCP
バージョン: 0.1.56
概要
SearXNG MCPサーバー + A2Aサーバー
Model Context Protocol (MCP) サーバーと、すぐに使えるAgent2Agent (A2A) エージェントが含まれています。
MCPサーバーを通じてSearXNGを使用し、プライバシーに配慮したウェブ検索を実行します!
このリポジトリは積極的にメンテナンスされています - コントリビューションを歓迎します!
サポート内容:
プライバシーに配慮したメタ検索
カスタマイズ可能な検索パラメータ(言語、期間、カテゴリ、エンジン)
セーフサーチレベル
ページネーション制御
基本認証のサポート
ランダムなインスタンス選択
MCP
MCPツール
関数名 | 説明 | タグ |
| プライバシーに配慮したメタ検索エンジンであるSearXNGを使用してウェブ検索を実行します。カスタマイズ可能なパラメータで関連するウェブコンテンツを返します。 |
|
MCPサーバーとしての使用
MCPサーバーは、stdio(ローカルテスト用)またはhttp(ネットワークアクセス用)の2つのモードで実行できます。サーバーを起動するには、以下のコマンドを使用します:
stdioモードで実行(デフォルト):
searxng-mcp --transport "stdio"HTTPモードで実行:
searxng-mcp --transport "http" --host "0.0.0.0" --port "8000"AIプロンプト:
Search for information about artificial intelligenceAIレスポンス:
Search completed successfully. Found 10 results for "artificial intelligence":
1. **What is Artificial Intelligence?**
URL: https://example.com/ai
Content: Artificial intelligence (AI) refers to the simulation of human intelligence in machines...
2. **AI Overview**
URL: https://example.org/ai-overview
Content: AI encompasses machine learning, deep learning, and more...A2Aエージェント
このパッケージには、SearXNG MCPサーバーと対話するために使用できるA2Aエージェントサーバーも含まれています。
アーキテクチャ:
---
config:
layout: dagre
---
flowchart TB
subgraph subGraph0["Agent Capabilities"]
C["Agent"]
B["A2A Server - Uvicorn/FastAPI"]
D["MCP Tools"]
F["Agent Skills"]
end
C --> D & F
A["User Query"] --> B
B --> C
D --> E["Platform API"]
C:::agent
B:::server
A:::server
classDef server fill:#f9f,stroke:#333
classDef agent fill:#bbf,stroke:#333,stroke-width:2px
style B stroke:#000000,fill:#FFD600
style D stroke:#000000,fill:#BBDEFB
style F fill:#BBDEFB
style A fill:#C8E6C9
style subGraph0 fill:#FFF9C4コンポーネント相互作用図
sequenceDiagram
participant User
participant Server as A2A Server
participant Agent as Agent
participant Skill as Agent Skills
participant MCP as MCP Tools
User->>Server: Send Query
Server->>Agent: Invoke Agent
Agent->>Skill: Analyze Skills Available
Skill->>Agent: Provide Guidance on Next Steps
Agent->>MCP: Invoke Tool
MCP-->>Agent: Tool Response Returned
Agent-->>Agent: Return Results Summarized
Agent-->>Server: Final Response
Server-->>User: Output使用方法
MCP CLI
短いフラグ | 長いフラグ | 説明 |
-h | --help | ヘルプ情報を表示 |
-t | --transport | トランスポート方式: 'stdio', 'http', または 'sse' [レガシー] (デフォルト: stdio) |
-s | --host | HTTPトランスポートのホストアドレス (デフォルト: 0.0.0.0) |
-p | --port | HTTPトランスポートのポート番号 (デフォルト: 8000) |
--auth-type | 認証タイプ: 'none', 'static', 'jwt', 'oauth-proxy', 'oidc-proxy', 'remote-oauth' (デフォルト: none) | |
--token-jwks-uri | JWT検証用のJWKS URI | |
--token-issuer | JWT検証用の発行者 | |
--token-audience | JWT検証用のオーディエンス | |
--oauth-upstream-auth-endpoint | OAuthプロキシ用のアップストリーム認証エンドポイント | |
--oauth-upstream-token-endpoint | OAuthプロキシ用のアップストリームトークンエンドポイント | |
--oauth-upstream-client-id | OAuthプロキシ用のアップストリームクライアントID | |
--oauth-upstream-client-secret | OAuthプロキシ用のアップストリームクライアントシークレット | |
--oauth-base-url | OAuthプロキシのベースURL | |
--oidc-config-url | OIDC設定URL | |
--oidc-client-id | OIDCクライアントID | |
--oidc-client-secret | OIDCクライアントシークレット | |
--oidc-base-url | OIDCプロキシのベースURL | |
--remote-auth-servers | リモートOAuth用の認証サーバーのカンマ区切りリスト | |
--remote-base-url | リモートOAuthのベースURL | |
--allowed-client-redirect-uris | 許可されたクライアントリダイレクトURIのカンマ区切りリスト | |
--eunomia-type | Eunomia認証タイプ: 'none', 'embedded', 'remote' (デフォルト: none) | |
--eunomia-policy-file | 埋め込みEunomia用のポリシーファイル (デフォルト: mcp_policies.json) | |
--eunomia-remote-url | リモートEunomiaサーバーのURL |
A2A CLI
エンドポイント
Web UI:
http://localhost:8000/(有効な場合)A2A:
http://localhost:8000/a2a(検出:/a2a/.well-known/agent.json)AG-UI:
http://localhost:8000/ag-ui(POST)
短いフラグ | 長いフラグ | 説明 | |
-h | --help | ヘルプ情報を表示 | |
--host | サーバーをバインドするホスト (デフォルト: 0.0.0.0) | ||
--port | サーバーをバインドするポート (デフォルト: 9000) | ||
--reload | 自動リロードを有効にする | ||
--provider | LLMプロバイダー: 'openai', 'anthropic', 'google', 'huggingface' | ||
--model-id | LLMモデルID (デフォルト: nvidia/nemotron-3-super) | ||
--base-url | LLMベースURL (OpenAI互換プロバイダー用) | ||
--api-key | LLM APIキー | ||
--mcp-url | MCPサーバーURL (デフォルト: http://localhost:8000/mcp) | ||
--web | Pydantic AI Web UIを有効にする | False (環境変数: ENABLE_WEB_UI) |
MCPサーバーとしての使用
MCPサーバーは、stdio(ローカルテスト用)またはhttp(ネットワークアクセス用)の2つのモードで実行できます。サーバーを起動するには、以下のコマンドを使用します:
stdioモードで実行(デフォルト):
searxng-mcp --transport "stdio"HTTPモードで実行:
searxng-mcp --transport "http" --host "0.0.0.0" --port "8000"AIプロンプト:
Search for information about artificial intelligenceAIレスポンス:
Search completed successfully. Found 10 results for "artificial intelligence":
1. **What is Artificial Intelligence?**
URL: https://example.com/ai
Content: Artificial intelligence (AI) refers to the simulation of human intelligence in machines...
2. **AI Overview**
URL: https://example.org/ai-overview
Content: AI encompasses machine learning, deep learning, and more...エージェントAI
searxng-mcpは、エージェントAIシステムによって使用されるように設計されています。エージェントがSearXNGを使用してウェブを検索できるようにする一連のツールを提供します。
エージェント間通信 (A2A)
このパッケージには、SearXNG MCPサーバーと対話するために使用できるA2Aエージェントサーバーも含まれています。
CLI
引数 | 説明 | デフォルト |
| サーバーをバインドするホスト |
|
| サーバーをバインドするポート |
|
| 自動リロードを有効にする |
|
| LLMプロバイダー (openai, anthropic, google, huggingface) |
|
| LLMモデルID |
|
| LLMベースURL (OpenAI互換プロバイダー用) |
|
| LLM APIキー |
|
| MCPサーバーURL |
|
| 許可されたMCPツールのリスト |
|
例
A2Aサーバーの実行
searxng-agent --provider openai --model-id gpt-4 --api-key sk-... --mcp-url http://localhost:8000/mcpDockerで実行
docker run -e CMD=searxng-agent -p 8000:8000 searxng-mcpDocker
ビルド
docker build -t searxng-mcp .MCPサーバーの実行
docker run -p 8000:8000 searxng-mcpA2Aサーバーの実行
docker run -e CMD=searxng-agent -p 8001:8001 searxng-mcpMCPサーバーをサービスとしてデプロイ
ServiceNow MCPサーバーは、Dockerを使用してデプロイでき、認証、ミドルウェア、Eunomia認証を設定可能です。
Docker Runを使用する場合
docker pull knucklessg1/searxng-mcp:latest
docker run -d \
--name searxng-mcp \
-p 8004:8004 \
-e HOST=0.0.0.0 \
-e PORT=8004 \
-e TRANSPORT=http \
-e AUTH_TYPE=none \
-e EUNOMIA_TYPE=none \
-e SEARXNG_URL=https://searxng.example.com \
-e SEARXNG_USERNAME=user \
-e SEARXNG_PASSWORD=pass \
-e USE_RANDOM_INSTANCE=false \
knucklessg1/searxng-mcp:latest高度な認証(JWT、OAuthプロキシ、OIDCプロキシ、リモートOAuthなど)やEunomiaを使用する場合は、関連する環境変数を追加してください:
docker run -d \
--name searxng-mcp \
-p 8004:8004 \
-e HOST=0.0.0.0 \
-e PORT=8004 \
-e TRANSPORT=http \
-e AUTH_TYPE=oidc-proxy \
-e OIDC_CONFIG_URL=https://provider.com/.well-known/openid-configuration \
-e OIDC_CLIENT_ID=your-client-id \
-e OIDC_CLIENT_SECRET=your-client-secret \
-e OIDC_BASE_URL=https://your-server.com \
-e ALLOWED_CLIENT_REDIRECT_URIS=http://localhost:*,https://*.example.com/* \
-e EUNOMIA_TYPE=embedded \
-e EUNOMIA_POLICY_FILE=/app/mcp_policies.json \
-e SEARXNG_URL=https://searxng.example.com \
-e SEARXNG_USERNAME=user \
-e SEARXNG_PASSWORD=pass \
-e USE_RANDOM_INSTANCE=false \
knucklessg1/searxng-mcp:latestDocker Composeを使用する場合
docker-compose.ymlファイルを作成します:
services:
searxng-mcp:
image: knucklessg1/searxng-mcp:latest
environment:
- HOST=0.0.0.0
- PORT=8004
- TRANSPORT=http
- AUTH_TYPE=none
- EUNOMIA_TYPE=none
- SEARXNG_URL=https://searxng.example.com
- SEARXNG_USERNAME=user
- SEARXNG_PASSWORD=pass
- USE_RANDOM_INSTANCE=false
ports:
- 8004:8004認証とEunomiaを使用した高度な設定の場合:
services:
searxng-mcp:
image: knucklessg1/searxng-mcp:latest
environment:
- HOST=0.0.0.0
- PORT=8004
- TRANSPORT=http
- AUTH_TYPE=oidc-proxy
- OIDC_CONFIG_URL=https://provider.com/.well-known/openid-configuration
- OIDC_CLIENT_ID=your-client-id
- OIDC_CLIENT_SECRET=your-client-secret
- OIDC_BASE_URL=https://your-server.com
- ALLOWED_CLIENT_REDIRECT_URIS=http://localhost:*,https://*.example.com/*
- EUNOMIA_TYPE=embedded
- EUNOMIA_POLICY_FILE=/app/mcp_policies.json
- SEARXNG_URL=https://searxng.example.com
- SEARXNG_USERNAME=user
- SEARXNG_PASSWORD=pass
- USE_RANDOM_INSTANCE=false
ports:
- 8004:8004
volumes:
- ./mcp_policies.json:/app/mcp_policies.jsonサービスを実行します:
docker-compose up -dAI統合のためにmcp.jsonを設定する
{
"mcpServers": {
"searxng": {
"command": "uv",
"args": [
"run",
"--with",
"searxng-mcp",
"searxng-mcp"
],
"env": {
"SEARXNG_URL": "https://searxng.example.com",
"SEARXNG_USERNAME": "user",
"SEARXNG_PASSWORD": "pass",
"USE_RANDOM_INSTANCE": "false"
},
"timeout": 300000
}
}
}Pythonパッケージのインストール
python -m pip install searxng-mcpuv pip install searxng-mcpリポジトリオーナー
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
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/Knuckles-Team/searxng-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server