HumanSignal/label-studio-mcp-server
If you are the rightful owner of label-studio-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Label Studio MCP Server allows interaction with a Label Studio instance using the label-studio-sdk, enabling programmatic management of labeling projects, tasks, and predictions.
Tools
Functions exposed to the LLM to take actions
get_label_studio_projects_tool
Lists available Label Studio projects (Tool version).
get_label_studio_project_details_tool
Provides details for a specific Label Studio project (Tool version).
get_label_studio_project_config_tool
Provides the XML labeling configuration for a Label Studio project (Tool version).
list_label_studio_project_tasks_tool
Lists tasks within a specific Label Studio project (Tool version). Fetches up to 50 tasks. Note: This retrieves basic task info (ID and data keys) for brevity.
get_label_studio_task_data_tool
Provides the data payload for a specific Label Studio task (Tool version).
get_label_studio_task_annotations_tool
Provides annotations for a specific Label Studio task (Tool version).
create_label_studio_project_tool
Creates a new Label Studio project using the SDK (Tool version). Returns JSON including the project details and a direct link to the project's data manager view.
Args: title (str): The title for the new project. REQUIRED. label_config (str): The XML string defining the labeling interface. REQUIRED. description (str | None): Optional description for the project. expert_instruction (str | None): Optional instructions for labelers. # ... add descriptions for other parameters ...
IMPORTANT Call Guidance:
- For optional string parameters (like 'description', 'expert_instruction', 'color'):
If you do not want to provide a value, omit the parameter entirely from your call.
Do not pass
null
or an empty string""
unless you specifically intend for that value.
Reference: https://github.com/HumanSignal/label-studio-sdk?tab=readme-ov-file#create-a-new-project https://api.labelstud.io/api-reference/api-reference/projects/create
update_label_studio_project_config_tool
Updates the labeling configuration for a specific Label Studio project.
Args: project_id (int): The ID of the project to update. new_label_config (str): The complete new XML labeling configuration string. This will replace the existing configuration.
Returns: JSON string containing the details of the updated project, including the new label config and a link to the project URL.
Reference: Uses ls.projects.update from the SDK v1.0+ (assumed based on PATCH API endpoint).
import_label_studio_project_tasks_tool
Imports tasks into a specific Label Studio project from a JSON file. Returns JSON including the import summary and a direct link to the project's data manager view.
Args: project_id (int): The ID of the target Label Studio project. tasks_file_path (str): The path (relative to workspace or absolute) to a JSON file containing the tasks to import. The file MUST contain a valid JSON array (list) of task data dictionaries.
Example file content (e.g., tasks.json): [ {"data": {"text": "Sentence 1"}}, {"data": {"text": "Sentence 2"}} ]
Reference: Uses ls.projects.import_tasks from the SDK v1.0+. https://api.labelstud.io/api-reference/introduction/getting-started
create_label_studio_prediction_tool
Creates a prediction for a specific Label Studio task.
Args: task_id (int): The ID of the task to add the prediction to. result (List[Dict[str, Any]]): The prediction result list, containing dictionaries matching the Label Studio prediction format. Example: [{"from_name": "label", "to_name": "text", "type": "choices", "value": {"choices": ["Positive"]}}] model_version (str, optional): String identifying the model version. score (float, optional): Confidence score for the prediction (0.0 to 1.0).
Returns: JSON string containing the details of the created prediction.
Reference: Uses ls.predictions.create based on API endpoint /api/predictions/ https://api.labelstud.io/api-reference/api-reference/predictions/create
Prompts
Interactive templates invoked by user choice
No prompts
Resources
Contextual data attached and managed by the client