### Install context-portal-mcp Package Source: https://github.com/greatscottymac/context-portal/blob/main/v0.2.4_UPDATE_GUIDE.md Use this command to install the new version of the context-portal-mcp package. `uv pip install` is recommended. ```bash uv pip install context-portal-mcp ``` ```bash # Alternatively, using pip: # pip install context-portal-mcp ``` -------------------------------- ### Install Dependencies with uv Source: https://github.com/greatscottymac/context-portal/blob/main/CONTRIBUTING.md Install project dependencies from requirements.txt using uv after activating the virtual environment. ```bash uv pip install -r requirements.txt ``` -------------------------------- ### Install Dependencies with pip Source: https://github.com/greatscottymac/context-portal/blob/main/CONTRIBUTING.md Install project dependencies from requirements.txt using pip after activating the virtual environment. ```bash pip install -r requirements.txt ``` -------------------------------- ### Install Context Portal MCP v0.3.7 via uvx Source: https://github.com/greatscottymac/context-portal/blob/main/RELEASE_NOTES.md Use this command to install version 0.3.7 of the Context Portal MCP using uvx. ```bash uvx --from git+https://github.com/GreatScottyMac/context-portal.git conport-mcp --mode stdio ``` -------------------------------- ### Installation and Server Configuration Source: https://context7.com/greatscottymac/context-portal/llms.txt Instructions on how to install and configure the Context Portal MCP (ConPort) server, including MCP client configuration and running the server in STDIO or HTTP mode. ```APIDOC ## Installation and Server Configuration ConPort can be installed via uvx (recommended) or pip, and runs as an MCP server that communicates with AI assistants through STDIO or HTTP protocols. ### MCP Client Configuration (using uvx) ```json { "mcpServers": { "conport": { "command": "uvx", "args": [ "--from", "context-portal-mcp", "conport-mcp", "--mode", "stdio", "--workspace_id", "/path/to/your/project", "--log-file", "./logs/conport.log", "--log-level", "INFO" ] } } } ``` ### Installation via pip ```bash pip install context-portal-mcp ``` ### Running the Server #### STDIO Mode ```bash conport-mcp --mode stdio --workspace_id "/path/to/project" ``` #### HTTP Mode ```bash conport-mcp --mode http --host 127.0.0.1 --port 8000 ``` *Note: HTTP mode is accessible at `http://localhost:8000/mcp`.* ``` -------------------------------- ### Install Context Portal MCP v0.3.10 via uvx Source: https://github.com/greatscottymac/context-portal/blob/main/RELEASE_NOTES.md Use this command to install version 0.3.10 of the Context Portal MCP using uvx. ```bash uvx --from git+https://github.com/GreatScottyMac/context-portal.git@v0.3.10 conport-mcp --mode stdio ``` -------------------------------- ### Draft Minimal Public Quickstart Document Source: https://github.com/greatscottymac/context-portal/blob/main/conport-custom-instructions/mem4sprint.schema_and_templates.md Creates a draft for a minimal public quickstart document. Replace `` with the workspace ID. The document is tagged as 'public_doc' and 'quickstart', with visibility set to 'public' and status 'DRAFT'. ```javascript mcp0_log_custom_data({ workspace_id: "", category: "artifacts", key: "quickstart", value: { artifact_kind: "doc", title: "Quickstart", tags: ["public_doc","quickstart"], visibility: "public", publish_status: "DRAFT" } }) ``` -------------------------------- ### Install Context Portal MCP v0.3.8 via uvx Source: https://github.com/greatscottymac/context-portal/blob/main/RELEASE_NOTES.md Use this command to install version 0.3.8 of the Context Portal MCP using uvx. ```bash uvx --from git+https://github.com/GreatScottyMac/context-portal.git@v0.3.8 conport-mcp --mode stdio ``` -------------------------------- ### Install Context Portal MCP v0.3.9 via uvx Source: https://github.com/greatscottymac/context-portal/blob/main/RELEASE_NOTES.md Use this command to install version 0.3.9 of the Context Portal MCP using uvx. ```bash uvx --from git+https://github.com/GreatScottyMac/context-portal.git@v0.3.9 conport-mcp --mode stdio ``` -------------------------------- ### Install Context Portal MCP v0.3.11 via uvx Source: https://github.com/greatscottymac/context-portal/blob/main/RELEASE_NOTES.md Use this command to install version 0.3.11 of the Context Portal MCP using uvx. ```bash uvx --from git+https://github.com/GreatScottyMac/context-portal.git@v0.3.11 conport-mcp --mode stdio ``` -------------------------------- ### Install Context Portal MCP v0.3.12 via uvx Source: https://github.com/greatscottymac/context-portal/blob/main/RELEASE_NOTES.md Use this command to install version 0.3.12 of the Context Portal MCP using uvx. ```bash uvx --from git+https://github.com/GreatScottyMac/context-portal.git@v0.3.12 conport-mcp --mode stdio ``` -------------------------------- ### Draft Quickstart Document Source: https://github.com/greatscottymac/context-portal/blob/main/conport-custom-instructions/mem4sprint.schema_and_templates.md Logs a custom data entry for a public quickstart document in draft status. ```APIDOC ## POST /api/mcp/log_custom_data ### Description Logs a custom data entry for a public quickstart document in draft status. ### Method POST ### Endpoint /api/mcp/log_custom_data ### Parameters #### Request Body - **workspace_id** (string) - Required - The absolute workspace path. - **category** (string) - Required - Set to "artifacts". - **key** (string) - Required - Set to "quickstart". - **value** (object) - Required - The quickstart document content. - **artifact_kind** (string) - Required - Set to "doc". - **title** (string) - Required - The title of the quickstart (e.g., "Quickstart"). - **tags** (array) - Required - Array of tags, including "public_doc" and "quickstart". - **visibility** (string) - Required - Set to "public". - **publish_status** (string) - Required - Set to "DRAFT". ``` -------------------------------- ### Install Context Portal MCP v0.3.13 via uvx Source: https://github.com/greatscottymac/context-portal/blob/main/RELEASE_NOTES.md Use this command to install version 0.3.13 of the Context Portal MCP using uvx. ```bash uvx --from git+https://github.com/GreatScottyMac/context-portal.git@v0.3.13 conport-mcp --mode stdio ``` -------------------------------- ### Get CLI Help Source: https://github.com/greatscottymac/context-portal/blob/main/README.md Displays help information for the Context Portal MCP main script when run via uv. ```bash uv run python src/context_portal_mcp/main.py --help ``` -------------------------------- ### Install and Run ConPort Server Source: https://context7.com/greatscottymac/context-portal/llms.txt Install ConPort using pip and run it in either STDIO mode for IDE integration or HTTP mode for broader accessibility. ```bash # Alternative: Install via pip pip install context-portal-mcp # Run in STDIO mode conport-mcp --mode stdio --workspace_id "/path/to/project" # Run in HTTP mode (accessible at http://localhost:8000/mcp) conport-mcp --mode http --host 127.0.0.1 --port 8000 ``` -------------------------------- ### Install Context Portal MCP v0.3.13 via pip Source: https://github.com/greatscottymac/context-portal/blob/main/RELEASE_NOTES.md Use this command to install version 0.3.13 of the Context Portal MCP using pip. ```bash pip install context-portal-mcp ``` -------------------------------- ### Install New Package with uv pip Source: https://github.com/greatscottymac/context-portal/blob/main/v0.2.4_UPDATE_GUIDE.md Use uv pip to install the latest version of the context-portal-mcp package. This is a common step in both automatic and manual migration paths. ```bash uv pip install context-portal-mcp ``` -------------------------------- ### Starting LLM Agent Interaction Source: https://github.com/greatscottymac/context-portal/blob/main/README.md To ensure correct ConPort initialization and context loading, start interactions with a clear directive, especially in interfaces that may not strictly adhere to custom instructions on the first message. ```text Initialize according to custom instructions. ``` -------------------------------- ### Minimal Auto-Detection Configuration Source: https://github.com/greatscottymac/context-portal/blob/main/UNIVERSAL_WORKSPACE_DETECTION.md Use this configuration for minimal setup where auto-detection is enabled by default. ```json { "mcpServers": { "conport": { "command": "uvx", "args": [ "--from", "context-portal-mcp", "conport-mcp", "--mode", "stdio", "--log-level", "INFO" ] } } } ``` -------------------------------- ### Custom Start Path for Workspace Detection Source: https://github.com/greatscottymac/context-portal/blob/main/UNIVERSAL_WORKSPACE_DETECTION.md Use the `--workspace-search-start` flag to specify a custom directory for initiating the workspace search, useful in deep launch scenarios. ```bash conport-mcp --mode stdio --workspace-search-start ../../ ``` -------------------------------- ### Turn Start Fetch Recipes Source: https://github.com/greatscottymac/context-portal/blob/main/conport-custom-instructions/mem4sprint.md Provides recipes for fetching requirements, architecture plans, and top recent decisions for a sprint using ConPort search functions. ```yaml turn_start_fetch_recipes: - name: "fetch_requirements_architecture_plan" calls: | mcp0_search_custom_data_value_fts({ workspace_id: "", query_term: "value_text:\"artifact_kind:doc\" value_text:\"tag:requirements\"", limit: 5 }) mcp0_search_custom_data_value_fts({ workspace_id: "", query_term: "value_text:\"artifact_kind:doc\" value_text:\"tag:architecture\"", limit: 5 }) mcp0_search_custom_data_value_fts({ workspace_id: "", query_term: "value_text:\"artifact_kind:doc\" value_text:\"tag:sprint_plan\" value_text:\"sprint_id:S-YYYY.MM\"", limit: 5 }) - name: "fetch_top_recent_decisions_for_sprint" calls: | mcp0_search_decisions_fts({ workspace_id: "", query_term: "tags:\"S-YYYY.MM\"", limit: 5 }) ``` -------------------------------- ### Get System Patterns Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieves system patterns with optional tag filtering. ```APIDOC ## GET /get_system_patterns ### Description Retrieves system patterns, with optional filtering by tags. ### Method GET ### Endpoint /get_system_patterns ### Query Parameters - **workspace_id** (string) - Required - The ID of the workspace. - **tags_filter_include_any** (array of strings) - Optional - Filters patterns to include any of the specified tags. - **limit** (integer) - Optional - The maximum number of patterns to return. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the pattern. - **name** (string) - The name of the pattern. - **description** (string) - The description of the pattern. - **tags** (array of strings) - Tags associated with the pattern. #### Response Example ```json [ { "id": 1, "name": "Repository Pattern", "description": "Data access layer uses repository pattern...", "tags": ["architecture", "data-access"] }, { "id": 2, "name": "CQRS for Orders", "description": "Order processing uses Command Query Responsibility Segregation...", "tags": ["architecture", "orders"] } ] ``` ``` -------------------------------- ### MCP Client Configuration with uvx Source: https://context7.com/greatscottymac/context-portal/llms.txt Configure the MCP client to connect to the ConPort server using uvx. Ensure the command and arguments match your installation and desired mode. ```json { "mcpServers": { "conport": { "command": "uvx", "args": [ "--from", "context-portal-mcp", "conport-mcp", "--mode", "stdio", "--workspace_id", "/path/to/your/project", "--log-file", "./logs/conport.log", "--log-level", "INFO" ] } } } ``` -------------------------------- ### Get System Patterns Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieves system patterns, with options to filter by tags. Useful for querying documented architectural or coding patterns. ```python # Filter by tags arch_patterns = await mcp.call_tool("get_system_patterns", { "workspace_id": "/path/to/my-project", "tags_filter_include_any": ["architecture", "design-pattern"], "limit": 10 }) ``` ```python # Get all patterns patterns = await mcp.call_tool("get_system_patterns", { "workspace_id": "/path/to/my-project" }) ``` -------------------------------- ### Generic ConPort Strategy for LLMs Source: https://github.com/greatscottymac/context-portal/blob/main/README.md This platform-agnostic strategy file guides LLMs on using ConPort tools, emphasizing dynamic discovery of tool names and parameters via `get_conport_schema` for conceptual interactions. ```text get_conport_schema ``` -------------------------------- ### Get Item History using Python Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieve version history for Product Context or Active Context items using `get_item_history`. Supports fetching recent history, a specific version, or filtering by a timestamp range. ```python # Get recent history history = await mcp.call_tool("get_item_history", { "workspace_id": "/path/to/my-project", "item_type": "product_context", "limit": 5 }) ``` ```python # Get a specific version version_2 = await mcp.call_tool("get_item_history", { "workspace_id": "/path/to/my-project", "item_type": "product_context", "version": 2 }) ``` ```python # Filter by timestamp range recent_changes = await mcp.call_tool("get_item_history", { "workspace_id": "/path/to/my-project", "item_type": "active_context", "after_timestamp": "2025-01-14T00:00:00Z", "before_timestamp": "2025-01-16T00:00:00Z" }) ``` -------------------------------- ### Create Virtual Environment Source: https://github.com/greatscottymac/context-portal/blob/main/README.md Creates a virtual environment using uv. ```bash uv venv ``` -------------------------------- ### Create and Activate Virtual Environment with uv Source: https://github.com/greatscottymac/context-portal/blob/main/CONTRIBUTING.md Create a virtual environment using uv and activate it. This isolates project dependencies. Activation commands differ for Linux/macOS and Windows. ```bash uv venv source .venv/bin/activate # Linux/macOS # .venv\Scripts\activate.bat # Windows Command Prompt # .venv\Scripts\Activate.ps1 # Windows PowerShell ``` -------------------------------- ### Clone the Context Portal Repository Source: https://github.com/greatscottymac/context-portal/blob/main/CONTRIBUTING.md Clone the project repository to your local machine using Git. Navigate into the cloned directory. ```bash git clone https://github.com/GreatScottyMac/context-portal.git cd context-portal ``` -------------------------------- ### Get ConPort Schema Source: https://github.com/greatscottymac/context-portal/blob/main/conport_mcp_deep_dive.md Arguments for retrieving the ConPort tool schema. ```APIDOC ## POST /get_conport_schema ### Description Arguments for retrieving the ConPort tool schema. ### Method POST ### Endpoint /get_conport_schema ### Parameters #### Request Body - **workspace_id** (string) - Required - Identifier for the workspace (e.g., absolute path) ### Request Example { "workspace_id": "/path/to/workspace" } ### Response #### Success Response (200) - **schema** (object) - The ConPort tool schema. #### Response Example { "schema": { "item_types": { "document": { "fields": [ {"name": "title", "type": "string"}, {"name": "content", "type": "string"} ] } } } } ``` -------------------------------- ### Get Item History Source: https://github.com/greatscottymac/context-portal/blob/main/conport_mcp_deep_dive.md Arguments for retrieving history of a context item. ```APIDOC ## POST /get_item_history ### Description Arguments for retrieving history of a context item. ### Method POST ### Endpoint /get_item_history ### Parameters #### Request Body - **workspace_id** (string) - Required - Identifier for the workspace (e.g., absolute path) - **item_type** (string) - Required - Type of the item: 'product_context' or 'active_context' - **limit** (integer) - Optional - Maximum number of history entries to return (most recent first) - **before_timestamp** (string) - Optional - Return entries before this timestamp (format: date-time) - **after_timestamp** (string) - Optional - Return entries after this timestamp (format: date-time) - **version** (integer) - Optional - Return a specific version ### Request Example { "workspace_id": "/path/to/workspace", "item_type": "product_context", "limit": 5, "after_timestamp": "2023-10-27T10:00:00Z" } ### Response #### Success Response (200) - **history** (array of objects) - A list of history entries for the item. - **timestamp** (string) - The timestamp of the history entry. - **version** (integer) - The version of the item. - **change_description** (string) - Description of the change. #### Response Example { "history": [ { "timestamp": "2023-10-27T11:30:00Z", "version": 2, "change_description": "Updated description." }, { "timestamp": "2023-10-27T10:00:00Z", "version": 1, "change_description": "Initial creation." } ] } ``` -------------------------------- ### Run Context Portal Server in STDIO Mode Source: https://github.com/greatscottymac/context-portal/blob/main/conport_mcp_deep_dive.md Use this command to run the server in STDIO mode, suitable for local MCP clients like IDE extensions. The `workspace_id` can be automatically detected if `${workspaceFolder}` is passed literally. ```bash python src/context_portal_mcp/main.py --mode stdio --workspace_id "/path/to/your/workspace" ``` ```bash conport --mode stdio --workspace_id "/path/to/your/workspace" ``` -------------------------------- ### Get ConPort Schema Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieves the JSON schema for all available ConPort tools and their arguments. ```APIDOC ## get_conport_schema ### Description Retrieves the JSON schema for all available ConPort tools and their arguments, useful for AI assistants to understand available capabilities. ### Method `call_tool` ### Endpoint `get_conport_schema` ### Parameters #### Request Body - **workspace_id** (string) - Required - The ID of the workspace. ### Request Example ```json { "workspace_id": "/path/to/my-project" } ``` ### Response #### Success Response (200) - **(object)** - A JSON object where keys are tool names and values are their respective JSON schemas. #### Response Example ```json { "log_decision": { "title": "LogDecisionArgs", "type": "object", "properties": { "workspace_id": {"type": "string", "description": "..."}, "summary": {"type": "string", "minLength": 1}, "rationale": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}} }, "required": ["workspace_id", "summary"] } } ``` ``` -------------------------------- ### GET /custom_data Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieves custom data entries. Supports filtering by category and key. ```APIDOC ## GET /custom_data ### Description Retrieves custom data entries with optional filtering by category and key. ### Method GET ### Endpoint /custom_data ### Parameters #### Query Parameters - **workspace_id** (string) - Required - The ID of the workspace to retrieve data from. - **category** (string) - Optional - Filters the results to a specific category. - **key** (string) - Optional - Filters the results to a specific key within a category. ### Response #### Success Response (200) - **id** (integer) - Unique identifier for the custom data entry. - **timestamp** (string) - ISO 8601 timestamp of when the data was last updated. - **category** (string) - The category of the custom data. - **key** (string) - The key of the custom data entry. - **value** (object) - The actual custom data value, which can be any JSON object. #### Response Example ```json [ { "id": 1, "timestamp": "2025-01-15T10:00:00+00:00", "category": "ProjectGlossary", "key": "SKU", "value": {"definition": "Stock Keeping Unit...", ...} } ] ``` ``` -------------------------------- ### Create and Activate Virtual Environment with venv Source: https://github.com/greatscottymac/context-portal/blob/main/CONTRIBUTING.md Create a virtual environment using Python's built-in venv module and activate it. Activation commands differ for Linux/macOS and Windows. ```bash python3 -m venv .venv # Or 'python -m venv .venv' source .venv/bin/activate # Linux/macOS # .venv\Scripts\activate.bat # Windows Command Prompt # .venv\Scripts\Activate.ps1 # Windows PowerShell ``` -------------------------------- ### Get Recent Activity Summary Source: https://github.com/greatscottymac/context-portal/blob/main/conport_mcp_deep_dive.md Arguments for retrieving a summary of recent ConPort activity. ```APIDOC ## POST /get_recent_activity_summary ### Description Arguments for retrieving a summary of recent ConPort activity. ### Method POST ### Endpoint /get_recent_activity_summary ### Parameters #### Request Body - **workspace_id** (string) - Required - Identifier for the workspace (e.g., absolute path) - **hours_ago** (integer) - Optional - Look back this many hours for recent activity. Mutually exclusive with 'since_timestamp'. - **since_timestamp** (string) - Optional - Look back for activity since this specific timestamp (format: date-time). Mutually exclusive with 'hours_ago'. - **limit_per_type** (integer) - Optional - Maximum number of recent items to show per activity type (e.g., 5 most recent decisions). (Default: 5) ### Request Example { "workspace_id": "/path/to/workspace", "hours_ago": 24, "limit_per_type": 3 } ### Response #### Success Response (200) - **summary** (object) - A summary of recent activity. - **activity_type** (string) - The type of activity (e.g., 'created_item', 'updated_item'). - **items** (array of objects) - List of recent items for this activity type. #### Response Example { "summary": { "created_item": [ { "item_type": "decision", "item_id": "dec003", "timestamp": "2023-10-27T12:00:00Z" } ], "updated_item": [ { "item_type": "document", "item_id": "doc123", "timestamp": "2023-10-27T11:30:00Z" } ] } } ``` -------------------------------- ### Get Workspace Detection Info Source: https://context7.com/greatscottymac/context-portal/llms.txt Provides diagnostic information about workspace detection for debugging and verification. ```APIDOC ## get_workspace_detection_info ### Description Provides diagnostic information about workspace detection for debugging and verification. ### Method `call_tool` ### Endpoint `get_workspace_detection_info` ### Parameters #### Request Body - **start_path** (string) - Required - The starting path for workspace detection. ### Request Example ```json { "start_path": "/path/to/project/src" } ``` ### Response #### Success Response (200) - **start_path** (string) - The path from which detection started. - **detected_workspace** (string) - The path of the detected workspace. - **detection_method** (string) - The method used for detection. - **indicators_found** (array) - List of indicators found during detection. - **server_version** (string) - The version of the server. - **detection_timestamp** (string) - The timestamp of the detection. - **auto_detection_available** (boolean) - Whether auto-detection is available. #### Response Example ```json { "start_path": "/path/to/project/src", "detected_workspace": "/path/to/project", "detection_method": "strong_indicators", "indicators_found": ["package.json", ".git"], "server_version": "0.3.13", "detection_timestamp": "2025-01-15T10:00:00.000000", "auto_detection_available": true } ``` ``` -------------------------------- ### Context Budget Checklist Source: https://github.com/greatscottymac/context-portal/blob/main/conport-custom-instructions/mem4sprint.md Defines items to keep in AI context and items to fetch from ConPort to manage the context budget effectively. ```yaml context_budget_checklist: keep_in_ai_context_only: - "active_context: { mode, sprint_id, focus }" - "Current goal/story/subtasks: IDs + 1-line summaries" - "Top blockers (<=3) with owners" - "Latest decisions (<=3) relevant to task" - "IDs/tags to fetch key docs (requirements, architecture, sprint_plan)" fetch_from_conport: - "All docs (artifact_kind: doc), RFCs, literature refs" - "Full decision log, progress history, metrics" - "Broader backlog stories beyond those active" ``` -------------------------------- ### Get Decisions API Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieves logged decisions with optional filtering by tags and limit on results returned. ```APIDOC ## GET /get_decisions ### Description Retrieves logged decisions with optional filtering by tags and limit on results returned. ### Method GET ### Endpoint /get_decisions ### Parameters #### Query Parameters - **workspace_id** (string) - Required - The ID of the workspace. - **limit** (integer) - Optional - The maximum number of decisions to return. - **tags_filter_include_all** (array of strings) - Optional - Filters decisions that have ALL specified tags. - **tags_filter_include_any** (array of strings) - Optional - Filters decisions that have ANY of the specified tags. ### Request Example ```json { "workspace_id": "/path/to/my-project", "limit": 10 } ``` ```json { "workspace_id": "/path/to/my-project", "tags_filter_include_all": ["authentication", "security"] } ``` ```json { "workspace_id": "/path/to/my-project", "tags_filter_include_any": ["database", "api", "architecture"], "limit": 5 } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the decision. - **timestamp** (string) - The timestamp when the decision was logged. - **summary** (string) - The summary of the decision. - **rationale** (string) - The rationale for the decision. - **tags** (array of strings) - Tags associated with the decision. #### Response Example ```json [ { "id": 3, "timestamp": "2025-01-15T14:20:00+00:00", "summary": "Use PostgreSQL with read replicas", "rationale": "Need high read throughput for product catalog...", "tags": ["database", "architecture"] }, { "id": 2, "timestamp": "2025-01-15T12:00:00+00:00", "summary": "RESTful API design with OpenAPI spec", "rationale": "Standard REST patterns enable better tooling...", "tags": ["api", "architecture"] } ] ``` ``` -------------------------------- ### Get Subtasks of a Specific Parent Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieves a list of subtasks associated with a given parent task ID, with optional limits. ```APIDOC ## GET /get_progress ### Description Retrieves subtasks of a specific parent task. ### Method GET ### Endpoint /get_progress ### Query Parameters - **workspace_id** (string) - Required - The ID of the workspace. - **parent_id_filter** (integer) - Required - The ID of the parent task to filter subtasks by. - **limit** (integer) - Optional - The maximum number of subtasks to return. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the subtask. - **timestamp** (string) - The timestamp when the subtask was created or last updated. - **status** (string) - The current status of the subtask (e.g., DONE, IN_PROGRESS). - **description** (string) - A description of the subtask. - **parent_id** (integer) - The ID of the parent task. #### Response Example ```json [ { "id": 2, "timestamp": "2025-01-15T11:00:00+00:00", "status": "DONE", "description": "Create JWT token generation service", "parent_id": 1 }, { "id": 3, "timestamp": "2025-01-15T11:30:00+00:00", "status": "IN_PROGRESS", "description": "Add token validation middleware", "parent_id": 1 } ] ``` ``` -------------------------------- ### Get Project Subtasks Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieves subtasks associated with a specific parent task. Useful for tracking the progress of a larger initiative. ```python subtasks = await mcp.call_tool("get_progress", { "workspace_id": "/path/to/my-project", "parent_id_filter": 1, "limit": 20 }) ``` -------------------------------- ### uvx Configuration for MCP Client Source: https://github.com/greatscottymac/context-portal/blob/main/README.md Recommended configuration for most IDEs using uvx to run the ConPort server. It includes arguments for source, destination, mode, workspace ID, and logging. ```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" ] } } } ``` -------------------------------- ### Get Progress API Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieves progress entries with optional filtering by status, parent task ID, and result limit. ```APIDOC ## GET /get_progress ### Description Retrieves progress entries with optional filtering by status, parent task ID, and result limit. ### Method GET ### Endpoint /get_progress ### Parameters #### Query Parameters - **workspace_id** (string) - Required - The ID of the workspace. - **status_filter** (string) - Optional - Filters progress entries by status (e.g., "IN_PROGRESS"). - **parent_id_filter** (integer) - Optional - Filters progress entries by parent task ID. - **limit** (integer) - Optional - The maximum number of results to return. ### Request Example ```json { "workspace_id": "/path/to/my-project", "status_filter": "IN_PROGRESS" } ``` ``` -------------------------------- ### Dynamic Context Retrieval for RAG Source: https://github.com/greatscottymac/context-portal/blob/main/conport-custom-instructions/mem4sprint.md Outlines the steps for retrieving specific project knowledge for RAG. It includes analyzing the query, retrieving narrowly, handling sparse results, and synthesizing context. ```yaml dynamic_context_retrieval_for_rag: trigger: "Need specific project knowledge to answer/generate." steps: - "Analyze query: entities/terms/item types needed." - "Retrieve narrowly: search_decisions_fts, search_custom_data_value_fts, search_project_glossary_fts." - "If specific items/IDs implied: get_custom_data/get_decisions/get_system_patterns/get_progress." - "Fallback if sparse: get_product_context or get_active_context (be brief)." - "Optionally 1-hop expand: get_linked_items for top candidates." - "Sift + synthesize concise context; attribute sources briefly." note: "Prefer semantic_search_conport for conceptual queries when keywords are weak. Keep retrieved context small and targeted." ``` -------------------------------- ### Build Docker Image Manually Source: https://github.com/greatscottymac/context-portal/blob/main/CONTRIBUTING.md Manually build the Docker image using the 'docker build' command. Tag with 'latest' or a specific version. ```bash docker build -t greatscottymac/context-portal-mcp:latest . ``` ```bash # docker build -t greatscottymac/context-portal-mcp:vX.Y.Z . ``` -------------------------------- ### Get Linked Items Source: https://github.com/greatscottymac/context-portal/blob/main/conport_mcp_deep_dive.md Retrieves links connected to a specific ConPort item, allowing traversal of the project knowledge graph. ```APIDOC ## POST /get_linked_items ### Description Arguments for retrieving links connected to a specific ConPort item, allowing traversal of the project knowledge graph. ### Method POST ### Endpoint /get_linked_items ### Parameters #### Request Body - **workspace_id** (string) - Required - Identifier for the workspace (e.g., absolute path) - **item_type** (string) - Required - Type of the item to find links for (e.g., 'decision') - **item_id** (string) - Required - ID or key of the item to find links for - **relationship_type_filter** (string) - Optional - Filter by relationship type - **linked_item_type_filter** (string) - Optional - Filter by the type of the linked items - **limit** (integer) - Optional - Maximum number of links to return ### Request Example { "workspace_id": "/path/to/workspace", "item_type": "document", "item_id": "doc123", "relationship_type_filter": "satisfies", "limit": 10 } ### Response #### Success Response (200) - **links** (array of objects) - A list of links connected to the item. - **relationship_type** (string) - The type of relationship. - **linked_item_type** (string) - The type of the linked item. - **linked_item_id** (string) - The ID of the linked item. - **description** (string) - Description of the link. #### Response Example { "links": [ { "relationship_type": "satisfies", "linked_item_type": "requirement", "linked_item_id": "req456", "description": "This document satisfies the requirement." } ] } ``` -------------------------------- ### Build Docker Image using build.ps1 Source: https://github.com/greatscottymac/context-portal/blob/main/CONTRIBUTING.md Use this PowerShell script for building the Docker image on Windows. It automates the build and tagging process. ```powershell ./build.ps1 ``` -------------------------------- ### Run Context Portal Server in HTTP Mode Source: https://github.com/greatscottymac/context-portal/blob/main/conport_mcp_deep_dive.md Execute this command to run the server as an HTTP service using Uvicorn. The MCP endpoint is typically available at `/mcp`. ```bash uvicorn src.context_portal_mcp.main:app --host 127.0.0.1 --port 8000 ``` ```bash conport --mode http --host 127.0.0.1 --port 8000 ``` -------------------------------- ### Retrieve Project Product Context Source: https://context7.com/greatscottymac/context-portal/llms.txt Use the `get_product_context` tool to retrieve high-level, static project information. Requires a `workspace_id`. ```python # MCP Tool Call result = await mcp.call_tool("get_product_context", { "workspace_id": "/path/to/my-project" }) # Response { "project_goal": "Build a scalable e-commerce platform", "key_features": [ "User authentication", "Product catalog", "Shopping cart", "Payment processing" ], "architecture": "Microservices with event-driven communication", "tech_stack": { "frontend": "React", "backend": "Python FastAPI", "database": "PostgreSQL" } } ``` -------------------------------- ### Get Workspace Detection Info Source: https://context7.com/greatscottymac/context-portal/llms.txt Obtain diagnostic information about workspace detection. This tool is useful for debugging and verifying how a project workspace is identified. ```python info = await mcp.call_tool("get_workspace_detection_info", { "start_path": "/path/to/project/src" }) ``` -------------------------------- ### Get Recent Activity Summary Source: https://context7.com/greatscottymac/context-portal/llms.txt Retrieves a summary of recent activity within a workspace, either from the last 24 hours or since a specific timestamp. ```APIDOC ## Get Recent Activity Summary ### Description Retrieves a summary of recent activity within a workspace. This can be filtered by a time range (last 24 hours) or a specific timestamp. ### Method `call_tool` ### Endpoint `get_recent_activity_summary` ### Parameters #### Request Body - **workspace_id** (string) - Required - The ID of the workspace. - **hours_ago** (integer) - Optional - Number of hours to look back for activity. - **since_timestamp** (string) - Optional - ISO 8601 timestamp to retrieve activity since. - **limit_per_type** (integer) - Optional - Maximum number of items to return per activity type. ### Request Example (Last 24 hours) ```json { "workspace_id": "/path/to/my-project", "hours_ago": 24, "limit_per_type": 5 } ``` ### Request Example (Since Timestamp) ```json { "workspace_id": "/path/to/my-project", "since_timestamp": "2025-01-14T00:00:00Z", "limit_per_type": 10 } ``` ### Response #### Success Response (200) - **recent_decisions** (array) - List of recent decisions. - **recent_progress** (array) - List of recent progress items. - **recent_system_patterns** (array) - List of recent system patterns. - **recent_custom_data** (array) - List of recent custom data entries. #### Response Example ```json { "recent_decisions": [ {"id": 5, "summary": "Use GraphQL for mobile API", "timestamp": "..."} ], "recent_progress": [ {"id": 12, "status": "DONE", "description": "Completed auth flow"} ], "recent_system_patterns": [], "recent_custom_data": [ {"category": "api_endpoints", "key": "POST /graphql"} ] } ``` ``` -------------------------------- ### Create RFC Document Source: https://github.com/greatscottymac/context-portal/blob/main/conport-custom-instructions/mem4sprint.schema_and_templates.md Logs a new RFC document. Ensure `` is replaced with the workspace ID and `` with the RFC's unique identifier. The `link_or_path` should point to the RFC file. ```javascript mcp0_log_custom_data({ workspace_id: "", category: "rfc_doc", key: "", value: { title: "", link_or_path: "mdc:/tasks/rfc/<file>.md", status: "draft", tags: ["rfc"], provenance: { agent: "architect", tool: "mem4sprint", ts: "" } } }) ``` -------------------------------- ### Find and Terminate Processes on Linux/macOS Source: https://github.com/greatscottymac/context-portal/blob/main/v0.2.4_UPDATE_GUIDE.md Use these commands in Bash or Zsh to find the context_portal_mcp.main process by its PID and terminate it. ```bash ps aux | grep context_portal_mcp.main kill <PID> ```