- Home
- MCP servers
- Document Q&A
Document Q&A
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"parikshith49-document-qa-mcp12": {
"command": "npx",
"args": [
"ts-node",
"src/mcp/mcpServer.ts"
],
"env": {
"QDRANT_URL": "https://your-qdrant-cloud-url",
"QDRANT_HOST": "http://your-qdrant-host:6333",
"OPENAI_API_KEY": "your_openai_api_key",
"QDRANT_API_KEY": "your_qdrant_api_key",
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_REDIRECT_URI": "http://localhost:3000/oauth2callback",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"GOOGLE_REFRESH_TOKEN": "your-refresh-token",
"SERVICE_ACCOUNT_PATH": "./service-account.json"
}
}
}
}This MCP server provides a document-based QA pipeline that fetches text from Google Drive, converts it into embeddings stored in Qdrant Cloud, and uses AI to answer questions via a REST API and modular tools. It is designed for practical, flexible querying of large document sets with scalable semantic search and AI-assisted responses.
How to use
You will interact with this server through its REST API and the MCP tools. To ask a question, send your query to the chat endpoint and receive an AI-generated answer grounded in the ingested documents. If you need specialized search or answer generation functionality, use the MCP tools exposed under /tools to perform semantic search or produce contextually grounded responses.
How to install
Prerequisites: ensure Node.js and npm are installed on your system. You also need access to Google Drive via a service account and API keys for OpenAI and Qdrant Cloud.
# 1) Install dependencies
npm install
# 2) Create environment configuration (see .env below)
Install the project dependencies and prepare the environment. Run the following commands in sequence to set up, ingest data, and start the servers.
# 3) Ingest Google Drive documents and store embeddings in Qdrant
npx ts-node src/ingestAndStore.ts
# 4) Start the MCP server (modular tools)
npx ts-node src/mcp/mcpServer.ts
# 5) Start the main chat API server
npx ts-node src/app.ts
Optional: for local development you can run each component in separate terminals or use a process watcher to restart on changes.
Additional sections
Configuration and environment variables are required to connect to external services. Create a root .env file with the following variables set to your credentials and resource URLs. Use placeholders where values are not yet available.
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth2callback
GOOGLE_REFRESH_TOKEN=your-refresh-token
QDRANT_HOST=http://localhost:6333
OPENAI_API_KEY=your-openai-api-key
QDRANT_URL=your_qdrant_url
QDRANT_API_KEY=your_qdrant_api_key
SERVICE_ACCOUNT_PATH=./service-account.json
The system relies on a Google Drive service account file named service-account.json. Place this file at the root of the project or update SERVICE_ACCOUNT_PATH to the correct location. Ensure the service account has access to the target Google Drive folder.
If you encounter issues with ingestion or embedding, verify that the Google Drive access is working, the Qdrant Cloud endpoints are reachable, and OpenAI credentials are valid. Check network access, API quotas, and that the ingestion script completes successfully before starting the API server.
Available tools
search
MCP-compatible search tool that queries Qdrant directly to retrieve the most relevant text chunks based on vector similarity
answer
MCP-compatible answer tool that composes a response using retrieved context and the AI model