Skip to content

Latest commit

Β 

History

History
273 lines (207 loc) Β· 6.74 KB

File metadata and controls

273 lines (207 loc) Β· 6.74 KB

πŸš€ Get Started - Your Next Steps

Welcome! This guide will help you get started with the Devtron Documentation MCP Server.

βœ… What You Have

A complete, production-ready MCP server that provides semantic search over Devtron documentation:

  • βœ… 16 files created and configured
  • βœ… ~2,570 lines of code and documentation
  • βœ… 4 MCP tools ready to use
  • βœ… Free tier AWS Bedrock Titan embeddings
  • βœ… Comprehensive documentation for all use cases

πŸ“‹ Quick Checklist

Step 1: Understand the Project (5 minutes)

Read these files in order:

  1. README.md - Project overview
  2. PROJECT_OVERVIEW.md - Central API details
  3. mcp-docs-server/SOLUTION_SUMMARY.md - MCP server architecture

Step 2: Set Up MCP Server (5 minutes)

# Navigate to MCP server directory
cd mcp-docs-server

# Run automated setup
./setup.sh

# This will:
# βœ… Check Python version
# βœ… Create virtual environment
# βœ… Install dependencies
# βœ… Create .env file
# βœ… Create directories

Step 3: Configure AWS (2 minutes)

Option A: Use AWS CLI (Recommended)

aws configure
# Enter your AWS credentials when prompted

Option B: Edit .env file

nano .env
# Add:
# AWS_ACCESS_KEY_ID=your_key
# AWS_SECRET_ACCESS_KEY=your_secret
# AWS_REGION=us-east-1

Enable Bedrock Titan (One-time, 30 seconds):

  1. Go to: https://console.aws.amazon.com/bedrock/
  2. Click "Model access" β†’ "Manage model access"
  3. Check "Titan Embeddings G1 - Text"
  4. Click "Request model access"
  5. Wait for approval (usually instant)

Step 4: Test Everything (2 minutes)

# Activate virtual environment
source venv/bin/activate

# Run test suite
python test_server.py

Expected output:

βœ… AWS Bedrock test passed
βœ… Document processor test passed
βœ… Vector store test passed
βœ… All tests completed!

Step 5: Run the Server (1 minute)

python server.py

You should see:

INFO - Initializing Devtron Documentation MCP Server...
INFO - Cloning repository...
INFO - Indexing documentation...
INFO - Server initialization complete

Step 6: Integrate with Your Chatbot (10 minutes)

Follow the integration guide:

mcp-docs-server/INTEGRATION_GUIDE.md

Quick example:

from mcp import ClientSession
from mcp.client.stdio import stdio_client

async def search_docs(query):
    async with stdio_client("python", ["server.py"]) as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()
            result = await session.call_tool(
                "search_docs",
                {"query": query, "max_results": 3}
            )
            return result[0].text

πŸ“š Documentation Map

For Quick Start

For Understanding

For Integration

For Reference

🎯 Common Use Cases

Use Case 1: Answer User Questions

# User asks: "How do I deploy an application?"
context = await search_docs("deploy application")
# Returns relevant documentation chunks
# Use in your chatbot prompt

Use Case 2: Get Specific Documentation

# Get a specific doc file
result = await session.call_tool(
    "get_doc_by_path",
    {"path": "docs/user-guide/deploying-application.md"}
)

Use Case 3: Keep Docs Updated

# Manually sync documentation
result = await session.call_tool("sync_docs", {})
# Or set up a cron job to run periodically

Use Case 4: Browse Available Docs

# List all documentation sections
result = await session.call_tool(
    "list_doc_sections",
    {"filter": "user-guide"}
)

πŸ”§ Troubleshooting

Problem: AWS credentials not found

Solution: Run aws configure or edit .env file

Problem: Bedrock access denied

Solution: Enable Titan Embeddings in AWS Console (see Step 3)

Problem: Git clone fails

Solution: Check internet connection, verify GitHub URL

Problem: ChromaDB error

Solution: Delete chroma_db/ directory and restart

Problem: Slow initial startup

Solution: Normal! First run indexes all docs (~2-5 minutes)

πŸ“Š What Happens Next?

First Run (2-5 minutes)

  1. Clones Devtron docs from GitHub
  2. Parses all markdown files
  3. Chunks content by headers
  4. Generates embeddings (AWS Bedrock)
  5. Stores in ChromaDB
  6. Ready to serve queries!

Subsequent Runs (<10 seconds)

  1. Loads existing ChromaDB index
  2. Ready to serve queries immediately!

When Docs Update

  1. Run sync_docs tool
  2. Git pulls latest changes
  3. Only re-indexes changed files
  4. Updates ChromaDB incrementally

πŸ’‘ Pro Tips

  1. Cache Frequent Queries: Implement caching in your chatbot
  2. Limit Results: Use max_results=3 for faster responses
  3. Schedule Syncs: Set up cron job for sync_docs
  4. Monitor Logs: Check for errors and performance
  5. Use Docker: For production deployment

πŸŽ“ Learning Path

Day 1: Setup & Test

  • βœ… Run setup script
  • βœ… Configure AWS
  • βœ… Run tests
  • βœ… Start server

Day 2: Integration

  • βœ… Read integration guide
  • βœ… Implement basic search
  • βœ… Test with sample queries

Day 3: Production

  • βœ… Set up Docker
  • βœ… Configure monitoring
  • βœ… Schedule doc syncs
  • βœ… Deploy to production

πŸ“ž Need Help?

  1. Check Documentation: See files listed above
  2. Run Tests: python test_server.py
  3. Check Logs: Review error messages
  4. Verify AWS: Ensure credentials and Bedrock access

πŸŽ‰ Success Criteria

You'll know it's working when:

  • βœ… Tests pass without errors
  • βœ… Server starts and indexes docs
  • βœ… Search returns relevant results
  • βœ… Chatbot gets accurate context
  • βœ… Users get better answers!

πŸš€ Ready to Start?

cd mcp-docs-server
./setup.sh

Then follow the prompts!


Next Steps:

  1. βœ… Run setup: ./setup.sh
  2. βœ… Configure AWS credentials
  3. βœ… Run tests: python test_server.py
  4. βœ… Start server: python server.py
  5. βœ… Integrate with chatbot

Questions? Check the documentation files listed above.

Status: βœ… Ready to use!