GitHub MCP Server Plus

create_or_update_file

Create or update a single file in a GitHub repository

Input Schema

NameRequiredDescriptionDefault
branchYesBranch to create/update the file in
contentYesContent of the file
messageYesCommit message
ownerYesRepository owner (username or organization)
pathYesPath where to create/update the file
repoYesRepository name
shaNoSHA of the file being replaced (required when updating existing files)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "branch": { "description": "Branch to create/update the file in", "type": "string" }, "content": { "description": "Content of the file", "type": "string" }, "message": { "description": "Commit message", "type": "string" }, "owner": { "description": "Repository owner (username or organization)", "type": "string" }, "path": { "description": "Path where to create/update the file", "type": "string" }, "repo": { "description": "Repository name", "type": "string" }, "sha": { "description": "SHA of the file being replaced (required when updating existing files)", "type": "string" } }, "required": [ "owner", "repo", "path", "content", "message", "branch" ], "type": "object" }