Unstructured API MCP Server for Research Paper Data Processing について
Unstructured APIで研究論文を処理し、情報を抽出するMCPサーバーです。文献レビューやLLMのファインチューニング用データを扱う研究者向けで、Google DriveのPDF読み込みとMongoDBへの接続に対応します。
主な機能
- 01研究論文からの情報抽出
- 02Unstructured APIによる処理
- 03Google DriveのPDF読み込み
- 04MongoDBへの接続
- 05ローカルHTTP・SSEテスト
活用シーン
- 01研究論文からの情報抽出
- 02LLMのファインチューニング用データ準備
- 03MCPクライアントでのローカルサーバーテスト
MCP 対応
研究論文の処理機能をMCPクライアントに提供します。READMEにはローカルのstdio設定と、最小構成のクライアント向けHTTP + SSE接続が記載されています。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
研究論文データ処理用 Unstructured API MCP サーバー
Unstructured API を活用することで、このサーバーは研究論文から有用な情報を抽出する強力なツール群に簡単にアクセスできるようにします。抽出した情報は、研究者の文献レビューにかかる時間を短縮するため、言語モデル(LLM)のファインチューニングに利用できます。
ブログはこちら:
- ハッカソンとプロジェクトについて詳しく知り、手順を確認するには、Dev.to のブログ記事をご覧ください:Unstructured Model Context Protocol Hackathon.
目次:
セットアップ
依存関係をインストールします:
uv add "mcp[cli]"uv pip install --upgrade unstructured-client python-dotenv
または、uv sync を使用します。
要件
UNS_MCP プロジェクトの作業を始める前に、以下の準備ができていることを確認してください:
-
UNSTRUCTURED_API_KEY
- ドキュメント処理用の API にアクセスするため、Unstructured platform から API キーを取得します。
-
GOOGLEDRIVE_SERVICE_ACCOUNT_KEY
- Google Drive から PDF を読み取れるよう、Google Cloud プロジェクトを設定してサービスアカウントを作成します。設定手順はこちらをご確認ください。
- サービスアカウントの JSON 認証情報を保存し、GOOGLEDRIVE_SERVICE_ACCOUNT_KEY の設定に使用します。
-
MONGO_DB_CONNECTION_STRING
- MongoDB データベース(クラウド)を設定し、データベースへの接続文字列を取得します。設定手順はこちらをご確認ください。
-
.env.template
.env.templateファイルには、必要な環境変数がすべて含まれています。このファイルを.envにコピーし、上記のキーに必要な値を設定します。
.envファイルの例:UNSTRUCTURED_API_KEY="<key-here>" MONGO_DB_CONNECTION_STRING="<CONNECTION_STRING>" GOOGLEDRIVE_SERVICE_ACCOUNT_KEY="<converted string>"
Project Flow
-
User Query to MCP Client
-
Claude Interacts with
UNS_MCPServer- Claude forwards the user's query to the custom MCP server named
UNS_MCP.
- Claude forwards the user's query to the custom MCP server named
-
MCP Tool Executes Unstructured API
UNS_MCPinteracts with the Unstructured API to process the research paper PDF, extract relevant information, and convert it into structured JSON data.
-
Structured Data (JSON) Output is stored in the destination source
- The result from the Unstructured API is transformed into JSON format, which can then be further utilized to fine-tune LLMs, helping researchers quickly find the relevant information without manually reading the entire paper.


Available Tools
| Tool | Description |
|---|---|
list_sources | Lists available sources from the Unstructured API. |
get_source_info | Get detailed information about a specific source connector. |
create_gdrive_source | Create a google drive source connector. |
update_gdrive_source | Update an existing google source connector by params. |
delete_gdrive_source | Delete a source connector by source id. |
list_destinations | Lists available destinations from the Unstructured API. |
get_destination_info | Get detailed info about a specific destination connector. Currently, we have s3/weaviate/astra/neo4j/mongo DB (more to come!) |
create_mongodb_destination | Create a mongodb destination connector by params. |
update_mongodb_destination | Update an existing mongodb destination connector by destination id. |
delete_mongodb_destination | Delete a mongodb destination connector by destination id. |
list_workflows | Lists workflows from the Unstructured API. |
get_workflow_info | Get detailed information about a specific workflow. |
create_workflow | Create a new workflow with source, destination id, etc. |
run_workflow | Run a specific workflow with workflow id |
update_workflow | Update an existing workflow by params. |
delete_workflow | Delete a specific workflow by id. |
list_jobs | Lists jobs for a specific workflow from the Unstructured API. |
get_job_info | Get detailed information about a specific job by job id. |
cancel_job | Delete a specific job by id. |
Follow Along
1. Set Up Required Connectors
Google Drive Source Connector:
- Create a Google Drive Source Connector to connect your service account with Google Drive and retrieve PDFs.
- Test the connection to ensure accessibility.
MongoDB Destination Connector:
- Set up the MongoDB Destination Connector to store processed data.
- Test the connection to ensure accessibility.
2. Develop the Workflow
-
Define Connectors: Set up the Google Drive source and MongoDB destination connectors.
-
Partitioning: Use Auto partitioning for optimal document splitting.
-
Chunking: Apply by-page chunking for manageable text segments.
-
Enrichment: Use NER to extract entities and table enrichment for any tables.
-
Embedding: Convert text into embeddings for querying or analysis.
Note: Tweak the Flow: Adjust any step (partitioning, chunking, enrichment, embedding) as needed.
3. Set Up Claude Desktop
- Install Claude Desktop and integrate it with the UNS_MCP server by following steps given below.
- Restart Claude to link with the MCP server and ensure workflow functionality.
4. Query and Run the Workflow
- Use Claude to interact with the system and execute queries to list, create, edit, delete and run the workflow. You can perform many such tasks, go through
Available Toolsgiven above.
5. Results

Claude Desktop Integration
To install in Claude Desktop:
- Go to
claude_desktop_config.jsonby running the below command.
# For macOS or Linux:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
# For Windows:
code $env:AppData\Claude\claude_desktop_config.json
- そのファイルに以下を追加します:
{
"mcpServers":
{
"UNS_MCP":
{
"command": "ABSOLUTE/PATH/TO/.local/bin/uv",
"args":
[
"--directory",
"ABSOLUTE/PATH/TO/YOUR-UNS-MCP-REPO/uns_mcp",
"run",
"server.py"
],
"env":
[
"UNSTRUCTURED_API_KEY":"<your key>"
],
"disabled": false
}
}
}
-
Claude Desktop を再起動します。
-
Claude Desktop で発生する問題の例。
- 宛先コネクターの一覧を問い合わせると、
No destinations foundと表示されます。.env または設定 JSON の API キーを確認してください。https://platform.unstructured.io/app/account/api-keysにある個人用キーを指定する必要があります。
- 宛先コネクターの一覧を問い合わせると、
デバッグツール
Anthropic は、MCP サーバーのデバッグ/テスト用に MCP Inspector ツールを提供しています。以下のコマンドを実行して、デバッグ用 UI を起動します。左側のペインで環境変数(ローカル環境を参照するもの)を追加できます。個人用 API キーも環境変数として指定してください。tools に移動すると、MCP サーバーに追加した機能をテストできます。
mcp dev uns_mcp/server.py
UnstructuredClient へのリクエスト呼び出しパラメーターをログに記録するには、環境変数 DEBUG_API_REQUESTS=false を設定します。
ログは unstructured-client-{date}.log という形式のファイルに保存されます。このファイルを確認して、UnstructuredClient 関数へのリクエスト呼び出しパラメーターをデバッグできます。
HTTP + SSE 経由でローカルの MCP サーバーにアクセスする、ローカル実行の最小クライアント
主な違いは、開発中にサーバー側でブレークポイントを設定しやすくなることです。クライアントとサーバーが分離されています。
# in one terminal, run the server:
uv run python uns_mcp/server.py --host 127.0.0.1 --port 8080
or
make sse-server
# in another terminal, run the client:
uv run python minimal_client/client.py "http://127.0.0.1:8080/sse"
or
make sse-client
ヒント:まずクライアントで ctrl+c を押して終了し、その後サーバーを終了してください。そうしないと、サーバーがハングしたように見えます。
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。