# repo-to-rag-mcp

> repo-to-rag-mcp is a paid API for AI agents from api.m2mcent.com, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-15).

Converts a code repository into a RAG-ready (Retrieval-Augmented Generation) knowledge base via an MCP-compatible endpoint

## Facts

- Endpoint: POST https://api.m2mcent.com/repo-to-rag-mcp/api/process
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/repo-to-rag-mcp-ea162f43
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XbJ6FidKCDKVLuLuZRTGn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability repo-to-rag-mcp-ea162f43 -d '<json body>'
```

Example prompt: Take this repository content and process it into a RAG-ready knowledge base so I can query it with an LLM — here's the raw repo data: [repo contents].

## When to prefer this

Choose this endpoint when you need to convert raw repository or source code content into a RAG-compatible format for LLM retrieval, especially in agentic workflows where paying per-call via x402 is acceptable and you need an MCP-compatible output. Prefer this over manual chunking pipelines when you want a single-step, hosted transformation without managing embedding infrastructure yourself.

## Known failure modes

- Empty or malformed 'data' field returns a 400-level error
- Repository data too large for single request may time out or be truncated
- Non-text binary content in repo may be skipped or cause parsing errors
- Payment failure (x402) results in 402 Payment Required before processing begins
- Malformed repo structure may produce low-quality or incomplete RAG chunks

## How this service works

The premier global index of 1,069 monetized MCP nodes across 205 specialized subdomains. Gasless USDC runtime settlements via x402 V2 Spec on Base L2. Save 95% token context.

## Output

Returns a processed, structured representation of the repository suitable for ingestion into a RAG pipeline — typically chunked text segments, code blocks, or indexed documents ready for embedding and vector store loading.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "payload": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/repo-to-rag-mcp-ea162f43/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.m2mcent.com](https://www.zero.xyz/host/api.m2mcent.com/llms.txt)
