Tkflyc AI CLI logo

Tkflyc AI CLI

Runs local AI CLIs and OpenAI-compatible APIs as MCP tools with background jobs and durable process state.

Install Tkflyc AI CLI

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "tkflyc-ai-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@tkflyc/ai-cli-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 12 tools correctly ().

Overview

tkflyc-ai-cli exposes Claude, Codex, Grok, Windows Antigravity, and OpenAI-compatible API backends as MCP tools. Its asynchronous job model returns a PID from `run`, while `list_processes`, `peek`, `wait`, and `get_result` track execution and retrieve results. The `direct-api` backend runs an agent loop inside Node and can use configured hosted or local `/chat/completions` endpoints. Use it when an MCP client needs to delegate coding or text tasks to multiple CLI agents or API providers.

Use cases

  • Delegate coding tasks to Claude, Codex, Grok, or Antigravity
  • Run background agent jobs from an MCP client
  • Connect agent workflows to hosted or local OpenAI-compatible models
  • Inspect intermediate output before retrieving a completed result

Key features

  • Background jobs with durable shared state
  • Claude, Codex, Grok, and Antigravity CLI backends
  • OpenAI-compatible direct API provider support
  • Process inspection and result retrieval tools
  • Configurable retries and tool-loop limits
  • Agent file and shell tools for direct API models

Tools12

What Tkflyc AI CLI lets your agent do. Expand a tool for its parameters.

Verified live~4.5k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

5/5 checks healthy over the last 17d

What it can do

From the 12 tools this server returned when we ran it.

Runs commands · 4Can delete or modify data · 4Handles credentials · 1Read-only tools · 5
Network at startup3 connections
Files written at startupNone
Install scriptsprepare
npm provenanceNot published
Package age66 days
Maintainers2

Observed 2026-11-14 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 17d ago via OSV.dev · @tkflyc/ai-cli-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars7Stargazers on the source repository.
Last commit5d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed12Callable tools this server registers over MCP.

How Tkflyc AI CLI works

What tkflyc-ai-cli does

tkflyc-ai-cli turns several AI backends into tools callable through MCP. Supported local command-line backends include Claude, Codex, Grok, and Windows Antigravity (agy). A separate direct-api path connects to OpenAI-compatible /chat/completions services, including hosted providers, local Ollama instances, and private gateways.

The server is designed around background execution rather than blocking a tool call until an agent finishes. A submitted job returns its process identifier immediately. Shared durable state is also available through the ai-cli command-line interface, allowing the MCP and CLI surfaces to observe the same work.

How it works

The main workflow starts with run, which launches a backend job and returns its PID. Use list_processes to inspect known jobs, peek to view intermediate output, wait to wait for completion, and get_result to retrieve the final response. Finished jobs are retained for 30 minutes for the Claude, Codex, and Grok runners.

The direct API runner does not start a provider subprocess. It performs HTTP requests from the Node process and runs an agent loop in which the model can use read_file, write_file, and bash. Provider models are addressed with a provider prefix followed by the model name, such as local-llama3.1 or or-qwen/qwen3.7-plus.

For transient HTTP failures, the direct API runner retries 429 and 5xx responses with exponential backoff and jitter. Retry behavior can be configured per provider, and retry events are written to stdout. Tool-loop limits also apply to direct API jobs; the default is 30 iterations, with supported values from 1 through 200.

Setup and configuration

The package requires Node.js ^20.19.0 || >=22.12.0. An npm-based installation can be registered with Claude using:

Terminal
claude mcp add ai-cli -s user -- npx -y @tkflyc/ai-cli-mcp

A source checkout requires npm install, which builds the untracked dist/ directory through the package's prepare script. Register the resulting server with Node:

Terminal
claude mcp add ai-cli -s user -- node "/path/to/tkflyc-ai-cli/dist/server.js"

Direct API providers are configured in ~/.local/share/ai-cli/providers.json. Set AI_CLI_PROVIDERS_PATH to use another file. Provider entries can define an API key, base URL, retry settings, extra_body, model-specific request fields, and max_tool_loops. OpenRouter and DashScope have built-in base URLs; other provider keys need their own base_url. The configuration is validated as a whole, so one invalid provider entry can prevent all providers from loading.

Tools and capabilities

  • Launch Claude, Codex, Grok, and Antigravity jobs through MCP.
  • Call OpenAI-compatible HTTP endpoints without adding provider-specific code.
  • Track background jobs with PIDs, process listing, output inspection, waiting, and result retrieval.
  • Query model lists for supported backends, including Grok's cached or fallback model data.
  • Configure retries for throttling and server-side failures.
  • Run an agent loop with file-reading, file-writing, and shell-command tools through direct API models.

Limitations and notes

The npm and npx installation paths do not self-update. Source-based auto-update depends on a clone containing .git and package.json; pin the package version in an npm command when reproducibility matters.

Direct API configuration rejects attempts to override core request fields such as model, messages, stream, stream_options, or tools. A job can finish with exit code 0 after reaching its tool-loop limit, so callers should inspect agentOutput.finish_reason for tool_loop_limit rather than relying only on process status.

The Grok backend requires one of its supported reasoning-effort values, and its execution errors are treated as failures even when the CLI exits with code 0.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Tkflyc AI CLI

tkflyc-ai-cli is an MCP server that connects MCP clients to Claude, Codex, Grok, Antigravity, and OpenAI-compatible APIs. Its main tools launch background jobs with `run`, inspect them with `list_processes` and `peek`, wait with `wait`, and retrieve completed output through `get_result`.

Install it through npm or npx with `claude mcp add ai-cli -s user -- npx -y @tkflyc/ai-cli-mcp`. For a source checkout, run `npm install` and register `dist/server.js` with Node. The package requires Node.js `^20.19.0 || >=22.12.0`.

Add the provider to `~/.local/share/ai-cli/providers.json`, or set `AI_CLI_PROVIDERS_PATH` to another file. Providers can define `api_key`, `base_url`, retry options, request-body extras, and a tool-loop limit. Models are selected with a provider prefix, such as `local-llama3.1`.

Yes, it uses the standard MCP server interface and can be configured in MCP clients that support standard server connections, including Cursor. The documented command registers it with Claude Code, while other clients use their normal MCP server configuration.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTkflyc AI CLI AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/tkflyc-ai-cli?style=directory)](https://allmcps.com/mcp/tkflyc-ai-cli)
HTML Embed
<a href="https://allmcps.com/mcp/tkflyc-ai-cli"><img src="https://allmcps.com/api/badge/tkflyc-ai-cli?style=directory" alt="Tkflyc AI CLI on AllMCPs" /></a>