Skip to content

rakuv3r/open-context7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

open-context7

中文

🔒 Self-hosted, privacy-first alternative to Context7 for private code documentation

License: MIT Docker

Why open-context7?

Context7 is great, but it sends your code to external servers. open-context7 keeps everything on your own infrastructure:

  • 🔒 Privacy First - Your code never leaves your network
  • 💰 Completely Free - No usage limits or subscription fees
  • 🛠️ Fully Customizable - Open source, modify as needed
  • 🚀 Easy Setup - Start in 3 minutes with Docker Compose

Quick Start

# Clone the project
git clone https://github.com/rakuv3r/open-context7.git
cd open-context7

# Setup backend configuration
# Get .env.example from API repo and configure it
curl -o .env.example https://raw.githubusercontent.com/rakuv3r/open-context7-api/main/.env.example
cp .env.example .env.dev
# Edit .env.dev with your settings

# Start all services
docker-compose up -d

# Access the application
open http://localhost

That's it! 🎉

Architecture

graph TB
    IDE[Your IDE<br/>Cursor/VS Code] --> MCP[MCP Server<br/>Context Protocol]
    MCP --> WEB[Web UI<br/>Management]
    MCP --> API[FastAPI<br/>Backend]
    API --> QDRANT[Qdrant<br/>Vector Database]
    
    style IDE fill:#e1f5fe
    style MCP fill:#f3e5f5
    style WEB fill:#e8f5e8
    style API fill:#fff3e0
    style QDRANT fill:#fce4ec
Loading

Services

All services are accessible through nginx reverse proxy:

  • Web UI (http://localhost/) - Manage repositories and settings
  • API (http://localhost/api/) - RESTful API for all operations
  • Qdrant (http://localhost/qdrant/) - Vector database dashboard
  • MCP Server - Model Context Protocol integration
  • Nginx - Reverse proxy and load balancer

IDE Integration

Cursor IDE

  1. Open Cursor settings
  2. Add MCP server configuration:
{
  "mcpServers": {
    "open-context7": {
      "command": "npx",
      "args": ["-y", "@rakuv3r/open-context7-mcp"],
      "env": {
        "CONTEXT7_API_BASE_URL": "http://localhost/api"
      }
    }
  }
}

Project Structure

This is the main repository that orchestrates three components:

Configuration

Default ports:

  • Web UI: 3000
  • API: 8000
  • Qdrant: 6333

To customize, edit the docker-compose.yml file.

License

LICENSE


Star this project if you find it useful! ⭐

About

open-context7 -- open source alternative to context7 for private code documentation

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published