OSF CLI Go

Registre officiel Autres

Read-only MCP tools for authenticated Open Science Framework projects and files.

Que pouvez-vous faire avec OSF CLI Go ?

  • osf auth whoami — Identify the authenticated OSF account
  • osf auth login — Guided personal-access-token bootstrap for username/password users
  • osf projects list|get — List and inspect projects
  • osf components list — List project components
  • osf files list|download|upload|mkdir|rm — Browse, download, upload, create folders, and delete OSF Storage files
  • osf search, osf search --bibtex, osf preprints list|search, and osf resolve — Search/export OSF literature metadata, discover preprints, and resolve OSF DOI destinations
  • osf registrations create — Create draft registrations for an existing node
  • osf export — Export a node snapshot as JSON or a summary table

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

OCI package ghcr.io/edithatogo/osf-cli-go-osf-mcp:0.3.2
Claude Code
claude mcp add osf-cli-go -e 'OSF_TOKEN=<your osf_token>' -e 'OSF_USERNAME=<your osf_username>' -e 'OSF_PASSWORD=<your osf_password>' -- docker run -i --rm ghcr.io/edithatogo/osf-cli-go-osf-mcp:0.3.2
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "osf-cli-go": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/edithatogo/osf-cli-go-osf-mcp:0.3.2"
            ],
            "env": {
                "OSF_TOKEN": "<your osf_token>",
                "OSF_USERNAME": "<your osf_username>",
                "OSF_PASSWORD": "<your osf_password>"
            }
        }
    }
}

Variables d'environnement

  • OSF_TOKEN secret Preferred OSF personal access token.
  • OSF_USERNAME secret Optional OSF username fallback when OSF_TOKEN is not provided.
  • OSF_PASSWORD secret Optional OSF password fallback when OSF_TOKEN is not provided.

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. osf-cli-go
  2. Features
  3. Install
  4. Authentication
  5. Quick Start
  6. MCP Server
  7. Output Modes
  8. Project Status
  9. Documentation
  10. License
  11. Citation

osf-cli-go

A Go command-line client for the Open Science Framework (OSF).

Features

  • osf auth whoami — Identify the authenticated OSF account
  • osf auth login — Guided personal-access-token bootstrap for username/password users
  • osf projects list|get — List and inspect projects
  • osf components list — List project components
  • osf files list|download|upload|mkdir|rm — Browse, download, upload, create folders, and delete OSF Storage files
  • osf search, osf search --bibtex, osf preprints list|search, and osf resolve — Search/export OSF literature metadata, discover preprints, and resolve OSF DOI destinations
  • osf registrations create — Create draft registrations for an existing node
  • osf export — Export a node snapshot as JSON or a summary table
  • osf validate — Check OSF node metadata with deterministic research-output or preregistration profiles
  • osf-mcp — Stdio MCP server exposing read-only OSF tools for agent clients
  • osf completion bash|zsh|fish|powershell — Shell completion scripts
  • JSON and human-readable output modes
  • Safe, atomic file downloads with conflict policy (fail/skip/overwrite)

Install

Requirements:

  • Go 1.26 or newer
go install github.com/edithatogo/osf-cli-go/cmd/osf@latest
go install github.com/edithatogo/osf-cli-go/cmd/osf-mcp@latest

Or from a local checkout:

go build -o bin\osf.exe ./cmd/osf
go build -o bin\osf-mcp.exe ./cmd/osf-mcp
.\scripts\build.ps1

Authentication

Set OSF_TOKEN in your shell session. Do not commit the token or write it into project files. OSF_USERNAME and OSF_PASSWORD are supported as an opt-in fallback credential source, but personal access tokens remain preferred for automation and for accounts using SSO or two-factor authentication.

$env:OSF_TOKEN = '<your-token>'

For guided token setup:

osf auth login

Quick Start

osf --help
osf auth whoami
osf projects list
osf projects get https://osf.io/abc12/
osf components list abc12
osf files list abc12
osf files download --file <file-id> ./output/
osf files download --tree abc12 ./output/
osf files upload --node abc12 ./report.pdf
osf search "open science"
osf search "open science" --bibtex
osf preprints list
osf preprints search "open science" --provider osf
osf resolve 10.1234/example
osf registrations create abc12 --schema <schema-id> --title "Analysis plan"
osf export abc12 --json

MCP Server

osf-mcp runs a stdio MCP server with read-only tools: osf_whoami, osf_projects_list, osf_project_get, osf_components_list, osf_files_list, osf_contributors_list, osf_search, osf_preprints_list, osf_preprints_search, and osf_doi_resolve.

The parity discovery tools are bounded and deterministic: osf_search requires a non-empty query and accepts a limit from 1 to 100, while osf_preprints_list accepts an optional provider and the same bounded limit. osf_preprints_search requires a title query, accepts an optional provider, and returns publication date, published state, DOI, and OSF HTML URL with a limit from 1 to 100. These tools return structured JSON through the MCP server and never perform writes.

OSF search results include stable IDs, title, abstract, keywords, year, and URL. Use osf search <query> --bibtex to emit deterministic BibTeX records for literature-review workflows. The command does not resolve contributor names or download PDFs automatically.

For DataLad workflows, OSF CLI Go provides the general-purpose OSF API and safe file primitives used around a dataset, including osf export and osf files download --tree. It does not install or configure DataLad, Git remotes, or git-annex special remotes; those integrations remain a separately scoped interoperability boundary.

Local development configs are included for GitHub Copilot, VS Code, Claude, Codex, Gemini CLI, and Qwen Code. Public registry metadata is in server.json and registry/.

Other maintained servers in the same Glama portfolio:

  • FYI MCP for freedom-of-information request workflows.
  • Healthpoint MCP for licensed health-service directory data.
  • SourceRight for reference and citation verification.

Related OSF ecosystem servers:

Output Modes

All commands support --output table|json and --json shorthand:

osf projects list --json
osf auth whoami --output json

Project Status

The CLI is offline-tested for read-only operations, file downloads, WaterButler write primitives, search, preprint listing, draft registration creation, project create/update/delete operations, and node export. All Conductor tracks are reconciled against their per-track plans with closeout review evidence; live OSF validation remains opt-in because it requires credentials and network access.

Documentation

License

Apache 2.0 — see LICENSE.

Citation

If you use this software in your research, please cite it using the metadata in CITATION.cff.

Questions fréquentes

Qu'est-ce que OSF CLI Go ?

Read-only MCP tools for authenticated Open Science Framework projects and files.

Comment installer OSF CLI Go ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add osf-cli-go -e 'OSF_TOKEN=<your osf_token>' -e 'OSF_USERNAME=<your osf_username>' -e 'OSF_PASSWORD=<your osf_password>' -- docker run -i --rm ghcr.io/edithatogo/osf-cli-go-osf-mcp:0.3.2. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour OSF CLI Go ?

Oui. Il attend OSF_TOKEN, OSF_USERNAME, OSF_PASSWORD, à renseigner dans sa configuration.

OSF CLI Go est-il open source ?

Oui. Son code est sur GitHub sous licence Apache-2.0.

Qui maintient OSF CLI Go ?

Il est publié par edithatogo. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.