Context Portal

Context Portal

greatscottymac
GitHubnpm

About

Context Portal (ConPort) is a database-backed MCP server that acts as a memory bank for AI assistants, building a project-specific knowledge graph to enable powerful Retrieval Augmented Generation (RAG) workflows within your IDE.

What It Does

  • Stores structured project context (decisions, progress, architecture, tasks, glossaries) in a SQLite database per workspace
  • Builds a knowledge graph capturing entities and their relationships
  • Provides vector embeddings and semantic search for intelligent context retrieval
  • Enables AI assistants to access precise, up-to-date project information for context-aware responses
  • Supports prompt caching with compatible LLM providers through structured context
  • Manages schema evolution via Alembic migrations
  • Replaces file-based memory systems with a queryable, reliable database backend

Key Features

  • Multi-workspace support with automatic workspace detection
  • Product & Active Context Management for project goals, features, architecture, and current focus
  • Decision Logging with full-text search across summaries, rationale, implementation details, and tags
  • Progress Tracking with hierarchical task management and item linking
  • System Pattern Management for coding patterns and architectural conventions
  • Custom Data Storage with category-based organization and FTS search
  • Context Linking to explicitly build relationships in the knowledge graph
  • History & Versioning for Product and Active Context
  • Import/Export to/from Markdown files
  • Batch Operations for efficient bulk logging

Available Tools

Product Context

  • get_product_context - Retrieve overall project goals, features, and architecture
  • update_product_context - Update product context (full or partial patch with __DELETE__ support)

Active Context

  • get_active_context - Retrieve current working focus, recent changes, and open issues
  • update_active_context - Update active context (full or partial patch)

Decision Logging

  • log_decision - Log architectural/implementation decisions with summary, rationale, details, tags
  • get_decisions - Retrieve decisions with tag filtering (include_all/include_any)
  • search_decisions_fts - Full-text search across decision fields
  • delete_decision_by_id - Delete decision by ID

Progress Tracking

  • log_progress - Log progress entry/task with status, description, parent_id, item linking
  • get_progress - Retrieve progress entries with status/parent filtering
  • update_progress - Update existing progress entry
  • delete_progress_by_id - Delete progress entry by ID

System Patterns

  • log_system_pattern - Log/update system or coding pattern with tags
  • get_system_patterns - Retrieve patterns with tag filtering
  • delete_system_pattern_by_id - Delete pattern by ID

Custom Data

  • log_custom_data - Store/update custom key-value under category (JSON-serializable)
  • get_custom_data - Retrieve custom data by category/key
  • delete_custom_data - Delete specific custom data entry
  • search_project_glossary_fts - FTS search within 'ProjectGlossary' category
  • search_custom_data_value_fts - FTS search across all custom data

Knowledge Graph

  • link_conport_items - Create relationship link between two items (builds knowledge graph)
  • get_linked_items - Retrieve items linked to a specific item with relationship filtering

History & Meta

  • get_item_history - Retrieve version history for Product/Active Context
  • get_recent_activity_summary - Summary of recent ConPort activity
  • get_conport_schema - Retrieve schema of available tools and arguments
  • get_workspace_detection_info - Diagnostic info about workspace detection

Import/Export

  • export_conport_to_markdown - Export ConPort data to markdown files
  • import_markdown_to_conport - Import data from markdown files

Batch

  • batch_log_items - Log multiple items of same type in single call

Usage Tips

Automatic Workspace Detection

ConPort auto-detects the correct workspace by searching for project indicators (.git, package.json, pyproject.toml, etc.). Detection is enabled by default and works even if your IDE doesn't expand ${workspaceFolder}. Use --no-auto-detect to disable.

Custom Instructions

The repo includes tailored strategy files for different IDEs:

  • roo_code_conport_strategy - For Roo Code
  • cline_conport_strategy - For CLine
  • cascade_conport_strategy - For Windsurf Cascade
  • generic_conport_strategy - Platform-agnostic
  • mem4sprint strategy set - Sprint planning patterns with flat categories

Copy the appropriate file's content into your LLM's custom instructions to guide it on ConPort usage.

Initial Setup

Create a projectBrief.md in your workspace root with project overview, goals, features, and architecture. LLM agents will offer to import it as initial Product Context.

Compatible IDEs

Works with any MCP-capable IDE including Roo Code, CLine, Windsurf Cascade, and Cursor.

For detailed architecture, advanced patterns, migration guides, and troubleshooting, see the full documentation in the repository.

This server runs through your single 1Server connection. No extra config required.

0Installs
764Stars

Categories

AI ToolsDevelopmentProductivity