APIMind AI MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@APIMind AI MCP ServerWhich endpoint creates a customer?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
APIMind AI โ AI-Powered API Documentation Assistant
An AI-powered Retrieval-Augmented Generation (RAG) assistant that lets developers query OpenAPI/Swagger documentation using natural language, with Model Context Protocol (MCP) integration for use from tools such as VS Code Copilot.
๐ Project Overview
Developers often work with multiple API specifications spread across different OpenAPI/Swagger YAML or JSON files. Finding the correct endpoint, HTTP method, authentication details, request structure, and response information can become time-consuming.
APIMind AI solves this problem by ingesting API documentation into a searchable knowledge base and using a hybrid RAG pipeline to retrieve relevant documentation before asking an LLM to generate a grounded answer.
The project also exposes selected capabilities through an MCP server, allowing MCP-compatible clients such as VS Code Copilot to discover project files and ask questions about the uploaded API documentation.
Example questions
Which endpoint creates a customer?
How do I retrieve a specific GitHub repository?
What authentication does the Stripe API use?
Which endpoint creates a payment?
What HTTP method is used to update a repository?
Is there an endpoint for listing available models?If the uploaded documentation does not contain enough evidence, the system is designed to respond with an appropriate "I don't know" response instead of relying on outside knowledge.
๐๏ธ Architecture
The system consists of two major flows:
Document ingestion
OpenAPI / Swagger YAML or JSON
โ
โผ
FastAPI Upload API
โ
โผ
Parser Service
โ
โผ
Semantic Chunking
โ
โผ
Embedding Service
โ
โผ
OpenAI Embeddings
โ
โผ
PostgreSQL + pgvectorQuestion answering / RAG
User Question
โ
โผ
Chat API
โ
โผ
Query Rewriting
โ
โผ
Document Resolution
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ Hybrid Retrieval โ
โ โ
โ Vector Search โ
โ Keyword Search โ
โโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
RRF Fusion
โ
โผ
Cross-Encoder Reranking
โ
โผ
Top-K Relevant Chunks
โ
โผ
Confidence Scoring
โ
โผ
Prompt Construction
โ
โผ
Groq LLM
โ
โผ
Grounding Verification
โ
โผ
Final Answer๐ง RAG Pipeline
The core of APIMind AI is a hybrid RAG pipeline.
Related MCP server: Markdown RAG MCP
1. Document parsing
Uploaded OpenAPI/Swagger YAML or JSON files are parsed into structured API information.
The system extracts information such as:
Endpoint
HTTP method
API description
Request information
Response information
Authentication details
Parameters
API-specific documentation
2. Semantic chunking
Instead of treating an entire API specification as one large document, the documentation is divided into meaningful chunks.
Example:
POST /customers
Creates a new customer...
Request:
...
Response:
...Metadata is retained with every chunk:
document_id
source_file
chunk_type
endpoint
method
chunk_text
embedding3. Embeddings
The chunks are converted into vector embeddings.
The project uses an external embedding model through the embedding service and stores the resulting vectors in PostgreSQL using pgvector.
4. Hybrid retrieval
APIMind does not depend only on semantic similarity.
It performs two retrieval strategies:
Semantic / Vector Search
Uses pgvector similarity search to find conceptually related documentation.
Keyword Search
Uses PostgreSQL Full-Text Search to find exact terminology and API-specific keywords.
The two result sets are combined using:
Reciprocal Rank Fusion (RRF)
Vector Results
+
Keyword Results
โ
โผ
RRF Fusion
โ
โผ
Unified Ranking5. Cross-Encoder reranking
The fused results are passed through a Cross-Encoder reranker.
Current model:
cross-encoder/ms-marco-MiniLM-L-6-v2This provides a second-stage relevance check between:
Question โ Retrieved DocumentationThe highest-ranked chunks are then passed to the LLM.
6. Confidence scoring
Before generating an answer, the retrieved context is evaluated using the project's confidence mechanism.
If the retrieved evidence is insufficient, the system avoids generating an unsupported answer.
Example:
I couldn't find enough evidence in the uploaded documentation
to answer this question.7. Grounding verification
Generated answers can also be checked against the retrieved documentation.
The grounding verifier evaluates whether the answer is supported by the supplied context.
The goal is to reduce hallucinated API information.
๐ค LLM
The project uses the OpenAI-compatible client interface with:
Groq API
Llama 3.1 8B InstantThe LLM receives:
System instructions
User question
Conversation history
Retrieved documentation
The prompt explicitly instructs the model to use only the supplied documentation.
๐ MCP Integration
APIMind also includes a Model Context Protocol (MCP) server.
The MCP server exposes selected project capabilities as tools that can be consumed by MCP-compatible clients.
The primary tool is:
โญ ask_api_documentation
This is the main MCP tool for APIMind.
It allows an MCP client such as VS Code Copilot to ask questions about the indexed API documentation.
Conceptually:
VS Code Copilot
โ
โผ
MCP Client
โ
โผ
APIMind MCP Server
โ
โผ
ask_api_documentation
โ
โผ
FastAPI / RAG Backend
โ
โผ
Hybrid RAG Pipeline
โ
โผ
Grounded API Answer๐ ๏ธ MCP Tools
1. ask_api_documentation โญ
Purpose: Ask questions about the uploaded API documentation.
This is the primary APIMind MCP capability.
Example:
Which endpoint creates a Stripe customer?or:
How do I retrieve a specific GitHub repository?The tool sends the question through the APIMind RAG pipeline and returns the documentation-grounded result.
Recommended usage
In VS Code Copilot, ask naturally:
Use APIMind to tell me which endpoint creates a customer.or:
Ask the API documentation what HTTP method is used to retrieve a GitHub repository.The MCP client can invoke the tool when appropriate.
2. list_project_files
Purpose: List files available inside the configured MCP workspace.
Example:
List the project files available to me.The tool returns the files/directories visible within the configured workspace.
It is protected by workspace path validation.
3. read_project_file
Purpose: Read the contents of a text file inside the configured MCP workspace.
Example:
Read the OpenAPI file github.yaml.The MCP server validates that the requested path remains inside the configured workspace.
Binary files and files exceeding the configured maximum file size are rejected.
4. hello_tool
A simple MCP connectivity/demo tool.
Example:
Use the hello tool with the name Developer.Expected response:
Hello Developer, welcome to APIMind MCP Server!This tool is mainly useful for verifying that the MCP server is connected correctly.
โ ๏ธ About generate_code
A generate_code MCP tool may exist in experimental/development code, but the dedicated code-generation service has not been implemented as part of the current RAG backend.
Therefore, it is intentionally not considered a supported APIMind feature in this README.
The current supported workflow is:
Question
โ
ask_api_documentation
โ
RAG Retrieval
โ
Grounded Documentation AnswerCode generation can be added later as a dedicated service with its own retrieval and code-generation prompt.
๐ป Using APIMind with VS Code Copilot
The project includes an MCP server that can be connected to an MCP-compatible client such as VS Code Copilot.
1. Start the FastAPI backend
From the project root:
uvicorn app.main:app --reloadThe FastAPI application will expose the APIMind REST APIs.
Swagger UI is normally available at:
http://127.0.0.1:8000/docs2. Start the MCP server
Navigate to the MCP server directory:
cd mcp_serverStart the server:
python server.pyThe current MCP server uses:
127.0.0.1:8000and Streamable HTTP transport.
If your FastAPI application and MCP server are configured to use the same port, configure one of them to use another port before starting both simultaneously.
3. Connect the MCP server to VS Code
Use VS Code's MCP configuration / MCP-compatible tooling to register the APIMind MCP server.
Once connected, the available tools should include:
hello_tool
list_project_files
read_project_file
ask_api_documentationThe exact UI may vary depending on your VS Code and Copilot version.
๐งช Example VS Code Copilot Prompts
After connecting the MCP server, try:
API documentation
Use ask_api_documentation to find the endpoint that creates a Stripe customer.GitHub API
Use ask_api_documentation to explain how to retrieve a specific GitHub repository.Authentication
Use ask_api_documentation to tell me what authentication mechanism is documented for the Stripe API.File listing
Use list_project_files to show the files available in the workspace.Reading a file
Use read_project_file to read github.yaml.Combined workflow
First inspect the available project files, then use APIMind to answer:
Which endpoint is used to create a repository?๐ก REST API Endpoints
The FastAPI backend provides the core application functionality.
Typical capabilities include:
Endpoint / Capability | Purpose |
| Upload an OpenAPI/Swagger document |
| Ask a documentation question |
Streaming chat | Stream an LLM response |
Document management | List, inspect and delete uploaded documents |
Code generation | Not currently implemented as a supported backend service |
Refer to the automatically generated FastAPI Swagger documentation for the exact current endpoint paths and request/response schemas.
๐๏ธ Database
APIMind uses PostgreSQL.
The database stores:
uploaded_documents
document_chunks
conversations
messagesdocument_chunks contains the vector embeddings used for semantic retrieval.
pgvector
pgvector enables similarity search directly inside PostgreSQL.
PostgreSQL Full-Text Search
PostgreSQL's full-text search is used as the keyword retrieval component of the hybrid retrieval pipeline.
๐ Safety and Guardrails
The project includes several mechanisms to reduce unsafe or unsupported responses.
Documentation-only prompting
The LLM is instructed to answer using only retrieved documentation.
Confidence threshold
Insufficient retrieval evidence can result in an explicit fallback response.
Grounding verification
Generated answers can be checked against retrieved context.
MCP workspace protection
Filesystem tools validate requested paths against the configured workspace.
File-size protection
Large files are rejected by the filesystem reader according to the configured limit.
๐ Project Structure
A simplified structure looks like:
AI_API_Documentation_QnA/
โ
โโโ app/
โ โโโ api/
โ โโโ database/
โ โโโ services/
โ โ โโโ chat_service.py
โ โ โโโ retrieval_service.py
โ โ โโโ vector_service.py
โ โ โโโ embedding_service.py
โ โ โโโ reranker_service.py
โ โ โโโ query_rewriter.py
โ โ โโโ confidence_service.py
โ โ โโโ document_resolver.py
โ โ โโโ ingestion_service.py
โ โ โโโ llm_service.py
โ โ
โ โโโ prompts/
โ โโโ config.py
โ โโโ main.py
โ
โโโ mcp_server/
โ โโโ server.py
โ โโโ tools/
โ โ โโโ filesystem.py
โ โ โโโ ...
โ โโโ utils/
โ โ โโโ path_utils.py
โ โโโ config.py
โ
โโโ requirements.txt
โโโ .env
โโโ README.mdโ๏ธ Technology Stack
Category | Technology |
Language | Python |
API Framework | FastAPI |
Database | PostgreSQL |
Vector Database | pgvector |
LLM Provider | Groq |
LLM | Llama 3.1 8B Instant |
Embeddings | External embedding model |
Reranking | Sentence Transformers Cross-Encoder |
API Documentation | OpenAPI / Swagger |
RAG | Hybrid Retrieval |
MCP | Model Context Protocol |
MCP Transport | Streamable HTTP |
Client Integration | VS Code / Copilot |
ORM / DB Access | SQLAlchemy |
๐ธ Project Glimpses
Add screenshots from your implementation here.
Recommended screenshots:
1. FastAPI Swagger UI
2. RAG Retrieval Logs
3. MCP Inspector
4. VS Code Copilot + MCP
5. PostgreSQL + pgvector
Glimpse of other MCP tool calls
๐ Future Enhancements
The current implementation focuses on the RAG + MCP foundation.
Possible future improvements:
Dedicated
generate_codeserviceLanguage-specific code generation
Better API authentication extraction
More advanced document routing
Multi-document reasoning
Evaluation datasets and retrieval metrics
Automated RAG evaluation
Additional MCP tools
Authentication and user-level access control
Production deployment
๐ฏ Project Highlights
APIMind demonstrates practical implementation of:
Retrieval-Augmented Generation
Hybrid Search
Vector Similarity Search
PostgreSQL Full-Text Search
Reciprocal Rank Fusion
Cross-Encoder Reranking
Query Rewriting
Automatic Document Resolution
Confidence Scoring
Grounding Verification
LLM Integration
Model Context Protocol
MCP Tool Development
FastAPI
PostgreSQL + pgvector
The main objective is to make API documentation searchable, contextual, and accessible directly from developer tooling while keeping generated answers grounded in the uploaded documentation.
๐จโ๐ป Author
Shubham Raskar
AI / Backend Engineering Project
๐ Status
Core RAG
Completed
MCP Integration
Completed
ask_api_documentation
Primary MCP tool โ supported
Filesystem MCP tools
Supported
Code Generation
Future enhancement
APIMind AI โ Ask your API documentation instead of searching through it.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceTransforms Swagger/OpenAPI documented APIs into conversational interfaces, enabling natural language interaction with APIs through an MCP server for use with AI assistants.4MIT
- Alicense-qualityDmaintenanceProvides semantic search over markdown documentation using RAG, allowing natural language queries and integration with MCP clients.1MIT
- Flicense-qualityCmaintenanceEnables natural language queries on technical specifications and automated code compliance checks using local RAG with vector search, integrated via MCP.
- Flicense-qualityCmaintenanceEnables semantic search and AI-powered Q&A over ingested GitHub documentation repositories via MCP tools.
Related MCP Connectors
Query any docs site via MCP. Submit a URL, ask questions, get cited answers.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Hosted MCP server exposing US hospital procedure cost data to AI assistants
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shubhamimsr/AI-Powered-API-Documentation-Assistant'
If you have feedback or need assistance with the MCP directory API, please join our Discord server