
platform
com.apigit/platform
Read APIGit repositories, OpenAPI files, pull requests, docs and mock servers; lint local specs.
Documentation
APIGit for CI and coding agents
The GitHub Action, the Agent Skill, the Claude Code plugin and the MCP server entry for APIGit, the Git-native platform for API design, documentation and mock servers.
Everything here runs the @apigit/cli package from npm: lint, score and
bundle OpenAPI files, and publish API documents and mock servers from your APIGit repositories. The CLI's
documentation is at apigit.com/doc/cli.
GitHub Action
- uses: actions/checkout@v4
- uses: apigitlabs/apigit-action@v1
with:
run: lint openapi.yaml --format github-actions
--format github-actions writes the findings as annotations on the pull request's files. Publishing needs an
APIGit "CLI and automation" access token (APIGit, Settings, Access Tokens):
- uses: apigitlabs/apigit-action@v1
with:
run: doc publish --version ${{ github.ref_name }} --commit ${{ github.sha }} --access public
token: ${{ secrets.APIGIT_TOKEN }}
| Input | What it is |
|---|---|
run | Required. The arguments after apigit, for example lint openapi.yaml --format github-actions or score openapi.yaml --min 80 |
version | The version of @apigit/cli to run (default latest; pin one, such as 0.9.0, for repeatable builds) |
token | An APIGit access token, only for the doc, mock, plan and api commands |
region | us (default) or eu, the APIGit region of your account |
host | An APIGit host that is not one of the two regions |
The step fails with the CLI's exit code: 1 when a check fails (lint findings at the chosen severity, a score below
--min), 2 to 7 for the other errors listed in the CLI's documentation. To publish without storing a token, sign in
with GitHub's identity token instead: see "GitHub Actions without a stored secret" in the
CLI documentation.
Agent Skill
skills/apigit-cli/SKILL.md teaches a coding agent to use the apigit CLI: when to lint, score or bundle, how to
publish safely (dry run first, never print a token), and what each exit code means. Copy the skills/apigit-cli
folder into your agent's skills folder (for Claude Code, .claude/skills/ in a project or ~/.claude/skills/), or
install the plugin below.
Claude Code plugin
The plugin brings the Skill and the MCP server together:
claude plugin marketplace add apigitlabs/apigit-action
claude plugin install apigit@apigit-marketplace
MCP server
apigit mcp gives an agent local tools for OpenAPI files (lint, bundle, outline) and read-only tools over your APIGit
repositories, published documents and mock servers. Add it to any MCP client:
{
"mcpServers": {
"apigit": { "command": "npx", "args": ["-y", "@apigit/cli", "mcp"] }
}
}
Sign in once with npx @apigit/cli auth login (or set APIGIT_TOKEN). APIGit also hosts the server at
https://app.apigit.com/api/v1/mcp (Europe: https://app.eu.apigit.com/api/v1/mcp), with your access token in the
Authorization: token <token> header. server.json describes both for the MCP Registry, as com.apigit/platform.
About this repository
The files here are the public copies of those that ship with the CLI; the CLI itself is distributed on npm. Report a problem or an idea in this repository's issues, or write to info@apigit.com. MIT licensed.
@apigit/clinpm install @apigit/cli