{"id":30872366,"url":"https://github.com/HumanSignal/label-studio-mcp-server","last_synced_at":"2025-09-07T22:32:14.868Z","repository":{"id":290851821,"uuid":"972738009","full_name":"HumanSignal/label-studio-mcp-server","owner":"HumanSignal","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-30T10:03:53.000Z","size":257,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-16T07:11:14.772Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HumanSignal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-04-25T15:19:31.000Z","updated_at":"2025-06-13T23:06:17.000Z","dependencies_parsed_at":"2025-04-30T23:19:50.136Z","dependency_job_id":"604f7023-0669-485d-ae9d-821ae22ee81f","html_url":"https://github.com/HumanSignal/label-studio-mcp-server","commit_stats":null,"previous_names":["humansignal/label-studio-mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HumanSignal/label-studio-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanSignal%2Flabel-studio-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanSignal%2Flabel-studio-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanSignal%2Flabel-studio-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanSignal%2Flabel-studio-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HumanSignal","download_url":"https://codeload.github.com/HumanSignal/label-studio-mcp-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanSignal%2Flabel-studio-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274106930,"owners_count":25223441,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-09-07T22:06:17.961Z","updated_at":"2025-09-07T22:32:14.847Z","avatar_url":"https://github.com/HumanSignal.png","language":"Python","funding_links":[],"categories":["Data \u0026 Analytics","پیاده‌سازی‌های سرور","📦 Other","Data Analysis \u0026 Exploration Mcp Servers"],"sub_categories":["AI/ML Platforms","🧮 \u003ca name=\"data-science-tools\"\u003e\u003c/a\u003eابزارهای علم داده"],"readme":"# Label Studio MCP Server\n\n## Overview\n\nThis project provides a Model Context Protocol (MCP) server that allows interaction with a [Label Studio](https://labelstud.io/) instance using the `label-studio-sdk`. It enables programmatic management of labeling projects, tasks, and predictions via natural language or structured calls from MCP clients. Using this MCP Server, you can make requests like: \n\n* \"Create a project in label studio with this data ...\" \n* \"How many tasks are labeled in my RAG review project?\" \n* \"Add predictions for my tasks.\" \n* \"Update my labeling template to include a comment box.\" \n\n\u003cimg src=\"./static/example.png\" alt=\"Example usage of Label Studio MCP Server\" width=\"600\"\u003e\n\n## Features\n\n*   **Project Management**: Create, update, list, and view details/configurations of Label Studio projects.\n*   **Task Management**: Import tasks from files, list tasks within projects, and retrieve task data/annotations.\n*   **Prediction Integration**: Add model predictions to specific tasks.\n*   **SDK Integration**: Leverages the official `label-studio-sdk` for communication.\n\n## Prerequisites\n\n1.  **Running Label Studio Instance:** You need a running instance of Label Studio accessible from where this MCP server will run.\n2.  **API Key:** Obtain an API key from your user account settings in Label Studio.\n\n## Configuration\n\nThe MCP server requires [the URL and API key for your Label Studio instance](https://labelstud.io/guide/access_tokens). If launching the server via an MCP client configuration file, you can specify the environment variables directly within the server definition. This is often preferred for client-managed servers.\n\nAdd the following JSON entry to your `claude_desktop_config.json` file or Cursor MCP settings:\n\n```json\n{\n    \"mcpServers\": {\n        \"label-studio\": {\n            \"command\": \"uvx\",\n            \"args\": [\n                \"--from\",\n                \"git+https://github.com/HumanSignal/label-studio-mcp-server\",\n                \"mcp-label-studio\"\n            ],\n            \"env\": {\n                \"LABEL_STUDIO_API_KEY\": \"your_actual_api_key_here\", // \u003c-- Your API key\n                \"LABEL_STUDIO_URL\": \"http://localhost:8080\"\n            }\n        }\n    }\n}\n```\n\u003c!-- \n## Installation\nFollow these instructions to install the server. \n```bash\ngit clone https://github.com/HumanSignal/label-studio-mcp-server.git \ncd label-studio-mcp-server\n\n# Install dependencies using uv\nuv venv\nsource .venv/bin/activate \nuv sync\n```\n\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"label-studio\": {\n            \"command\": \"uv\",\n            \"args\": [\n                \"--directory\",\n                \"/path/to/your/label-studio-mcp-server\", // \u003c-- Update this path\n                \"run\",\n                \"label-studio-mcp.py\"\n            ],\n            \"env\": {\n                \"LABEL_STUDIO_API_KEY\": \"your_actual_api_key_here\", // \u003c-- Your API key\n                \"LABEL_STUDIO_URL\": \"http://localhost:8080\"\n            }\n        }\n      }\n    }\n    ```\n    When configured this way, the `env` block injects the variables into the server process environment, and the script's `os.getenv()` calls will pick them up. --\u003e\n\n## Tools\n\nThe MCP server exposes the following tools:\n\n### Project Management\n\n*   **`get_label_studio_projects_tool()`**: Lists available projects (ID, title, task count).\n*   **`get_label_studio_project_details_tool(project_id: int)`**: Retrieves detailed information for a specific project.\n*   **`get_label_studio_project_config_tool(project_id: int)`**: Fetches the XML labeling configuration for a project.\n*   **`create_label_studio_project_tool(title: str, label_config: str, ...)`**: Creates a new project with a title, XML config, and optional settings. Returns project details including a URL.\n*   **`update_label_studio_project_config_tool(project_id: int, new_label_config: str)`**: Updates the XML labeling configuration for an existing project.\n\n### Task Management\n\n*   **`list_label_studio_project_tasks_tool(project_id: int)`**: Lists task IDs within a project (up to 100).\n*   **`get_label_studio_task_data_tool(project_id: int, task_id: int)`**: Retrieves the data payload for a specific task.\n*   **`get_label_studio_task_annotations_tool(project_id: int, task_id: int)`**: Fetches existing annotations for a specific task.\n*   **`import_label_studio_project_tasks_tool(project_id: int, tasks_file_path: str)`**: Imports tasks from a JSON file (containing a list of task objects) into a project. Returns import summary and project URL.\n\n### Predictions\n\n*   **`create_label_studio_prediction_tool(task_id: int, result: List[Dict[str, Any]], ...)`**: Creates a prediction for a specific task. Requires the prediction result as a list of dictionaries matching the Label Studio format. Optional `model_version` and `score`.\n\n## Example Use Case\n\n1.  Create a new project using `create_label_studio_project_tool`.\n2.  Prepare a JSON file (`tasks.json`) with task data.\n3.  Import tasks using `import_label_studio_project_tasks_tool`, providing the project ID from step 1 and the path to `tasks.json`.\n4.  List task IDs using `list_label_studio_project_tasks_tool`.\n5.  Get data for a specific task using `get_label_studio_task_data_tool`.\n6.  Generate a prediction result structure (list of dicts).\n7.  Add the prediction using `create_label_studio_prediction_tool`.\n\n\n\n## Contact\n\nFor questions or support, reach out via [GitHub Issues](https://github.com/HumanSignal/label-studio-mcp-server/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHumanSignal%2Flabel-studio-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHumanSignal%2Flabel-studio-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHumanSignal%2Flabel-studio-mcp-server/lists"}