Skip to main content
Glama

PsyFlow-MCP

by TaskBeacon

PsyFlow‑MCP · Usage Guide

A lightweight FastMCP server that lets a language‑model clone, transform, download and local‑translate PsyFlow task templates using a single entry‑point tool.


1 · Install & Run

# 1. Clone your project repository git clone https://github.com/TaskBeacon/psyflow-mcp.git cd psyflow_mcp # 2. Install runtime deps pip install "mcp-sdk[fastmcp]" gitpython httpx ruamel.yaml # 3. Launch the std‑IO server python main.py

The process stays in the foreground and communicates with the LLM over STDIN/STDOUT via the Model‑Context‑Protocol (MCP).


2 · Conceptual Workflow

  1. User describes the task they want (e.g. “Make a Stroop out of Flanker”).
  2. LLM calls the tool:\ • If the model already knows the best starting template it passes `source_task`.\ • Otherwise it omits `source_task`, receives a menu created by, picks a repo, then calls `` again with that repo.
  3. The server clones the chosen template, returns a Stage 0→5 instruction prompt (``) plus the local template path.
  4. The LLM edits files locally, optionally invokes `` to localise config.yaml, then zips / commits the new task.

3 · Exposed Tools

ToolArgumentsPurpose / Return
build_tasktarget_task:str, source_task?:strMain entry‑point. • With source_task → clones repo and returns: prompt (Stage 0→5) + template_path (local clone). • Without source_task → returns prompt_messages from `` so the LLM can pick the best starting template, then call build_task again.
list_tasksnoneReturns an array of objects: { repo, readme_snippet, branches }, where branches lists up to 20 branch names for that repo.
download_taskrepo:strClones any template repo from the registry and returns its local path.
translate_configtask_path:str, target_language:strReads config.yaml, wraps it in ``, and returns prompt_messages so the LLM can translate YAML fields in‑place.

Why a single entry‑point?  build_task already covers both “discover a template” and “explicitly transform template X into Y”. Separate transform_task became redundant, so it has been removed.


4 · Exposed Prompts

PromptParametersDescription
transform_promptsource_task, target_taskSingle User message containing the full Stage 0→5 instructions to convert source_task into target_task.
choose_template_promptdesc, candidates:list[{repo,readme_snippet}]Three User messages: task description, template list, and selection criteria. The LLM must reply with one repo name or the literal word NONE.
translate_config_promptyaml_text, target_languageTwo‑message sequence: strict translation instruction + raw YAML. The LLM must return the fully‑translated YAML body with formatting preserved and no commentary.

5 · Typical Call‑and‑Response

5.1 – Template Discovery

{ "tool": "build_task", "arguments": { "target_task": "Stroop" } }

Server → returns prompt_messages .

5.2 – LLM Chooses Template & Requests Build

{ "tool": "build_task", "arguments": { "target_task": "Stroop", "source_task": "Flanker" } }

Server → returns Stage 0→5 prompt + template_path (cloned Flanker repo).

5.3 – Translating YAML (Optional)

{ "tool": "translate_config", "arguments": { "task_path": "/abs/path/Flanker", "target_language": "zh" } }

Server → returns prompt_messages; LLM translates YAML and writes it back.


6 · Template Folder Layout

<repo>/ ├─ config/ │  └─ config.yaml ├─ main.py ├─ src/ │  └─ run_trial.py └─ README.md

Stage 0→5 assumes this structure.


Adjust NON_TASK_REPOS, network timeouts, or git clone depth to match your infrastructure.

-
security - not tested
F
license - not found
-
quality - not tested

A lightweight FastMCP server that enables language models to discover, clone, transform, and localize PsyFlow task templates through a streamlined workflow with standardized tools.

  1. 1 · Install & Run
    1. 2 · Conceptual Workflow
      1. 3 · Exposed Tools
        1. 4 · Exposed Prompts
          1. 5 · Typical Call‑and‑Response
            1. 5.1 – Template Discovery
            2. 5.2 – LLM Chooses Template & Requests Build
            3. 5.3 – Translating YAML (Optional)
          2. 6 · Template Folder Layout

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              FastMCP is a comprehensive MCP server allowing secure and standardized data and functionality exposure to LLM applications, offering resources, tools, and prompt management for efficient LLM interactions.
              Last updated -
              3
              Python
              MIT License
            • -
              security
              A
              license
              -
              quality
              A high-performance FastAPI server supporting Model Context Protocol (MCP) for seamless integration with Large Language Models, featuring REST, GraphQL, and WebSocket APIs, along with real-time monitoring and vector search capabilities.
              Last updated -
              9
              Python
              MIT License
            • -
              security
              F
              license
              -
              quality
              A production-ready MCP server built with FastAPI, providing an enhanced tool registry for creating, managing, and documenting AI tools for Large Language Models (LLMs).
              Last updated -
              32
              Python
            • -
              security
              F
              license
              -
              quality
              A FastMCP server that enables browser automation through natural language commands, allowing Language Models to browse the web, fill out forms, click buttons, and perform other web-based tasks via a simple API.
              Last updated -
              2
              Python

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/TaskBeacon/psyflow-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server