How faeralan/mcp-arca-afip works
mcp-arca-afip is a local MCP server for searching and retrieving official ARCA/AFIP web-service documentation. Its main user flow is an MCP client calling a registered tool: search embeds a query and combines semantic and BM25 results, while the listing, service-detail, and full-document tools expose complementary views of the local index. A separate ingestion workflow crawls, parses, chunks, and embeds source documents into that index. The README documents the product capabilities; ingestion wiring is only partly evidenced by the sampled files, so uncertain links are dashed.
Main entry points: server.ts Tool server · vector-store.ts Hybrid retrieval · search-docs.tool.ts Search docs · get-document.tool.ts Get document
Components 16
MCP interface
- Tool server
src/server.ts - Search docs
src/tools/search-docs.tool.ts - List services
src/tools/list-web-services.tool.ts - Service detail
src/tools/get-web-service.tool.ts - Get document
src/tools/get-document.tool.ts - Safe formatting
src/tools/format.ts
Query and retrieval
- Query embeddings
src/services/embedder.ts - Hybrid retrieval
src/services/vector-store.ts
Local index
- Documentation index
data
Documentation ingestion
- Source crawler
ingest/crawl.ts - Document parser
ingest/parse.ts - Section chunker
ingest/chunk.ts - Passage embeddings
ingest/embed.ts - Index builder
ingest/build-index.ts
Other components
- MCP client
- ARCA/AFIP docs
Connections 19
- MCP client → Tool server: sends requests
README.md - Tool server → Search docs: dispatches search
src/server.ts - Tool server → List services: dispatches listing
src/server.ts - Tool server → Service detail: dispatches detail
src/server.ts - Tool server → Get document: dispatches document
src/server.ts - Search docs → Query embeddings: embeds query
src/tools/search-docs.tool.ts - Search docs → Hybrid retrieval: searches index
src/tools/search-docs.tool.ts - Search docs → Safe formatting: formats results
src/tools/search-docs.tool.ts - Get document → Hybrid retrieval: reads chunks
src/tools/get-document.tool.ts - Get document → Safe formatting: formats document
src/tools/get-document.tool.ts - List services → Hybrid retrieval: lists services
src/tools/list-web-services.tool.ts - Service detail → Hybrid retrieval: loads metadata
src/tools/get-web-service.tool.ts - Hybrid retrieval → Documentation index: reads index
src/services/vector-store.ts - ARCA/AFIP docs → Source crawler: provides documents
README.md - Source crawler → Document parser: supplies downloads
ingest/parse.ts - Document parser → Section chunker: yields sections
ingest/chunk.ts - Section chunker → Passage embeddings: supplies chunks
ingest/embed.ts - Passage embeddings → Query embeddings: reuses embeddings
ingest/embed.ts - Index builder → Documentation index: builds index
README.md