Skip to main content
The Cogniscape MCP is a read-only server that exposes your Cogniscape knowledge graph to AI assistants via the Model Context Protocol. It provides seven tools for querying development activity, entities, relationships, lifecycle timelines, and AI costs — plus six built-in prompts for common workflows. Any MCP-compatible client can connect: Claude Code, Claude Desktop, OpenAI Codex, Cursor, and others.

Transport

The Cogniscape MCP uses Streamable HTTP as its transport. Every request must include your customer key as a query parameter: ?customer_key=YOUR_KEY. This is how the server resolves your tenant and isolates your data. Clients that support Streamable HTTP natively — such as Claude Code, Claude Desktop, OpenAI Codex, and Cursor — can connect directly. For clients that only support stdio, use mcp-remote as a bridge.

Tools

The Cogniscape MCP exposes seven tools that AI assistants can call to retrieve data from your knowledge graph.

get_activity_timeline

The primary tool for understanding what happened. Returns entities (PRs, issues, features, developers) that were active during a time period, along with their summaries and temporally-scoped facts.
ParameterTypeDefaultDescription
sincestring"24h"Time period — ISO-8601 datetime or relative (7d, 24h, 2w)
sourcestringallFilter by data source: agent, github, or linear
repositorystringallFilter by repository (e.g. org/repo)
group_idstringtenant-wideScope to a specific namespace
max_itemsintallMaximum number of entities to return
When to use: Broad questions like “what happened this week?”, “what did the team deliver?”, or any time-based query.

search_nodes

Semantic search for entities (nodes) in the knowledge graph — developers, repositories, PRs, issues, features, and any other concept Cogniscape has extracted.
ParameterTypeDefaultDescription
querystringrequiredNatural language search query
num_resultsint10Maximum number of entities to return
group_idstringtenant-wideScope to a specific namespace
When to use: Entity questions like “who is Alice?”, “what is the billing service?”, or “find all repositories related to payments”.

search_facts

Semantic search for relationships (edges) between entities. Facts include temporal validity — you can see when a relationship was true and when it expired.
ParameterTypeDefaultDescription
querystringrequiredNatural language search query
num_resultsint10Maximum number of facts to return
group_idstringtenant-wideScope to a specific namespace
sincestringFilter facts created at or after this date (ISO-8601)
untilstringFilter facts created at or before this date (ISO-8601)
When to use: Relationship questions like “what PRs did Alice merge?”, “which issues are blocking the release?”, or “what was authored this week?” (use since for temporal filtering).

get_episodes

Retrieves raw ingestion events — the conversations, code changes, and webhook payloads that were added to the graph. Useful for understanding provenance and context.
ParameterTypeDefaultDescription
group_idstringtenant-wideScope to a specific namespace
max_episodesint10Maximum number of episodes to return
reference_timestringnowISO-8601 timestamp to anchor the query
When to use: Provenance questions like “when was this information added?”, “show me the raw events from yesterday”, or debugging data ingestion.

get_token_usage

Returns AI token consumption and estimated cost in USD, broken down by model and developer.
ParameterTypeDefaultDescription
periodstring"week"Predefined period: today, week, or month
developerstringallFilter by developer name
date_startstringCustom start date (YYYY-MM-DD, inclusive)
date_endstringCustom end date (YYYY-MM-DD, inclusive)
repositorystringallFilter by repository name
When date_start and date_end are provided, the period parameter is ignored.
When to use: Cost questions like “how much did Claude cost this week?”, “what’s our token usage by developer?”, or “show me AI spending for the billing repo”.

get_developer_roi

Returns ROI analysis per developer: total cost, daily average, daily trend, and breakdowns by model and repository.
ParameterTypeDefaultDescription
developerstringallFilter by developer name
periodstring"month"Predefined period: today, week, or month
date_startstringCustom start date (YYYY-MM-DD, inclusive)
date_endstringCustom end date (YYYY-MM-DD, inclusive)
repositorystringallFilter by repository name
When to use: ROI questions like “what’s the cost per developer?”, “show me the spending trend”, or “is our AI investment efficient?“.

get_saga_timeline

Retrieves the ordered timeline of episodes belonging to a lifecycle saga. Sagas automatically group related events — every PR, issue, and coding session gets its own saga, linking all events in chronological order.
ParameterTypeDefaultDescription
saga_namestringrequiredThe saga identifier (e.g. "PR #99 cogniscape-app", "Issue #42 cogniscape-app", "Session sess-abc-123")
group_idstringtenant-wideScope to a specific namespace
Saga names follow a deterministic pattern based on the event source:
Event typeSaga name format
Pull request eventsPR #<number> <repository>
Issue eventsIssue #<number> <repository>
Coding session eventsSession <session_id>
When to use: Lifecycle questions like “show me the full history of PR #99”, “what happened with issue #42?”, or “trace this coding session from start to finish”.

Prompts

The Cogniscape MCP includes six built-in prompts — pre-written conversation starters that guide the AI assistant to use the right tools and present results in a structured way. These appear as suggested prompts in compatible clients.

daily_standup

Summarizes the last 24 hours of activity: what was done, what’s in progress, and attention points. Accepts optional repository and developer filters.

weekly_review

Generates a comprehensive weekly report: deliveries, merged PRs, deployments, decisions, and blockers. Designed for team review meetings.

developer_profile

Shows a developer’s activity profile: recent contributions, repositories, contribution types (code, reviews, issues), and AI token consumption.

document_history

Shows the change history for a specific document, repository, or component: who modified it, when, and what changed.

cost_report

Generates an AI cost report for a given period using get_token_usage and get_developer_roi. Includes total estimated cost, distribution by model and developer, daily trend, and average daily cost. Presented for non-technical managers.

team_overview

Maps the project’s contributors: areas of expertise, contribution types (code, reviews, management), and recent activity. Presented as a team map.

Tool selection guide

Not sure which tool to use? Here’s a quick reference:
Question typeRecommended tool
”What happened this week?”get_activity_timeline
”Who is this developer?”search_nodessearch_facts
”What PRs did Alice merge?”search_facts
”What was authored this week?”search_facts with since
”Show me PR #99 full history”get_saga_timeline
”How much did Claude cost?”get_token_usage
”Show me ROI by developer”get_developer_roi
”When was this data ingested?”get_episodes
Broad time-based questionsget_activity_timeline
Lifecycle tracking (PR/issue)get_saga_timeline
Entity lookup + relationshipssearch_nodessearch_facts
For complex questions, the AI assistant will combine multiple tools automatically. For example, “what did Alice work on this week and how much did it cost?” will use both get_activity_timeline and get_token_usage.