ConPort is a database-backed Model Context Protocol (MCP) server that serves as a "memory bank" for your software projects. It stores structured project information like decisions, tasks, and architecture patterns, allowing AI assistants to understand your project better and provide more relevant responses.
ConPort creates a project-specific knowledge graph with:
Before installing ConPort, ensure you have:
The easiest 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",
"--workspace_id",
"${workspaceFolder}",
"--log-file",
"./logs/conport.log",
"--log-level",
"INFO"
]
}
}
}
Key parameters:
--workspace_id
: The absolute path to your project (typically using the ${workspaceFolder}
IDE variable)--log-file
: Optional path for server logs--log-level
: Sets logging verbosity (DEBUG, INFO, WARNING, ERROR, CRITICAL)If you want to work with the source code:
Clone the repository:
git clone https://github.com/GreatScottyMac/context-portal.git
cd context-portal
Create and activate a virtual environment:
uv venv
source .venv/bin/activate # Linux/macOS
# Or for Windows: .venv\Scripts\activate.bat
Install dependencies:
uv pip install -r requirements.txt
Verify installation:
uv run python src/context_portal_mcp/main.py --help
To get the most out of ConPort, provide custom instructions to your LLM agents. ConPort includes ready-made strategy files for different environments:
roo_code_conport_strategy
cline_conport_strategy
cascade_conport_strategy
generic_conport_strategy
To use these strategy files:
Initialize according to custom instructions.
When using ConPort with a new project:
Create a Project Brief: Add a projectBrief.md
file to your project root with:
Let the LLM Import It: When you start your LLM session, it will detect the file and offer to import it into ConPort's Product Context.
ConPort provides these MCP tools (all require workspace_id
parameter):
get_product_context
: Retrieves project goals, features, and architectureupdate_product_context
: Updates product contextget_active_context
: Retrieves current focus, changes, and issuesupdate_active_context
: Updates active contextlog_decision
: Records project decisionsget_decisions
: Retrieves logged decisionssearch_decisions_fts
: Full-text search across decisionsdelete_decision_by_id
: Removes a decisionlog_progress
: Records progress or task statusget_progress
: Retrieves progress entriesupdate_progress
: Updates progress entriesdelete_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 dataget_custom_data
: Retrieves custom datadelete_custom_data
: Removes custom datasearch_project_glossary_fts
: Searches project glossarysearch_custom_data_value_fts
: Searches all custom datalink_conport_items
: Creates relationships between itemsget_linked_items
: Retrieves linked itemsget_item_history
: Retrieves version historyget_recent_activity_summary
: Summarizes recent activityget_conport_schema
: Retrieves available tools schemaexport_conport_to_markdown
: Exports data to markdownimport_markdown_to_conport
: Imports from markdownbatch_log_items
: Logs multiple items in a single callTo 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