Files
DocsMCP/docs/example/getting-started.md
T
2026-06-05 23:02:55 +01:00

3.3 KiB

Getting Started

Welcome to the Context7-style MCP System documentation!

Overview

This system provides a self-hosted, local context7-compatible MCP (Model Context Protocol) solution using Docker containers. It enables you to:

  • Ingest and index your own documents
  • Perform semantic search on vector embeddings
  • Integrate with MCP-enabled IDEs for intelligent tool interactions

Architecture

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Client    │────▶│ docs-api    │◀────│ docs-mcp    │
│ (IDE/Tool)  │     │ (FastAPI)   │     │ (MCP Server)│
└─────────────┘     └─────────────┘     └─────────────┘
                          │
                          ▼
                    ┌─────────────┐
                    │   Qdrant    │
                    │ (Vector DB) │
                    └─────────────┘

Quick Start

1. Start All Services

docker compose up -d --build

2. Verify Services Are Running

docker compose ps

You should see all three services in "Up" status:

  • qdrant (port 6333)
  • docs-api (port 8787)
  • docs-mcp (port 8788)

3. Access the API

Open your browser and navigate to:

http://localhost:8787/docs

You should see the FastAPI documentation page.

API Endpoints

Health Check

curl http://localhost:8787/health

Expected response:

{"status":"ok"}

Ingest Document

Upload a text document to be processed and indexed:

curl -X POST "http://localhost:8787/api/v1/ingest" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "This is sample document content for semantic search testing.",
    "metadata": {"source": "example", "type": "text"}
  }'

Search Documents

Perform a similarity search on ingested documents:

curl "http://localhost:8787/api/v1/search" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "semantic search",
    "top_k": 5,
    "threshold": 0.7
  }'

Configuration

Environment Variables

Copy the example environment file and customize:

cp .env.example .env

Key variables:

  • VECTOR_STORE_HOST: Internal hostname of Qdrant (default: qdrant)
  • VECTOR_STORE_PORT: Qdrant port (default: 6333)

Docker Compose

All services are defined in docker-compose.yml. Key networking details:

  • Services communicate internally via context7-network
  • Qdrant uses service name qdrant for internal connections
  • Vector store is exposed externally on port 6333 for debugging

Next Steps

  1. Review the project structure to understand component roles
  2. Customize the backend API endpoints in backend/app/main.py
  3. Implement MCP tools in mcp-server/server.py
  4. Add more example documents in the docs/ directory

Troubleshooting

Check Logs

docker compose logs -f docs-api
docker compose logs -f qdrant
docker compose logs -f docs-mcp

Reset All Services

docker compose down -v
docker compose up -d --build

Support

For issues, refer to the README.md or check the Qdrant documentation.