examples — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited examples (MCP Server) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that provides relevant context from Confluence pages using RAG (Retrieval Augmented Generation).
python --version curl -LsSf https://astral.sh/uv/install.sh | sh git clone <repository-url>
cd confluence-scraper-mcp
# Create virtual environment
uv venv .venv
# Activate virtual environment
source .venv/bin/activate
# Install dependencies
uv pip install -r requirements.txt.env file in the project root: touch .env # Required settings
CONFLUENCE_BASE_URL=https://your-domain.atlassian.net
CONFLUENCE_TOKEN=your-api-token
CONFLUENCE_SPACE_KEY=optional-space-key
# Optional settings (with defaults)
INITIAL_CRAWL=false
CHROMA_PERSIST_DIR=./data/chroma
EMBEDDING_MODEL="all-MiniLM-L6-v2"
MAX_PAGES=1000
INCLUDE_ATTACHMENTS=true
INCLUDE_COMMENTS=true # Development mode with auto-reload
uvx uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
# Run tests
uvx pytest
# Code formatting and checks
uvx black .
uvx isort .
uvx mypy . # Activate virtual environment
source .venv/bin/activate
# Then run commands as usual
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload # Start initial crawl of Confluence pages
curl -X POST http://localhost:8000/crawl
# Verify server health
curl http://localhost:8000/health # Get context for an LLM query
curl -X POST http://localhost:8000/mcp/context \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "Tell me about project X"}],
"query": "project X documentation",
"max_context_length": 1000
}'
# The response will include relevant context from your Confluence pages # View logs
tail -f logs/app.log
# Re-crawl Confluence (e.g., after updates)
curl -X POST http://localhost:8000/crawlGET /health: Health check endpointPOST /crawl: Trigger Confluence crawlPOST /mcp/context: Get relevant context for a queryThis MCP server is specialized for Confluence documentation and uses RAG (Retrieval Augmented Generation) with ChromaDB, which makes it different from typical MCP servers in several ways:
This MCP server can be integrated with code assistants like GitHub Copilot to provide relevant context from your Confluence documentation. Here's how to set it up:
# Make sure the server is running
poetry shell
uvicorn app.main:app --port 8000Option 1: Direct URL
http://localhost:8000/mcp/contextOption 2: MCP Configuration File (Recommended)
examples/mcp.json {
"endpoints": [
{
"name": "API Documentation",
"url": "http://localhost:8000/mcp/context",
"options": {
"max_context_length": 2000,
"filter": {
"space_key": "API",
"labels": ["technical-docs", "api-reference"],
"include_comments": true,
"include_attachments": false,
"semantic_ranking": {
"weight": 0.7,
"model": "all-MiniLM-L6-v2"
}
}
},
"authentication": {
"type": "none"
}
},
{
"name": "Architecture Docs",
"url": "http://localhost:8000/mcp/context",
"options": {
"max_context_length": 3000,
"filter": {
"space_key": "ARCH",
"labels": ["architecture", "design"],
"include_comments": false,
"include_attachments": true,
"semantic_ranking": {
"weight": 0.8,
"model": "all-MiniLM-L6-v2"
}
}
},
"authentication": {
"type": "none"
}
}
],
"default_endpoint": "API Documentation"
}examples/mcp.json for a full example with multiple endpoints and filtering options/doc command in Copilot Chat to explicitly search documentation curl -X POST http://localhost:8000/crawl uv pip install -r requirements.txtUV installs a command runner called uvx that can run Python scripts and modules without explicitly activating the virtual environment:
# Run the FastAPI server
uvx uvicorn app.main:app --reload
# Run tests
uvx pytest
# Code formatting
uvx black .
uvx isort .
uvx mypy .The project uses environment variables for configuration. Copy .env.example to .env and update the values:
CONFLUENCE_BASE_URL=https://your-domain.atlassian.net
CONFLUENCE_TOKEN=your-api-token
CONFLUENCE_SPACE_KEY=your-space-key
CHROMA_PERSIST_DIR=data/chroma
CHROMA_COLLECTION_NAME=confluence_docs
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
CHUNK_SIZE=512
CHUNK_OVERLAP=50
TOP_K=3
SIMILARITY_THRESHOLD=0.7git checkout -b feature/amazing-feature)uvx black . and uvx isort . to format codeuvx mypy . for type checkinguvx pytest)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)MIT License. See LICENSE for more information.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.