Context Portal (ConPort) is a database-backed Model Context Protocol (MCP) server that functions as your project's memory bank. It stores structured project context like decisions, tasks, and architectural patterns to help AI assistants provide more accurate and relevant responses to your project-specific queries.
ConPort stores and manages your project information in a structured database, making it easier for AI assistants to access and reference your project's specific details. It builds a project-specific knowledge graph that captures entities and their relationships, enhanced by vector embeddings for semantic search. This enables more intelligent, context-aware AI assistance through Retrieval Augmented Generation (RAG).
Before installing ConPort, ensure you have:
The simplest way to install and run ConPort is using uvx
to execute the package directly from PyPI.
Add the following to your MCP client settings (e.g., mcp_settings.json
):
{
"mcpServers": {
"conport": {
"command": "uvx",
"args": [
"--from",
"context-portal-mcp",
"conport-mcp",
"--mode",
"stdio",
"--log-file",
"./logs/conport.log",
"--log-level",
"INFO"
]
}
}
}
Important Notes:
${workspaceFolder}
when launching MCP servers--workspace_id
or omit it and rely on per-call workspace_id
(recommended)--log-file
path defines where server logs will be written--log-level
to DEBUG
for more verbose output during troubleshootingConPort can automatically determine the correct workspace_id
without requiring an absolute path in your configuration:
{
"mcpServers": {
"conport": {
"command": "uvx",
"args": [
"--from", "context-portal-mcp",
"conport-mcp",
"--mode", "stdio",
"--log-level", "INFO"
]
}
}
}
To disable automatic detection and force using provided IDs only:
{
"mcpServers": {
"conport": {
"command": "uvx",
"args": [
"--from", "context-portal-mcp",
"conport-mcp",
"--mode", "stdio",
"--no-auto-detect",
"--workspace_id", "/absolute/path/to/project"
]
}
}
}
ConPort works best when your LLM agent has specific instructions on how to use it. The repository includes tailored strategy files for different environments:
roo_code_conport_strategy
cline_conport_strategy
cascade_conport_strategy
generic_conport_strategy
To use these strategy files:
When starting a new session, it's a good practice to tell the LLM:
Initialize according to custom instructions.
When first using ConPort in a project, consider creating a projectBrief.md
file in your workspace root with an overview of your project. When an LLM agent initializes, it will detect this file and offer to import its content into ConPort's Product Context.
ConPort provides numerous tools for managing project context:
get_product_context
: Retrieves overall project informationupdate_product_context
: Updates the product contextget_active_context
: Retrieves current working focusupdate_active_context
: Updates the active contextlog_decision
: Records architectural or implementation decisionsget_decisions
: Retrieves logged decisionssearch_decisions_fts
: Full-text search across decisionsdelete_decision_by_id
: Removes a specific decisionlog_progress
: Records progress or task statusget_progress
: Retrieves progress entriesupdate_progress
: Updates an existing progress entrydelete_progress_by_id
: Removes a progress entrylog_system_pattern
: Records coding patternsget_system_patterns
: Retrieves system patternsdelete_system_pattern_by_id
: Removes a patternlog_custom_data
: Stores custom key-value entriesget_custom_data
: Retrieves custom datadelete_custom_data
: Removes custom datasearch_project_glossary_fts
: Searches within project glossarysearch_custom_data_value_fts
: Full-text search across all custom datalink_conport_items
: Creates relationships between itemsget_linked_items
: Retrieves linked itemsget_item_history
: Shows version historyget_recent_activity_summary
: Summarizes recent activityget_conport_schema
: Returns available tools and argumentsexport_conport_to_markdown
: Exports data to markdownimport_markdown_to_conport
: Imports from markdownbatch_log_items
: Logs multiple items in one callAll tools require a workspace_id
argument to specify the target project workspace.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "conport" '{"command":"uvx","args":["--from","context-portal-mcp","conport-mcp","--mode","stdio","--workspace_id","${workspaceFolder}","--log-file","./logs/conport.log","--log-level","INFO"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"conport": {
"command": "uvx",
"args": [
"--from",
"context-portal-mcp",
"conport-mcp",
"--mode",
"stdio",
"--workspace_id",
"${workspaceFolder}",
"--log-file",
"./logs/conport.log",
"--log-level",
"INFO"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"conport": {
"command": "uvx",
"args": [
"--from",
"context-portal-mcp",
"conport-mcp",
"--mode",
"stdio",
"--workspace_id",
"${workspaceFolder}",
"--log-file",
"./logs/conport.log",
"--log-level",
"INFO"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect