OSF CLI Go

io.github.edithatogo由 GitHub 账号 edithatogo 发布v0.3.2更新于 Oct 24, 2026

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

已验证STDIO仅桌面文件与存储知识与记忆

概览

AI 生成的概览

一个本地 stdio MCP 服务器,提供只读工具,用于访问需认证的 Open Science Framework 项目、文件、预印本和 DOI 查询。

可以做什么
识别当前认证的 OSF 账户,列出或查看项目及其组件,包括贡献者和 OSF Storage 文件(仅列出)。检索 OSF 文献和预印本,结果数量有上限,返回含 ID、标题、摘要、关键词、年份和链接的结构化 JSON。解析 OSF DOI 指向的目标地址。所有对外暴露的工具均为只读,不会执行写入操作。
适用场景
适合助手在研究或文献综述过程中直接查询 OSF 项目、组件、贡献者、文件、预印本或 DOI 目标,无需离开对话。不适用于上传、删除或创建 OSF 内容,因为 MCP 工具是只读的。
运行要求
以 stdio 本地进程运行,以 OCI 镜像分发;若从源码构建,底层 CLI 需要 Go 1.26 或更高版本。需要 OSF 账户凭据:首选 OSF_TOKEN,OSF_USERNAME 和 OSF_PASSWORD 为可选后备。需要能访问 OSF API 的网络连接。
安装前请注意
需要 OSF 个人访问令牌或账户凭据;请勿将令牌写入项目文件或提交到仓库。用户名/密码后备方式不适合自动化,也不适合使用 SSO 或双重验证的账户。MCP 工具为只读,但配套 CLI 可上传、删除、创建注册和修改项目,应限制助手可执行的命令范围。

安装

在 SourceWeft 中

  1. 打开 控制台中的 OSF CLI Go,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

osf-cli-go

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

[CI] [Lint] [Security] [Go Reference] [License] [Go Version] [Release] [OSF CLI Go MCP server]

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
powershell
go install github.com/edithatogo/osf-cli-go/cmd/osf@latestgo install github.com/edithatogo/osf-cli-go/cmd/osf-mcp@latest

Or from a local checkout:

powershell
go build -o bin\osf.exe ./cmd/osfgo 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.

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

For guided token setup:

powershell
osf auth login

Quick Start

powershell
osf --helposf auth whoamiosf projects listosf projects get https://osf.io/abc12/osf components list abc12osf files list abc12osf files download --file <file-id> ./output/osf files download --tree abc12 ./output/osf files upload --node abc12 ./report.pdfosf search "open science"osf search "open science" --bibtexosf preprints listosf preprints search "open science" --provider osfosf resolve 10.1234/exampleosf 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/.

Related MCP Servers

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:

powershell
osf projects list --jsonosf 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.

来源:README.md,提交 61627db

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分