Install Dependencies
-
Add the MCP CLI package:
uv add "mcp[cli]"
-
Install additional Python packages:
uv pip install --upgrade unstructured-client python-dotenv
-
Alternatively, you can use:
uv sync
Set Up Environment Variables
- Create a
.env file in the root directory.
- Add your Unstructured API key:
UNSTRUCTURED_API_KEY="YOUR_KEY"
Running the Server
-
Use the MCP CLI to run the server:
mcp run uns_mcp/server.py
-
Alternatively, use:
uv run uns_mcp/server.py
Claude Desktop Integration
-
Navigate to ~/Library/Application Support/Claude/.
-
Create a claude_desktop_config.json file.
-
Add the following configuration:
{
"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
}
}
}
-
Restart Claude Desktop.
Debugging Tools
-
Use the MCP Inspector tool:
mcp dev uns_mcp/server.py
-
To log request call parameters, set:
DEBUG_API_REQUESTS=false
Running Locally
-
Run the minimal client:
uv run python minimal_client/client.py uns_mcp/server.py
-
Or use:
make local-client
Running Locally with HTTP + SSE
-
In one terminal, run the server:
uv run python uns_mcp/server.py --host 127.0.0.1 --port 8080
Or use:
make sse-server
-
In another terminal, run the client:
uv run python minimal_client/client.py "http://127.0.0.1:8080/sse"
Or use:
make sse-client
Environment Variables for Client Configuration
-
Set the logging level:
LOG_LEVEL="ERROR"
-
Disable tool use confirmation (for development purposes only):
CONFIRM_TOOL_USE='false'
Add the MCP CLI package:
uv add "mcp[cli]"
Install additional Python packages:
uv pip install --upgrade unstructured-client python-dotenv
Alternatively, you can use:
uv sync
.env file in the root directory.UNSTRUCTURED_API_KEY="YOUR_KEY"
Use the MCP CLI to run the server:
mcp run uns_mcp/server.py
Alternatively, use:
uv run uns_mcp/server.py
Navigate to ~/Library/Application Support/Claude/.
Create a claude_desktop_config.json file.
Add the following configuration:
{
"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
}
}
}
Restart Claude Desktop.
Use the MCP Inspector tool:
mcp dev uns_mcp/server.py
To log request call parameters, set:
DEBUG_API_REQUESTS=false
Run the minimal client:
uv run python minimal_client/client.py uns_mcp/server.py
Or use:
make local-client
In one terminal, run the server:
uv run python uns_mcp/server.py --host 127.0.0.1 --port 8080
Or use:
make sse-server
In another terminal, run the client:
uv run python minimal_client/client.py "http://127.0.0.1:8080/sse"
Or use:
make sse-client
Set the logging level:
LOG_LEVEL="ERROR"
Disable tool use confirmation (for development purposes only):
CONFIRM_TOOL_USE='false'