{"id":26648379,"url":"https://github.com/Unstructured-IO/UNS-MCP","last_synced_at":"2025-03-25T00:02:06.697Z","repository":{"id":282102812,"uuid":"947454003","full_name":"Unstructured-IO/UNS-MCP","owner":"Unstructured-IO","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-20T21:32:59.000Z","size":218,"stargazers_count":6,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T22:05:38.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Unstructured-IO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-12T17:57:43.000Z","updated_at":"2025-03-20T18:45:55.000Z","dependencies_parsed_at":"2025-03-13T17:52:29.350Z","dependency_job_id":null,"html_url":"https://github.com/Unstructured-IO/UNS-MCP","commit_stats":null,"previous_names":["mkhalusova/uns-mcp","unstructured-io/uns-mcp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unstructured-IO%2FUNS-MCP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unstructured-IO%2FUNS-MCP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unstructured-IO%2FUNS-MCP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unstructured-IO%2FUNS-MCP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Unstructured-IO","download_url":"https://codeload.github.com/Unstructured-IO/UNS-MCP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245372379,"owners_count":20604491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-25T00:01:51.612Z","updated_at":"2025-03-25T00:02:06.678Z","avatar_url":"https://github.com/Unstructured-IO.png","language":"Python","funding_links":[],"categories":["Productivity","🏢 Enterprise-Supported Implementations","Production-Ready Servers","📦 Other","Data Science Tools","APIs and HTTP Requests","Official Servers","官方 MCP 服务器列表","Table of Contents","🗂️ Extensions by Category","Productivity \u0026 Workflow"],"sub_categories":["Documents","Data \u0026 Web Services","Other Tools and Integrations","🧠 Knowledge Base"],"readme":"# Unstructured API MCP Server\n\nAn MCP server implementation for interacting with the Unstructured API. This server provides tools to list sources and workflows.\n\n## Setup\n\n1. Install dependencies:\n- `uv add \"mcp[cli]\"`\n- `uv pip install --upgrade unstructured-client python-dotenv`\n\nor use `uv sync`.\n\n2. Set your Unstructured API key as an environment variable.\n   - Create a `.env` file in the root directory, and add a line with your key: `UNSTRUCTURED_API_KEY=\"YOUR_KEY\"`\n\nTo test in local, any working key that pointing to prod env would work. However, to be able to return valid results from client's side (e.g, Claude for Desktop), your personal key that is fetched from `https://platform.unstructured.io/app/account/api-keys` is needed.\n\n## Running the Server\nUsing the MCP CLI:\n```bash\nmcp run uns_mcp/server.py\n```\n\nor:\n```bash\nuv run uns_mcp/server.py\n```\n\n## Available Tools\n\n### Sources\n\n#### list_sources\nLists available sources from the Unstructured API.\n\nParameters:\n- `source_type` (optional): Filter sources by connector type\n\n#### get_source_info\nGet detailed information about a specific source connector.\n\nParameters:\n- `source_id`: ID of the source connector to get information for\n\n#### create_[connector]_source\nCreate a source connector. We plan on adding all the source connectors that are available in Unstructured Platform (https://platform.unstructured.io). Please refer to our CHANGELOG.md for new source connectors we are rapidly adding.\n\nBelow is example for `create_s3_source`\n\nParameters:\n- `name`: Unique name for the connector\n- `remote_url`: S3 URI to the bucket or folder (e.g., s3://my-bucket/)\n- `key` (optional): AWS access key ID (required if not using anonymous auth)\n- `secret` (optional): AWS secret access key (required if not using anonymous auth)\n- `token` (optional): AWS STS session token for temporary access\n- `anonymous` (optional): Whether to use anonymous authentication (default: false)\n- `endpoint_url` (optional): Custom URL if connecting to a non-AWS S3 bucket\n- `recursive` (optional): Whether to access subfolders within the bucket (default: false)\n\n#### update_[connector]_source\nUpdate an existing source connector. Below is an example of `update_s3_source`:\n\nParameters:\n- `source_id`: ID of the source connector to update\n- `remote_url` (optional): Updated S3 URI to the bucket or folder\n- `key` (optional): Updated AWS access key ID\n- `secret` (optional): Updated AWS secret access key\n- `token` (optional): Updated AWS STS session token\n- `anonymous` (optional): Whether to use anonymous authentication\n- `endpoint_url` (optional): Updated custom URL\n- `recursive` (optional): Updated subfolder access setting\n\n#### delete_[connector]_source\nDelete a source connector. Below is an example of `delete_s3_source`:\n\nParameters:\n- `source_id`: ID of the source connector to delete\n\n### Firecrawl Source\n\n[Firecrawl](https://www.firecrawl.dev/) is a web crawling API that provides two main capabilities in our MCP:\n\n1. **HTML Content Retrieval**: Using `invoke_firecrawl_crawlhtml` to start crawl jobs and `check_crawlhtml_status` to monitor them\n2. **LLM-Optimized Text Generation**: Using `invoke_firecrawl_llmtxt` to generate text and `check_llmtxt_status` to retrieve results\n\nHow Firecrawl works:\n\n**Web Crawling Process:**\n- Starts with a specified URL and analyzes it to identify links\n- Uses the sitemap if available; otherwise follows links found on the website\n- Recursively traverses each link to discover all subpages\n- Gathers content from every visited page, handling JavaScript rendering and rate limits\n- Jobs can be cancelled with `cancel_crawlhtml_job` if needed\n- Use this if you require all the info extracted into raw HTML, Unstructured's workflow cleans it up really well  :smile:\n\n**LLM Text Generation:**\n- After crawling, extracts clean, meaningful text content from the crawled pages\n- Generates optimized text formats specifically formatted for large language models\n- Results are automatically uploaded to the specified S3 location\n- Note: LLM text generation jobs cannot be cancelled once started. The `cancel_llmtxt_job` function is provided for consistency but is not currently supported by the Firecrawl API.\n\nNote: A `FIRECRAWL_API_KEY` environment variable must be set to use these functions.\n\n### Destinations\n\n#### list_destinations\nLists available destinations from the Unstructured API.\n\nParameters:\n- `destination_type` (optional): Filter destinations by connector type\n\n#### get_destination_info\nGet detailed information about a specific destination connector.\n\nParameters:\n- `destination_id`: ID of the destination connector to get information for\n\n#### create_[connector]_destination\nCreate a destination connector. We plan on adding all the destination connectors that are available in Unstructured Platform (https://platform.unstructured.io). Please refer to our CHANGELOG.md for new destination connectors we are rapidly adding.\n\nBelow is an example of `create_s3_destination`:\n\nParameters:\n- `name`: Unique name for the connector\n- `remote_url`: S3 URI to the bucket or folder (e.g., s3://my-bucket/)\n- `key`: AWS access key ID\n- `secret`: AWS secret access key\n- `token` (optional): AWS STS session token for temporary access\n- `endpoint_url` (optional): Custom URL if connecting to a non-AWS S3 bucket\n\n#### update_[connector]_destination\nUpdate an existing destination connector. Below is an example of `update_s3_destination`:\n\nParameters:\n- `destination_id`: ID of the destination connector to update\n- `remote_url` (optional): Updated S3 URI to the bucket or folder\n- `key` (optional): Updated AWS access key ID\n- `secret` (optional): Updated AWS secret access key\n- `token` (optional): Updated AWS STS session token\n- `endpoint_url` (optional): Updated custom URL\n\n#### delete_[connector]_destination\nDelete a destination connector. Below is an example of `delete_s3_destination`:\n\nParameters:\n- `destination_id`: ID of the destination connector to delete\n\n\n### Workflows\n\n#### list_workflows\nLists workflows from the Unstructured API.\n\nParameters:\n- `destination_id` (optional): Filter by destination connector ID\n- `source_id` (optional): Filter by source connector ID\n- `status` (optional): Filter by workflow status\n\n#### get_workflow_info\nGet detailed information about a specific workflow.\n\nParameters:\n- `workflow_id`: ID of the workflow to get information for\n\n#### create_workflow\nCreate a new workflow.\n\nParameters:\n- `workflow_config`: Dictionary containing the workflow configuration (must include required fields as per CreateWorkflow model). It\n\n#### run_workflow\nRun a specific workflow.\n\nParameters:\n- `workflow_id`: ID of the workflow to run\n\n#### update_workflow\nUpdate an existing workflow.\n\nParameters:\n- `workflow_id`: ID of the workflow to update\n- `workflow_config`:\n    A dictionary containing the updated workflow configuration (must include required fields as per UpdateWorkflow model).\n    More specifically, it's a `CreateWorkflowTypedDict` that one can refer its params [here](https://github.com/Unstructured-IO/unstructured-python-client/blob/main/src/unstructured_client/models/shared/createworkflow.py#L33).\n\n\n#### delete_workflow\nDelete a specific workflow.\n\nParameters:\n- `workflow_id`: ID of the workflow to delete\n\n\n### Jobs\n\n#### list_jobs\n\nLists jobs for a specific workflow from the Unstructured API.\n\nParameters:\n- `workflow_id` (optional): Filter by workflow ID\n- `status` (optional): Filter by job status\n\n#### get_job_info\nGet detailed information about a specific job.\n\nParameters:\n- `job_id`: ID of the job to get information for\n\n#### cancel_job\n\nDelete a specific job.\n\nParameters:\n- `job_id`: ID of the job to cancel\n\n## Claude Desktop Integration\n\nTo install in Claude Desktop:\n\n1. Go to `~/Library/Application Support/Claude/` and create a `claude_desktop_config.json`.\n2. In that file add:\n```bash\n{\n    \"mcpServers\":\n    {\n        \"UNS_MCP\":\n        {\n            \"command\": \"ABSOLUTE/PATH/TO/.local/bin/uv\",\n            \"args\":\n            [\n                \"--directory\",\n                \"ABSOLUTE/PATH/TO/UNS-MCP\",\n                \"run\",\n                \"server.py\"\n            ],\n            \"env\":\n            [\n            \"UNSTRUCTURED_API_KEY\":\"\u003cyour key\u003e\"\n            ],\n            \"disabled\": false\n        }\n    }\n}\n```\n3. Restart Claude Desktop.\n\n4. Example Issues seen from Claude Desktop.\n    - You will see `No destinations found` when you query for a list of destination connectors. Check your API key in `.env` or in your config json, it needs to be your personal key in `https://platform.unstructured.io/app/account/api-keys`.\n\n## Debugging tools\n\nAnthropic provides `MCP Inspector` tool to debug/test your MCP server. Run the following command to spin up a debugging UI. From there, you will be able to add environment variables (pointing to your local env) on the left pane. Include your personal API key there as env var. Go to `tools`, you can test out the capabilities you add to the MCP server.\n```\nmcp dev uns_mcp/server.py\n```\n\n## Running locally minimal client\n```\nuv run python minimal_client/client.py uns_mcp/server.py\n```\n\nor\n\n```\nmake local-client\n```\n\nEnv variables to configure behavior of the client:\n- `LOG_LEVEL=\"ERROR\"` # If you would like to hide outputs from the LLM and present clear messages for the user\n- `CONFIRM_TOOL_USE='false'` If you would like to disable the tool use confirmation before running it (True by default). **BE MINDFUL** about that option, as LLM can decide to purge all data from your account or run some expensive workflows; use only for development purposes.\n\n## Running locally minimal client, accessing local the MCP server over HTTP + SSE\n\nThe main difference here is it becomes easier to set breakpoints on the server side during development -- the client and server are decoupled.\n\n```\n# in one terminal, run the server:\npython uns_mcp/server.py --host 127.0.0.1 --port 8080\n\n# in another terminal, run the client:\npython minimal_client/client.py \"http://127.0.0.1:8080/sse\"\n```\n\nHint: `ctrl+c` out of the client first, then the server. Otherwise the server appears to hang.\n\n## CHANGELOG.md\n\nAny new developed features/fixes/enhancements will be added to CHANGELOG.md. 0.x.x-dev pre-release format is preferred before we bump to a stable version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUnstructured-IO%2FUNS-MCP","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUnstructured-IO%2FUNS-MCP","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUnstructured-IO%2FUNS-MCP/lists"}