Skip to content

contextforge-org/contextforge-desktop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

89 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Context Forge Electron

A desktop application for managing MCP (Model Context Protocol) servers, tools, prompts, and resources. Built with Electron, React, TypeScript, and Python.

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Python 3.8+
  • Git

Setup

  1. Clone the repository

    git clone <repository-url>
    cd context-forge-electron
  2. Install Node dependencies

    npm install
  3. Build the Python backend

    cd python
    
    # On macOS/Linux:
    ./build.sh
    
    # On Windows:
    build.bat
  4. Start the application

    # From the root directory
    npm start

That's it! The app will launch with the Python backend integrated.

πŸ“¦ Building for Production

# Package the application
npm run package

# Create distributable installers
npm run make

Built applications will be in the out/ directory.

πŸ—οΈ Project Structure

context-forge-electron/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”œβ”€β”€ ui/             # Reusable UI components (Radix UI)
β”‚   β”‚   └── *.tsx           # Feature components
β”‚   β”œβ”€β”€ hooks/              # Custom React hooks
β”‚   β”œβ”€β”€ context/            # React contexts (Theme, Team)
β”‚   β”œβ”€β”€ lib/                # Utilities and libraries
β”‚   β”‚   β”œβ”€β”€ api/           # API client layer
β”‚   β”‚   └── contextforge-client-ts/  # Generated API client
β”‚   β”œβ”€β”€ types/              # TypeScript type definitions
β”‚   β”œβ”€β”€ services/           # Application services
β”‚   β”œβ”€β”€ main.ts             # Electron main process
β”‚   β”œβ”€β”€ preload.ts          # Electron preload script
β”‚   └── app.tsx             # React app root
β”œβ”€β”€ python/                 # Python backend
β”‚   β”œβ”€β”€ build.sh           # Build script (macOS/Linux)
β”‚   β”œβ”€β”€ build.bat          # Build script (Windows)
β”‚   └── dist/              # Built backend executable
β”œβ”€β”€ assets/                 # Static assets (icons, images)
β”œβ”€β”€ docs/                   # Documentation
└── forge.config.ts         # Electron Forge configuration

🎯 Features

MCP Server Management

  • View, create, edit, and delete MCP servers
  • Toggle server status (active/inactive)
  • Filter by tags, visibility, and team
  • Grid and table view modes

Virtual Servers

  • Manage virtual server configurations
  • Associate tools, resources, and prompts
  • Configure transport and authentication

Tools Management

  • Browse and manage available tools
  • Test tools with custom parameters
  • Bulk import from JSON
  • Filter by annotations, types, and methods

Prompts Management

  • Create and manage prompt templates
  • Define template variables
  • Execute prompts with arguments
  • Track execution metrics

Resources Management

  • Browse and manage MCP resources
  • View resource metadata and content
  • Filter and search capabilities

Catalog Integration

  • Browse MCP server catalog
  • Install servers from catalog
  • View server details and documentation

LLM Playground

  • Interactive chat interface
  • Test prompts and tools
  • Multiple LLM provider support
  • Conversation history

Settings & Administration

  • Multi-profile support with OAuth
  • User management with RBAC
  • Team management
  • API token generation
  • Permission management

Observability & Metrics

  • Real-time metrics dashboard
  • Performance monitoring
  • Activity tracking
  • Security insights

🐍 Python Backend

The Python backend is automatically managed by the application:

  • Auto-start: Backend starts when the app launches
  • Tray control: Start/stop from system tray menu
  • Status monitoring: View PID and uptime
  • Graceful shutdown: Automatic cleanup on app quit

The backend provides:

  • MCP server catalog management
  • Server configuration validation
  • Plugin system support
  • Local API endpoints

See python/README.md for backend-specific documentation.

πŸ”§ Configuration

Environment Variables

Create a .env file in the root directory (optional):

# API Configuration
VITE_API_URL=http://localhost:4444

# Development
VITE_LOG_LEVEL=info
VITE_ENABLE_DEVTOOLS=true

Backend API

The application can connect to an external backend API at http://localhost:4444 by default. This is optional - the built-in Python backend provides core functionality.

πŸ› οΈ Development

Available Scripts

  • npm start - Start development server with hot reload
  • npm run package - Package the app for distribution
  • npm run make - Create platform-specific installers
  • npm run publish - Publish the app
  • npm run lint - Run ESLint
  • npm run lint -- --fix - Fix linting issues

Tech Stack

  • Frontend: React 19, TypeScript, Tailwind CSS
  • UI Components: Radix UI, Lucide Icons, shadcn/ui
  • Desktop: Electron 39, Electron Forge
  • Build: Vite 7
  • Backend: Python 3.8+ with FastAPI
  • State Management: React Context + Hooks

πŸ“ Documentation

πŸ§ͺ Testing

# Run linter
npm run lint

# Fix linting issues
npm run lint -- --fix

Note: Comprehensive test suite to be added

πŸ” Security

  • Profile credentials stored securely using Electron's safeStorage API
  • OAuth 2.0 support for authentication
  • HTTPS recommended for production API endpoints
  • Input validation on all user inputs
  • Role-based access control (RBAC)

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

Apache License 2.0 - see LICENSE file for details

πŸ‘€ Author

Rynne Whitnah ([email protected])

πŸ—ΊοΈ Roadmap

  • Add comprehensive test coverage
  • Implement error boundaries
  • Upgrade to TypeScript 5.7+
  • Add CI/CD pipeline
  • Enhanced plugin system
  • Advanced metrics and analytics
  • Component library/Storybook
  • Mobile companion app

πŸ’¬ Support

For issues and questions, please open an issue on GitHub.

About

ContextForge Desktop App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages