# ajiro-api [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/niti-lab/ajiro-api  
**GitHub Stars:** 0  
**npm Downloads (last month):** 1687  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ajiro-api

## Description
Let Claude Code and Codex test the APIs they write: scan Next.js, Hono, FastAPI, Express and Go routes into one YAML file per endpoint, run them as regression tests, serve them as mocks.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ajiro-api": {
    "command": "npx",
    "args": ["-y","ajiro-api"]
  }
}
```

## Documentation

## What ajiro-api MCP server does

ajiro-api MCP server gives coding agents access to a local workflow for discovering backend routes, maintaining endpoint definitions, and checking API behavior. It statically analyzes supported backend projects and stores one YAML file per endpoint under an `api/` directory. Each file separates route source information from request tests and mock responses, so scanning can update route metadata without replacing tests written by people or agents.

The MCP layer exposes the same project data and operations through the `ajiro-api mcp` command. This makes the scan, test, inspection, validation, and schema operations available to MCP clients working in the backend repository.

## How it works

Run `ajiro-api init` in a backend project to create the main configuration file and endpoint directory. `ajiro-api scan` detects the framework, reads route declarations, and writes or updates endpoint YAML files. Tests are then executed against a running application with `ajiro-api test`.

Endpoint YAML can describe requests, expected status codes, body matches, JSON schemas, captured values, setup requests, shared headers, and mock scenarios. Empty test sections receive an implicit smoke check for safe read-oriented methods. POST, PUT, PATCH, and DELETE smoke requests require the unsafe-smoke option because they may modify data.

The MCP server is started over stdio with `ajiro-api mcp`. A typical client configuration invokes it through `npx -y ajiro-api mcp`, although the command can also use an installed binary. Test output can be emitted as JSON with failure details, expected and actual values, and handler locations; sensitive tokens and passwords are masked.

## Setup and configuration

Install through npm, Homebrew, Cargo, or a binary from GitHub Releases. For a quick trial, run the package with `npx -y ajiro-api`. Automated environments can pin the npm package version or use a lockfile.

For Claude Code, the repository provides a plugin installation path that supplies the skill and MCP server. The server can also be added directly to an MCP settings file:

```json
{
  "mcpServers": {
    "ajiro-api": { "command": "npx", "args": ["-y", "ajiro-api", "mcp"] }
  }
}
```

Start the application before running endpoint tests. If authentication is needed, configure a login request in an environment’s `setup`; captured cookies or tokens can then be included through environment headers.

## Tools and capabilities

The MCP tool names are:

- `scan` — discover routes and update endpoint definitions.
- `test` — execute endpoint tests and report failures.
- `list` — show defined endpoints.
- `validate` — check YAML syntax, schema, references, duplicate IDs, and dependencies.
- `get_endpoint` — retrieve an endpoint definition.
- `schema` — return the JSON Schema for endpoint or configuration files.

The CLI also supports mock serving, OpenAPI 3.x import and export, Postman and Bruno imports, HTML API documentation generation, CI drift checks, and JUnit test reports. Mock responses are served from the `mock:` sections of endpoint files, with port 4010 as the documented default.

## Limitations and notes

Route scanning supports Next.js Route Handlers, Hono, FastAPI, Express, Go `net/http`, Go chi, and Go Echo. GraphQL, gRPC, and WebSocket APIs are outside the supported scope. The runtime is delivered as a single Rust binary, so Node.js or Python is not required when using that binary.

The MCP transport described for this package is stdio. API definitions and test results are designed to remain local. Telemetry consent is off by default and can be managed with the CLI’s telemetry command. The project is MIT licensed.

_Full upstream README: https://allmcps.com/mcp/ajiro-api/readme_

