MCP Web Research Agent
MCP Web Research Agent for macOS
macOS向けのPython Model Context Protocol(MCP)エージェント/サーバーです。ローカルのAIアシスタントに以下のツールを提供します:
search_web— DuckDuckGo HTML検索結果による公開ウェブ検索fetch_url— 公開ウェブページを取得して読みやすいテキストを抽出save_note— 選択したフォルダーに調査ノートをMarkdown/テキストファイルとして保存
このプロジェクトには、Ollama をMCPサーバーに接続する小さなローカルブリッジ agent.py も含まれています。Ollama がLLMを実行し、このプロジェクトがMCPツールとツール呼び出しエージェントループを提供します。
注:Ollama 自体はモデルサーバーであり、ネイティブなMCPクライアントではありません。Ollama をMCPツールで使用するには、ここで
agent.pyを実行するか、別のMCPブリッジ/クライアントを使用してください。
必要なもの
macOS搭載のMacBook Pro
Python 3.11 以上(
mcpパッケージはPython 3.10+が必要です。セットアップでは3.13/3.12/3.11を推奨)Ollama がインストールされ実行中であること
ツール呼び出し対応のローカルモデル。推奨の出発点:
16GB RAMのMacでは
qwen2.5:7b十分なRAM/性能がある場合は
qwen2.5:14bOllamaのバージョンが対応していれば
qwen3:14b
Related MCP server: Local Research MCP Server
1. インストール
ターミナルを開いて実行:
cd ~/Projects
git clone <your-repo-url> mcp-web-research-agent # or copy this folder here
cd ~/Projects/mcp-web-research-agent
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtPython 3.11+ をお持ちでない場合:
brew install python2. Ollama のインストールと起動
https://ollama.com からOllamaをインストールするか、Homebrewで:
brew install --cask ollamaOllamaアプリを一度起動し、モデルをプル:
ollama pull qwen2.5:7b
ollama serve別のターミナルタブで、Ollamaが実行中か確認:
curl http://localhost:11434/api/tags3. ローカルの Ollama MCP エージェントを実行
プロジェクトフォルダから:
cd ~/Projects/mcp-web-research-agent
source .venv/bin/activate
python agent.py次のように質問してみてください:
Research recent MCP news, open the two best sources, summarize them, and save the summary as mcp-news.md.ワンショットモード:
python agent.py "Research current MCP SDK best practices and save notes."別のモデルを使用:
python agent.py --model qwen2.5:14bノートの保存先を選択:
python agent.py --notes-dir ~/Documents/research-notes4. Claude Desktop での使用
Claude Desktop がMCPサーバーに直接接続するようにしたい場合は、次を編集します:
~/Library/Application Support/Claude/claude_desktop_config.json追加:
{
"mcpServers": {
"web-research": {
"command": "/Users/YOUR_USERNAME/Projects/mcp-web-research-agent/.venv/bin/python",
"args": [
"/Users/YOUR_USERNAME/Projects/mcp-web-research-agent/server.py"
],
"env": {
"MCP_NOTES_DIR": "/Users/YOUR_USERNAME/Documents/MCP-research-notes"
}
}
}
}YOUR_USERNAME をあなたのMacのユーザー名に置き換えてください。ファイルが存在しない場合は作成してください。編集後、Claude Desktopを再起動します。
5. Cursor での使用
ワークスペースで .cursor/mcp.json を作成または編集:
{
"mcpServers": {
"web-research": {
"command": "/Users/YOUR_USERNAME/Projects/mcp-web-research-agent/.venv/bin/python",
"args": [
"/Users/YOUR_USERNAME/Projects/mcp-web-research-agent/server.py"
],
"env": {
"MCP_NOTES_DIR": "/Users/YOUR_USERNAME/Documents/MCP-research-notes"
}
}
}
}その後、Cursorを再起動するか、MCP設定をリロードします。
ツールリファレンス
search_web(query: str, max_results: int = 5)
検索結果をJSONで返します:
{
"query": "Model Context Protocol",
"results": [
{
"title": "Example",
"url": "https://example.com",
"snippet": "..."
}
]
}fetch_url(url: str, max_chars: int = 8000)
http/https URLを取得し、抽出したテキストを返します。JavaScriptレンダリングは回避するため、通常のHTMLページで最適に動作します。
save_note(filename: str, content: str)
ノートを MCP_NOTES_DIR に保存します。デフォルトのディレクトリは:
~/MCPWebResearch/notesこのツールはファイル名をサニタイズし、パストラバーサルをブロックします。
設定
環境変数:
OLLAMA_MODEL—agent.pyが使用するデフォルトモデル。デフォルトはqwen2.5:7bOLLAMA_URL— OpenAI互換のOllamaチャットエンドポイント。デフォルトはhttp://localhost:11434/v1/chat/completionsMCP_NOTES_DIR— メモの保存先ディレクトリ
例:
export OLLAMA_MODEL=qwen2.5:14b
export MCP_NOTES_DIR=~/Documents/research-notes
python agent.pyトラブルシューティング
localhost:11434 への Connection refused
Ollamaが実行されていません。次で起動してください:
ollama serveツールが呼び出されない
ツール呼び出しに対応したモデルを使用してください。qwen2.5:7b、qwen2.5:14b などのモデルが適しています。
ページから返されるテキストが少ない
一部のサイトはJavaScriptを必要とするか、ブラウザ以外のクライアントをブロックします。別のURLを試すか、search_web と fetch_url を組み合わせて使用してください。
Claude Desktop にサーバーが表示されない
以下を確認してください:
パスが
.venv/bin/pythonを指している(このプロジェクト内)server.pyのパスが絶対パスであるClaude Desktop を完全に再起動した
ファイル
server.py— Webリサーチツールを備えたMCPサーバーagent.py— ローカルOllama対応のMCPクライアント/エージェントループrequirements.txt— Python依存関係
セキュリティに関する注意
このサーバーは公開URLを取得し、公開ウェブ検索を実行できます。
ファイルは
MCP_NOTES_DIRにのみ書き込みます。それ以外の場所には書き込みません。シェルコマンドは実行しません。
信頼する前に、保存されたメモと引用を確認してください。
第2のMCPエージェント:ローカルプランナー
このリポジトリには、local-planner という2つ目のMCPサーバーが含まれています。プロジェクト、タスク、Markdownノートをディスクに保存します。
機能
ツール:
create_project(name, description)list_projects()create_task(project, title, notes, status, priority, due_date)list_tasks(project, status)update_task(project, task_id, title, notes, status, priority, due_date)complete_task(project, task_id)delete_task(project, task_id)save_project_note(project, content, append)get_daily_focus(for_date)
デフォルトのデータディレクトリ:
~/MCPPlanner上書きする場合:
export MCP_PLANNER_DIR=~/Documents/my-plannerOllama プランナーを実行
bash run-planner.shワンショット:
bash run-planner.sh "Create a project called Weekend Yard Work with tasks for mowing, trimming bushes, and buying mulch."別のモデルを使用:
bash run-planner.sh --model qwen2.5:14bプランナーデータを別の場所に保存:
bash run-planner.sh --data-dir ~/Documents/planner-dataおすすめのプランナープロンプト
Create a project called Home Network Upgrade and break it into at least six tasks with priorities.Look at my daily focus and tell me what I should work on first.Create a moving checklist project with tasks, due dates, and notes.Mark the first task in the Weekend Yard Work project complete and tell me what remains.Claude Desktop のプランナー設定
次を使用:
claude_desktop_config.planner.example.json次に追加:
~/Library/Application Support/Claude/claude_desktop_config.json両方のサーバーを mcpServers の下にマージして、ClaudeにWeb検索とプランニングの両方のツールを認識させることができます。
Cursor のプランナー設定
次を使用:
cursor-mcp.planner.example.jsonファイル
planner_server.py— プロジェクト/タスク/メモ用のMCPサーバーplanner_agent.py— プランナー用のOllamaブリッジ/エージェントrun-planner.sh— ランチャー
3つ目のMCPエージェント: 健康・習慣トラッカー
このリポジトリには、習慣、ワークアウト、食事、身体測定値を追跡する3つ目のMCPサーバー/エージェントが含まれています。すべてのデータは MCP_HEALTH_DIR(デフォルトは ~/MCPHealth)の下にローカル保存されます。
このツールは個人の記録用のみで、医学的アドバイスを提供するものではありません。
ツール
create_habit(name, description, target_per_week, unit)list_habits(active_only)log_habit(log_date, value, habit_id|habit_name)log_workout(activity, duration_minutes, log_date, intensity, calories, distance_km, notes)log_meal(description, meal_type, log_date, calories, carbs_g, protein_g, fat_g, notes)log_measurement(weight_kg, log_date, waist_cm, body_fat_pct, notes)list_logs(log_type, from_date, to_date, limit)delete_log(log_id)save_health_note(content, append)get_daily_summary(for_date)
Ollama で実行
bash run-health.shワンショット:
bash run-health.sh "Create habits for a 30-min walk, drinking water, and stretching, then log today's walk and a lunch salad."別のモデルまたはデータディレクトリを使用:
bash run-health.sh --model qwen2.5:14b --data-dir ~/Documents/health-dataおすすめのプロンプト
Create habits for walking 5 days per week, drinking 80 oz of water, and stretching daily.Log a 45-minute moderate run today that burned 420 calories and covered 6 km.Log my breakfast: oatmeal with banana and peanut butter, about 520 calories and 22 grams of protein.Give me today's health summary and list habits I still need to complete.Give me my weekly report and tell me which habits I'm behind on.Claude Desktop / Cursor の設定
claude_desktop_config.health.example.jsoncursor-mcp.health.example.json
ファイル
health_server.py— MCPサーバーhealth_agent.py— Ollamaブリッジ/エージェントrun-health.sh— ランチャー
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI models to search the web using DuckDuckGo, scrape webpage content in markdown format, and browse/read local files for code analysis and debugging.191MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search the web using DuckDuckGo and extract clean text content from websites for real-time research, with all processing happening locally for complete privacy.3MIT
- FlicenseAqualityDmaintenanceProvides local web search and content fetching capabilities for AI assistants, enabling them to search DuckDuckGo and extract clean text from web pages. All requests originate from the user's machine to ensure direct network control and bypass external proxies.2
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read webpages and perform web searches using DuckDuckGo.MIT
Related MCP Connectors
Web research for agents: quality-scored Google search, webpage extraction, and deep research.
Read any web page as clean Markdown for AI agents: fetch, search, metadata, links. SSRF-safe.
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/jstrick9/mcp_agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server