Skip to main content
Glama
gokapi-mcp

gokapi-mcp

by arr-mcps

gokapi-mcp

An MCP server exposing Gokapi's REST API as tools for managing file shares, chunked uploads, file requests, API keys, users, and server logs.

Requirements

  • Gokapi with its REST API reachable (tested against 2.2.4)

  • Python 3.11+ and uv for source development

Related MCP server: ResourceSpace MCP Server

Configuration

Variable

Required

Description

GOKAPI_URL

Yes

Gokapi base URL, for example http://10.10.10.25:53842. The server appends /api.

GOKAPI_API_KEY

Yes

API key generated in the Gokapi web UI under "API". Sent as the apikey header.

Register it with Claude Code:

uv tool install gokapi_mcp-*.whl
claude mcp add gokapi \
  --env GOKAPI_URL=http://10.10.10.25:53842 \
  --env GOKAPI_API_KEY=<key> \
  -- gokapi-mcp

For a source checkout:

uv sync
claude mcp add gokapi \
  --env GOKAPI_URL=http://10.10.10.25:53842 \
  --env GOKAPI_API_KEY=<key> \
  -- uv run --directory /path/to/gokapi-mcp gokapi-mcp

Tools

8 resource-scoped tools cover all 36 published Gokapi REST operations via an operation parameter. Call a tool with operation set to one of its listed operations and an arguments dict matching that operation's parameters. Each tool's own description (visible to your MCP client) lists every operation, its signature, and a one-line doc, so no discovery round-trip is needed. This keeps the whole API available while costing a fraction of the context budget of registering 36 endpoints as separate tools.

Tool

Operations

Covers

gokapi_files

9

File listing, metadata, upload, duplicate, modify, delete, restore, replace, change owner

gokapi_chunks

6

Chunked uploads and file-request chunk reserve/complete/unreserve

gokapi_users

5

User create, rank change, delete, permission modify, password reset

gokapi_requests

4

File-request list, get, save, delete

gokapi_auth

4

API-key create, delete, rename, permission grant/revoke

gokapi_logs

4

Server logs, log deletion, traffic reset, system status

gokapi_info

2

Version and upload-parameter config

gokapi_download

2

Single-file and ZIP download (base64 or presigned URL)

Only gokapi_info is marked readOnlyHint=True; every other group contains write operations and carries no hint.

Example:

gokapi_info(operation="gokapi_info_version", arguments={})
gokapi_files(operation="gokapi_files_list", arguments={})
gokapi_files(operation="gokapi_files_get", arguments={"id": "8w4NyybwoHP4ofK"})

Notes on special operations:

  • Gokapi takes API parameters as HTTP headers; unset optional arguments are not sent at all (header presence is significant - e.g. omitting password on modify leaves it unchanged, an empty string clears it).

  • File/chunk uploads take a file_b64 argument containing a base64-encoded file.

  • Binary downloads return base64-encoded strings; pass presign_url=true to get a one-time 30-second download URL as JSON instead.

  • Large files: do not pull multi-GB shares through the MCP return path - use the presigned URL or the share's public download URL. See AGENTS.md.

Development

make sync
make test
make test-integration   # requires GOKAPI_URL and GOKAPI_API_KEY (read-only GETs)
make build

The offline tests use httpx.MockTransport; integration tests are skipped by default.

Available Tools

8 tools
gokapi_authGokapi AuthA

gokapi auth operations on Gokapi. Pass operation and an arguments dict matching that operation's parameters.

  • gokapi_auth_create(friendly_name=None, basic_permissions=None) - Create a new API key (POST /api/auth/create). Returns the new key - store it immediately, it cannot be retrieved again.

  • gokapi_auth_delete(target_key) - Delete an API key (DELETE /api/auth/delete). target_key is the key's public ID or the key itself.

  • gokapi_auth_friendlyname(target_key, friendly_name) - Rename an API key (PUT /api/auth/friendlyname).

  • gokapi_auth_modify(target_key, permission, permission_modifier) - Grant/revoke one API-key permission (PUT /api/auth/modify). permission is one of PERM_VIEW, PERM_UPLOAD, PERM_DELETE, PERM_API_MOD, PERM_EDIT, PERM_REPLACE, PERM_MANAGE_USERS, PERM_MANAGE_LOGS, PERM_MANAGE_FILE_REQUESTS, PERM_DOWNLOAD; permission_modifier is GRANT or REVOKE.

Inputs: operation (required), arguments. Returns: result

gokapi_chunksGokapi ChunksA

gokapi chunks operations on Gokapi. Pass operation and an arguments dict matching that operation's parameters.

  • gokapi_chunk_add(file_b64, uuid, filesize, offset) - Upload one chunk (POST /api/chunk/add, multipart). uuid (>=10 chars) must be identical for all chunks of one file; offset is the chunk's byte offset. The file chunk is a base64 string.

  • gokapi_chunk_complete(uuid, filename, filesize, contenttype=None, allowed_downloads=None, expiry_days=None, password=None, nonblocking=None) - Finalise uploaded chunks into a file (POST /api/chunk/complete). allowed_downloads defaults to 1 (0 = unlimited), expiry_days defaults to 14 (0 = unlimited). nonblocking=true returns before processing finishes.

  • gokapi_urequest_chunk_add(file_b64, file_request_id, uuid, filesize, offset) - Upload one chunk for a file request (POST /api/uploadrequest/chunk/add, multipart). The file chunk is a base64 string.

  • gokapi_urequest_chunk_complete(uuid, file_request_id, filename, filesize, contenttype=None, nonblocking=None) - Finalise uploaded chunks for a file request (POST /api/uploadrequest/chunk/complete).

  • gokapi_urequest_chunk_reserve(id) - Reserve a UUID for a new file-request upload (POST /api/uploadrequest/chunk/reserve).

  • gokapi_urequest_chunk_unreserve(id, uuid) - Free a reserved UUID after a cancelled upload (POST /api/uploadrequest/chunk/unreserve).

Inputs: operation (required), arguments. Returns: result

gokapi_downloadGokapi DownloadB

gokapi download operations on Gokapi. Pass operation and an arguments dict matching that operation's parameters.

  • gokapi_download_file(id, increase_counter=None, presign_url=None) - Download a file (GET /api/files/download/{id}). Returns base64-encoded bytes. Set presign_url=true to get a one-time 30s download URL (returned as JSON) instead of the file content.

  • gokapi_download_zip(ids, filename=None, increase_counter=None, presign_url=None, is_file_request_id=None) - Download files as a ZIP (GET /api/files/downloadzip). ids is a comma- separated list of file IDs. Returns base64-encoded bytes unless presign_url=true (one-time 30s URL as JSON). Set is_file_request_id=true to pass a file request ID and zip all its files.

Inputs: operation (required), arguments. Returns: result

gokapi_filesGokapi FilesA

gokapi files operations on Gokapi. Pass operation and an arguments dict matching that operation's parameters.

  • gokapi_files_add(file_b64, filename, allowed_downloads=None, expiry_days=None, password=None) - Upload a file without chunking (POST /api/files/add, multipart). The file is a base64 string. allowed_downloads defaults to 1 (0 = unlimited), expiry_days defaults to 14 (0 = unlimited).

  • gokapi_files_change_owner(id, new_owner) - Change a file's owner (PUT /api/files/changeOwner, admin only). new_owner is the target user ID.

  • gokapi_files_delete(id, delay=None) - Delete a file (DELETE /api/files/delete). delay waits N seconds before deleting so the file can still be restored.

  • gokapi_files_duplicate(id, allowed_downloads=None, expiry_days=None, password=None, original_password=None, filename=None) - Duplicate a file (POST /api/files/duplicate). Returns the new file object. Set original_password=true to keep the source password.

  • gokapi_files_get(id) - Get file metadata by ID (GET /api/files/list/{id}).

  • gokapi_files_list(show_file_requests=None) - List all files (GET /api/files/list). Set show_file_requests to include files uploaded through file requests.

  • gokapi_files_modify(id, allowed_downloads=None, expiry_timestamp=None, password=None, original_password=None) - Change parameters of an uploaded file (PUT /api/files/modify). allowed_downloads 0 = unlimited; expiry_timestamp 0 (unix) = no expiry; omit password to leave it unchanged, pass empty string to remove it.

  • gokapi_files_replace(id, id_new_content, delete_new_file=None) - Replace a file's content with another uploaded file (PUT /api/files/replace). Set delete_new_file=true to delete the source file afterwards.

  • gokapi_files_restore(id) - Restore a file pending deletion (POST /api/files/restore).

Inputs: operation (required), arguments. Returns: result

gokapi_infoGokapi InfoA
Read-only

gokapi info operations on Gokapi. Pass operation and an arguments dict matching that operation's parameters.

  • gokapi_info_config() - Get upload parameters: max file/chunk sizes, E2E flag (GET /api/info/config).

  • gokapi_info_version() - Get Gokapi version (GET /api/info/version).

Inputs: operation (required), arguments. Returns: result

gokapi_logsGokapi LogsA

gokapi logs operations on Gokapi. Pass operation and an arguments dict matching that operation's parameters.

  • gokapi_logs_delete(timestamp=None) - Delete log entries (DELETE /api/logs/delete, admin only). timestamp is the cutoff unix epoch - older entries are deleted; omit to delete all.

  • gokapi_logs_get(timestamp=None) - Get server logs (GET /api/logs/get). timestamp optionally filters to entries newer than a unix epoch.

  • gokapi_logs_resettraffic() - Reset the traffic statistic (DELETE /api/logs/resetTraffic, admin only).

  • gokapi_logs_systemstatus() - Get server status information (GET /api/logs/systemStatus).

Inputs: operation (required), arguments. Returns: result

gokapi_requestsGokapi RequestsA

gokapi requests operations on Gokapi. Pass operation and an arguments dict matching that operation's parameters.

  • gokapi_urequest_delete(id) - Delete an upload request and all its files (DELETE /api/uploadrequest/delete).

  • gokapi_urequest_get(id) - Get a file request by ID (GET /api/uploadrequest/list/{id}).

  • gokapi_urequest_list() - List all file requests (GET /api/uploadrequest/list).

  • gokapi_urequest_save(id=None, name=None, notes=None, expiry=None, maxfiles=None, maxsize=None) - Create or update a file request (POST /api/uploadrequest/save). Omit id to create a new request. expiry is a UTC unix timestamp (0 = none); maxfiles 0 = unlimited count; maxsize is MB per file (0 = unlimited).

Inputs: operation (required), arguments. Returns: result

gokapi_usersGokapi UsersA

gokapi users operations on Gokapi. Pass operation and an arguments dict matching that operation's parameters.

  • gokapi_user_changerank(userid, new_rank) - Change a user's rank (PUT /api/user/changeRank). new_rank is admin or user.

  • gokapi_user_create(username) - Create a new user (POST /api/user/create). Returns the new user including its generated password.

  • gokapi_user_delete(userid, delete_files=None) - Delete a user (DELETE /api/user/delete). Set delete_files=true to also delete all their uploads.

  • gokapi_user_modify(userid, userpermission, permission_modifier) - Grant/revoke one user permission (PUT /api/user/modify). userpermission is one of PERM_REPLACE, PERM_LIST, PERM_EDIT, PERM_REPLACE_OTHER, PERM_DELETE, PERM_LOGS, PERM_API, PERM_USERS, PERM_GUEST_UPLOAD; permission_modifier is GRANT or REVOKE.

  • gokapi_user_resetpassword(userid, generate_new_password=None) - Reset a user's password (PUT /api/user/resetPassword). Returns the new password.

Inputs: operation (required), arguments. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 8 tools

    Disambiguation4/5

    The eight top-level tools are grouped by clear domains: info, files, download, chunks, requests, auth, users, and logs. There is minor overlap around chunked uploads versus file-request management, and file-request chunk operations live under chunks while file-request CRUD lives under requests, but the descriptions make the split understandable.

    Naming Consistency4/5

    All top-level tools consistently use the `gokapi_` prefix plus a lowercase snake_case domain name. The only minor deviation is that most names are resource nouns while `gokapi_download` is action-oriented, and some underlying operations use singular/plural or abbreviated forms like `chunk` and `urequest`.

    Tool Count5/5

    Eight top-level tools is well-scoped for covering the Gokapi API surface without excessive fragmentation. Each domain group earns its place, and the multiplexed operation pattern keeps the exposed tool count manageable.

    Completeness5/5

    The surface covers the major Gokapi resources: info, file CRUD and metadata, downloads, chunked uploads, file requests, API-key auth, users, and logs. The operations appear to map to the relevant API endpoints, with no obvious dead-end lifecycle gaps.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Exposes the OpenProject REST API as MCP tools for project management, including creating and managing projects, work packages, relations, attachments, users, notifications, watchers, boards, and reference data.
      37
      -
    • A
      license
      C
      quality
      C
      maintenance
      Exposes every operation in the ConnectSecure OpenAPI specification as an MCP tool, enabling vulnerability management, assets, assessments, integrations, and reporting.
      359
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables managing NetBird network resources through the NetBird REST API, exposing tools for peers, groups, policies, routes, DNS, users, and related operations via MCP.
      MIT