Glean Chatbot
Glean Chatbot
社内の契約ドキュメントの小規模なセットを Glean にインデックス登録し、それらのドキュメントに基づいて Search + Chat で質問に回答し、同じフローを MCP ツール(ask_glean)として公開します。
要件
Python 3.10+
Glean インスタンス
Indexing API トークン
Search と Chat のスコープを持つ Client API トークン
Related MCP server: Glean Remote MCP Server
セットアップ
リポジトリをクローンして移動します:
git clone <your-repo-url>
cd glean-chatbot依存関係をインストールします:
pip install -r requirements.txtサンプルから
.envを作成し、値を入力します:
# macOS / Linux
cp .env.example .env
# Windows (PowerShell)
copy .env.example .env変数 | 必須 | 目的 |
| 必須 | インスタンス名( |
| 必須 | Indexing API トークン |
| 必須 | Client API トークン(Search + Chat) |
| 必須* |
|
| 任意 | データソース名(デフォルトは |
| 任意 | Glean UI での表示名 |
| 任意 | すべてのドキュメントの |
.env は config.py(python-dotenv 経由)によって自動的に読み込まれます。source する必要はありません。
実行
ドキュメントのインデックス登録
python scripts/index_documents.py
# optional: wait until Search can find them
python scripts/index_documents.py --verifyCLI から質問する
python scripts/ask.py "Who owns the Enronry Tony contract?"
python scripts/ask.py "What must OKLightning Tony deliver before go-live?" --top-k 3MCP (Cursor)
プロジェクト設定は .cursor/mcp.json にあります(src/mcp_server.py の絶対パス + 環境変数)。編集後は Cursor を再起動するか MCP を再読み込みしてください。ツールは ask_glean です。
サーバー単体のスモークテスト:
python src/mcp_server.pyテスト
python tests/test_pipeline.pyネットワークは使用しません。Search/Chat をモックします。
仕組み
scripts/index_documents.py は Indexing API 経由で data/documents.json をプッシュします。クエリ時には、src/pipeline.py が Search を呼び出し、ヒットがある場合のみ、そのヒットをクローズドブックのコンテキストとして Chat を呼び出し、回答と出典を返します。CLI と MCP はどちらも同じパイプラインを呼び出します。結果は自社ドキュメントに限定されます。Search が何も返さない場合は、回答を捏造するのではなく、類似したドキュメントのタイトルを提案します。
注意事項 / 制限事項
共有サンドボックスは
datasourcesFilterを無視するため、ドキュメント ID の接頭辞(CUSTOM_<DATASOURCE>_Contract_)でクライアント側のフィルタリングをしています。インデックス登録は非同期です。ドキュメントが検索可能になるまで数分かかる場合があります。
デモ用ドキュメントは
allowAnonymousAccess: trueを使用しています。本番環境では有効にしないでください。ドキュメントの
viewURLはGLEAN_URL_REGEXに一致する必要があります。一致しない場合、インデックス登録が拒否されます。
API のトレードオフと本番運用に関する注意点については DESIGN_NOTE.md を参照してください。
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 semantic search and retrieval of personal and team knowledge from connected sources like Slack, Gmail, Google Drive, and Dropbox, with the ability to save new information for future recall.Apache 2.0

Glean Remote MCP Serverofficial
AlicenseNot gradedqualityCmaintenanceEnables AI assistants and developer tools to securely access and interact with an organization's enterprise knowledge, documents, and people through natural language while respecting existing access permissions.164MIT- FlicenseNot gradedqualityFmaintenanceEnables semantic search across documentation stored in Gemini FileSearchStores, returning AI-generated answers with source citations.1

Rememberizer MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceEnables querying and managing personal/team internal knowledge from sources like Slack, Gmail, and Drive through semantic search and retrieval.Apache 2.0
Related MCP Connectors
Search your knowledge bases from any AI assistant using hybrid RAG.
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Connect your team's living knowledge base — docs, data, issues, CRM — to Claude and ChatGPT.
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/tonyromero-ai/glean-chatbot'
If you have feedback or need assistance with the MCP directory API, please join our Discord server