Skip to main content

Documentation Index

Fetch the complete documentation index at: https://kosli-kosli-next.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The Kosli MCP Server is a Model Context Protocol server that exposes the Kosli API to LLM clients. Once installed, you can ask Claude things like “which artifacts are running in prod-aws and which are non-compliant?” and it will call the relevant Kosli endpoints for you. It is published from kosli-dev/mcp-server and distributed as both an npm package (@kosli/mcp-server) and a .mcpb desktop bundle.

How it works

Rather than ship a tool per Kosli endpoint, the server generates a catalog from Kosli’s OpenAPI spec and exposes three generic tools:
ToolPurpose
search_actionsFuzzy-search the catalog for relevant actions by natural-language query.
execute_read_actionInvoke any GET action by ID. Auto-allowed in MCP clients.
execute_write_actionInvoke any POST/PUT/PATCH/DELETE action by ID. Gated behind user approval.
The typical flow is: the LLM calls search_actions to discover the right action ID and its parameter schema, then calls execute_read_action or execute_write_action with the chosen ID. Both execute tools accept an optional fields array to request only specific top-level fields in the response, which keeps token usage down.

Prerequisites

  • Node.js v20 or higher
  • A Kosli API token
  • An MCP-capable client (Claude Code, Claude Desktop, or any other)

Install

Run from your project directory, or add --scope user to install globally:
claude mcp add kosli \
  -e KOSLI_API_TOKEN=your-token \
  -e KOSLI_ORG=your-org \
  -- npx -y @kosli/mcp-server

Configuration

The server reads configuration from environment variables.
VariableRequiredDefaultNotes
KOSLI_API_TOKENyes-Preferred. KOSLI_API_KEY is accepted as a fallback.
KOSLI_ORGyes-Default org used when a path parameter org is not supplied.
KOSLI_BASE_URLnohttps://app.kosli.comUse https://app.us.kosli.com for US, or your single-tenant endpoint.

Example prompts

Once connected, try prompts like:
  • “List the environments in my org and tell me which are compliant.”
  • “Show me the last 5 deployments to prod-aws.”
  • “What attestations are on trail release-456 in flow my-release?”
  • “Create a new flow called payments-api.”
Read prompts run without confirmation. Write prompts (create, update, delete) require an approval step in the MCP client.

Limitations

  • The catalog is generated from a snapshot of the OpenAPI spec. New endpoints land when the catalog is regenerated and a new package is published.
  • LLM clients may need several search_actions calls before settling on the right action ID for ambiguous queries.
  • Response shapes are whatever the Kosli API returns. Use the fields parameter on execute calls to trim large responses.

Feedback

Tell us what you think - email support@kosli.com or open an issue at kosli-dev/mcp-server.
Last modified on May 22, 2026