home / mcp / context portal mcp server

Context Portal MCP Server

Context Portal (ConPort): A memory bank MCP server building a project-specific knowledge graph to supercharge AI assistants. Enables powerful Retrieval Augmented Generation (RAG) for context-aware development in your IDE.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "greatscottymac-context-portal": {
      "command": "uvx",
      "args": [
        "--from",
        "context-portal-mcp",
        "conport-mcp",
        "--mode",
        "stdio",
        "--workspace_id",
        "${workspaceFolder}",
        "--log-file",
        "./logs/conport.log",
        "--log-level",
        "INFO"
      ]
    }
  }
}

Context Portal MCP (ConPort) is a memory-backed MCP server that lets you store, organize, and retrieve project context. It builds a structured, queryable knowledge base for your AI assistants and developer tools, enabling precise retrieval, better prompting, and efficient context management across workspaces.

How to use

You use ConPort through an MCP client that talks to the ConPort MCP server. Start the server in STDIO mode so it can integrate tightly with your IDE or toolchain. Provide a workspace identifier so the server can create and manage a dedicated SQLite database for that project. Use the available tools to store and update the Product Context, Active Context, decisions, progress, and custom data, and link items to build a connected project knowledge graph. Leverage semantic search and vector storage to power Retrieval Augmented Generation (RAG) in your AI assistants.

Common workflows include: - Initialize the workspace and load existing project context. - Import initial product information from a project brief or manual entry. - Log architectural decisions and progress updates as your project evolves. - Update and query the product and active contexts to keep AI agents aligned with the latest state of the project. - Use the search and link capabilities to discover related decisions, tasks, and glossary terms.

How to install

Prerequisites: install Python 3.8 or higher and a fast Python environment manager if you use one (recommended). Ensure Python is accessible from your PATH.

Install the MCP server using your preferred method (examples below rely on a Python-based distribution via a wrapper tool). The most straightforward approach is to run the server through the package’s standard runtime launcher, which handles environment setup for you.

Recommended setup (STDIO, local development): use the following configuration to run ConPort from your MCP client or IDE. The server runs in STDIO mode and uses a workspace_id to scope data to your project.

Additional sections

Configuration and deployment details help you tailor ConPort to your IDEs and workflows. For IDE integration, you typically specify the MCP server as a STDIO process and let it manage log location and verbosity. The server creates an SQLite database per workspace automatically if it does not yet exist. By default, log data is written to stderr, but you can direct logs to a file for persistent debugging.

Security and best practices: keep workspace_ids stable per project, enable automatic workspace detection to avoid hard-coding paths, and use a clear strategy for initializing project context. When you start an interaction, you can initialize with explicit instructions to ensure the agent loads context as designed.

Troubleshooting tips: check that the workspace_id you provide matches your project location, verify log levels are appropriate for debugging, and use the context tools to inspect product and active contexts, decisions, and progress. If the initial import prompt appears, you can import projectBrief.md content to bootstrap your Product Context.

Project content management overview

ConPort stores structured data in a project-specific knowledge graph. It supports vector embeddings for semantic search and provides a comprehensive set of tools for interacting with product context, active context, decisions, progress, and custom data. You can link items to express relationships and build a connected map of your project.”

Available tools

get_product_context

Retrieves the overall project goals, features, and architecture.

update_product_context

Updates the product context with new or revised information, supporting full replacement or patch-style updates.

get_active_context

Retrieves the current working focus, recent changes, and open issues.

update_active_context

Updates the active context with new or revised information, or performs partial updates.

log_decision

Logs an architectural or implementation decision with optional rationale and details.

get_decisions

Retrieves logged decisions with optional limits and tag filters.

search_decisions_fts

Performs a full-text search across decision fields such as summary, rationale, and details.

delete_decision_by_id

Deletes a decision by its unique ID.

log_progress

Logs a progress entry or task status with optional links to related items.

get_progress

Retrieves progress entries with optional filters.

update_progress

Updates an existing progress entry by ID.

delete_progress_by_id

Deletes a progress entry by ID.

log_system_pattern

Logs or updates a system or coding pattern.

get_system_patterns

Retrieves stored system patterns with optional tag filters.

delete_system_pattern_by_id

Deletes a system pattern by its ID.

log_custom_data

Stores or updates a custom key-value entry under a category.

get_custom_data

Retrieves custom data by category and/or key.

delete_custom_data

Deletes a specific custom data entry.

search_project_glossary_fts

Full-text search within the ProjectGlossary custom data category.

search_custom_data_value_fts

Full-text search across all custom data values, categories, and keys.

link_conport_items

Creates a relationship link between two ConPort items to build the project knowledge graph.

get_linked_items

Retrieves items linked to a specific item by relationship type.

get_item_history

Retrieves version history for Product or Active Context.

get_recent_activity_summary

Provides a summary of recent ConPort activity.

get_conport_schema

Retrieves the schema of available ConPort tools and their arguments.

export_conport_to_markdown

Exports ConPort data to markdown files.

import_markdown_to_conport

Imports data from markdown files into ConPort.

batch_log_items

Logs multiple items of the same type in a single call.