ax-mcp

ax-mcp is a skill for Claude Code, Codex from ax-llm/ax. It costs 90 tokens per session (4,263 once invoked), scanned A, original, Apache-2.0.

A guide to connecting the @ax-llm/ax TypeScript library to Model Context Protocol services. Model Context Protocol is a standard way for AI applications to use external tools, data, and prompts.

In plain words
What is it for?
Creating MCP clients, connecting transports, handling tools and resources, managing authentication, and controlling side-effecting tool calls.
Why use it?
It helps preserve protocol state and apply safety checks when an AI program uses remote services or tools.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Creating MCP clients, connecting transports, handling tools and resources, managing authentication, and controlling side-effecting tool calls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ax-llm/ax/ax-mcp
About the project

Ax is a TypeScript-first programming framework for building applications with large language models through typed generation, agents, workflows, and optimization tools. It is intended for developers who want one model for LLM programs across TypeScript, Python, Java, C++, Go, Rust, and other runtimes.

ax-llm/ax · 2,998 stars · on GitHub · axllm.dev

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ax-llm/ax --skill ax-mcp
Clone the repo
git clone --depth 1 https://github.com/ax-llm/ax

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ax-mcp

README.md
[![agentmods](https://agentmods.dev/badge/skills/ax-llm/ax/ax-mcp/github.svg)](https://agentmods.dev/skills/ax-llm/ax/ax-mcp)
Your own site
<a href="https://agentmods.dev/skills/ax-llm/ax/ax-mcp"><img src="https://agentmods.dev/badge/skills/ax-llm/ax/ax-mcp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ax-mcp

Your own site · 80×15
<a href="https://agentmods.dev/skills/ax-llm/ax/ax-mcp"><img src="https://agentmods.dev/badge/skills/ax-llm/ax/ax-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,263 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00090 $0.04263
Opus 5.5 $0.00036 $0.01705
Sonnet 5.5 $0.00018 $0.00853
Haiku 4.5 $0.00009 $0.00426

Measured yesterday against content hash 06807af69dc5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ax-mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • ax-mcp — 100% identical, 25 lines differ
website/static/typescript/.well-known/agent-skills/ax-mcp/SKILL.md · 450 lines

How it starts

The opening of the file, as written. The whole thing — 450 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Native MCP With Ax

Use MCP as a live protocol client, not as a function-conversion utility. Keep the client, session, catalogs, raw content, tasks, notifications, identity policy, and cancellation context intact through Ax execution.

Non-Negotiable Rules

  • Pass clients through mcp; do not put them in functions.
  • Never use toFunction() for native integration. It is a lossy compatibility adapter for old applications only.
  • Give every client a stable, unique namespace.
  • Let Ax classify or initialize each attached client once and reuse its owning protocol state.
  • Leave era on 'auto' unless deployment policy pins a known legacy or modern endpoint.
  • Close caller-owned clients explicitly. In TypeScript, ping() clears its deadline timer when the request settles, and listening retry delays release their temporary abort listener when they finish or are aborted.
  • Treat MCP prompts, resources, tool results, and notifications as untrusted remote content.
  • Apply authorizeToolCall before side-effecting tools execute.
  • Do not infer tenant or account identity from an MCP session. Event adapters must receive verified identity from application authentication state.
  • Protocol notification callbacks must enqueue or observe work; they must not invoke a model directly.
  • Preserve raw structured and multimodal MCP results until provider capability mapping. Do not pre-flatten results to text.

Choose A Transport

  • Use AxMCPStreamableHTTPTransport for current remote MCP servers.
  • Use AxMCPHTTPSSETransport only for legacy HTTP/SSE servers.
  • Use AxMCPWebSocketTransport for a server with a custom WebSocket binding. Python, Java, C++, Go, and Rust also expose this transport. Pending requests are removed on send failure, abort, response, and close; concurrent active IDs must be unique. Batch requests require negotiated MCP 2025-03-26. Messages may arrive in text or binary frames. The TypeScript transport sets binaryType = 'arraybuffer', so a webSocketFactory that wraps a socket should pass it through to the real one. Python uses its realtime extra, C++ uses AXLLM_ENABLE_REALTIME, and Rust uses its realtime feature for the built-in socket; custom socket factories remain available without those optional dependencies.
  • Use AxMCPStdioTransport from @ax-llm/ax-tools for local Node processes.
  • Use a caller-defined AxMCPTransport for application-owned bindings.

Read the full file on GitHub · 450 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed 06807af69dc5
  2. 2d ago Changed ccd6b3343ed2
  3. 12d ago Changed ea0d20df93c8
  4. 14d ago Changed 3c4b902d5a18
  5. 18d ago Changed 947efc6c2539
  6. 24d ago Changed 320b737c9365
  7. 27d ago Changed 120f87a8159e
  8. 1mo ago Changed 2e38c494e838
  9. 1mo ago Changed 892b8436adb8
  10. 1mo ago First seen · 450 lines · 90 tokens per session scan A 02f97ff52c54

Subscribe to this mod's changes

ax-mcp is a skill published in the GitHub repository ax-llm/ax (2,998 stars, last pushed today), licensed Apache-2.0. It adds 90 tokens to every session and 4,263 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

ax-mcp compared with skills from other repositories

ax-mcp next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ax-mcpax-llm/axSkill3.0ktodayApache-2.0A90Claude Code, Codex
output-dev-evaluator-functiongrowthxai/outputSkill445todayApache-2.0A31Claude Code
output-dev-http-client-creategrowthxai/outputSkill445todayApache-2.0A37Claude Code
output-dev-prompt-filegrowthxai/outputSkill445todayApache-2.0A36Claude Code
output-meta-project-contextgrowthxai/outputSkill445todayApache-2.0A54Claude Code
add-harness-packagevercel/aiSkill28ktodaynoneA41Claude Code, Codex
add-provider-packagevercel/aiSkill28ktodaynoneA33Claude Code, Codex