Documentation/MCP Server

MCP Server

The Cograph MCP server exposes your knowledge graph to any AI assistant that supports the Model Context Protocol — Claude, GPT-4, Gemini, and others. Ask natural language questions about your organization and get structured answers back.

7 ToolsQuery expertise, find gaps, search knowledge, identify successors
3 PromptsMulti-step workflows: offboarding briefings, interviews, successor plans
Scoped AccessRead-only or read+write API keys — your data never leaves your org

Installation

The MCP server runs as a local process on your machine and connects to the Cograph API using your API key. It's distributed as an npm package and works with any MCP-compatible client.

Generate an API key

Go to Settings → API Keys in your Cograph dashboard and create a new key. Choose read-only for most agents, or read+write if you want your AI to create knowledge capture tasks.

Install the MCP server

Choose your client below and add the configuration. The server is distributed as an npm package and runs locally on your machine.

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

claude_desktop_config.json
{
  "mcpServers": {
    "cograph": {
      "command": "npx",
      "args": ["-y", "@cograph/mcp@latest"],
      "env": {
        "COGRAPH_API_KEY": "cograph_sk_your_api_key_here"
      }
    }
  }
}

Restart your AI client

Restart Claude Desktop, VS Code, or your MCP client. The Cograph tools will appear automatically once the server connects.

Test the connection

Ask your AI: "Use the query_expertise tool to find what {your email} knows." You should see your expertise profile returned.

Authentication

Generate an API key from Settings → API Keys. Choose your scope:

Readcograph_sk_ro_

Access all 6 read-only tools and 3 resources. Safe for general AI assistant use. Recommended for most use cases.

Read + Writecograph_sk_rw_

Enables the create_knowledge_item tool. Rate limited to 10 write operations per minute. Use when you want your AI to create capture tasks.

.env
# Read-only key — safe for most AI workflows
COGRAPH_API_KEY=cograph_sk_ro_xxxxxxxxxxxxxxxx

# Read+write key — needed for create_knowledge_item
COGRAPH_API_KEY=cograph_sk_rw_xxxxxxxxxxxxxxxx

Tip: API keys are per-user. Each team member should generate their own key. Keys are scoped to your organization automatically — there's no risk of leaking another org's data even if a key is compromised.

Tools Reference

Tools are callable actions. Your AI can call them with specific inputs and gets structured results back. All tools are scoped to your organization automatically — you never need to provide an org ID.

query_expertiseread

Returns the full expertise profile for an employee — topics, scores, and evidence from code, docs, and communication.

Inputs:employee (email or name)
Example

What does sarah@company.com know? Use query_expertise to build her profile.

find_knowledge_gapsread

Identifies topics at risk in the organization — areas with active departures and topics where only one person holds the knowledge.

Inputs:includeActiveRisks (bool)includeSinglePointsOfFailure (bool)minExpertiseScore (0–1)
Example

Use find_knowledge_gaps to find our top 5 single points of failure.

identify_successorsread

Finds the best candidates to receive knowledge transfer for a specific topic, ranked by expertise overlap and collaboration history.

Inputs:topic (string)departingEmployee (email or name)limit (1–10)
Example

Use identify_successors to find who should take over John's database responsibilities.

search_knowledgeread

Full-text search across all connected data: employees, knowledge items, Slack messages, GitHub commits, and risk reports.

Inputs:query (natural language)contentTypes (optional)limit (1–20)
Example

Search for all documentation we have about our authentication system.

get_collaboration_networkread

Returns top collaborators for an employee with strength percentages and contexts — who they pair with on code, docs, and discussions.

Inputs:employee (email or name)limit (1–25)
Example

Use get_collaboration_network to show who Alice works most closely with.

simulate_departure_impactread

Models the organizational impact of all current active departures at once. Shows topics affected and sole experts at risk.

Inputs:(none — uses active departures)
Example

Use simulate_departure_impact to show me the risk from our current departures.

create_knowledge_itemwrite

Creates a knowledge capture task for a departure. Requires write scope on your API key.

Inputs:departureIdtitledescriptiontypepriorityknowledgeArea
Example

Create a high-priority knowledge item for John's departure about the payments API.

Resources

Resources are read-only data endpoints identified by a URI. Your AI can fetch them like web pages and receive structured JSON.

Employee Knowledge Profile
cograph://employees/{email}/knowledge-profile

Structured JSON profile for any employee: expertise topics with scores, top collaborators, and evidence sources.

Example URIcograph://employees/sarah@company.com/knowledge-profile
Departure Risk Report
cograph://departures/{id}/risk-report

Full risk assessment for a departure: overall score, knowledge items by priority, and capture progress.

Example URIcograph://departures/dep_abc123/risk-report
Bus Factor Analysis
cograph://org/bus-factor-analysis

Organization-wide single points of failure: topics and employees where knowledge is concentrated in one person.

Example URIcograph://org/bus-factor-analysis

Prompts

Prompts are pre-built multi-step workflows. Instead of calling tools one by one, you invoke a prompt and your AI orchestrates all the required tool calls and produces a structured output.

offboarding-kickoff

Generates a comprehensive offboarding briefing for a departing employee. Orchestrates three tools to produce an executive-ready summary with capture plan and timeline.

Inputs:employeeEmail
Orchestrates:query_expertiseget_collaboration_networkfind_knowledge_gaps
Output:Executive briefing with knowledge risk summary, critical capture areas, successor candidates, and recommended timeline.
knowledge-transfer-interview

Runs a structured, interactive knowledge extraction session with the departing employee. Generates targeted questions from their expertise profile and offers to capture answers as knowledge items.

Inputs:employeeEmaildepartureIdfocusTopic (optional)
Orchestrates:query_expertisecreate_knowledge_item
Output:Interactive session — asks targeted questions and creates knowledge items from the responses.
successor-briefing

Creates a personalized onboarding plan for the successor, showing exactly what they need to learn, key people to meet, and a 30-day action plan based on both people's expertise profiles.

Inputs:successorEmaildepartingEmployeeEmailtopics (optional, comma-separated)
Orchestrates:query_expertise (both)get_collaboration_network
Output:Personalized learning plan with knowledge gaps, key contacts, and prioritized 30-day action items.

Example Conversations

Copy these prompts directly into Claude Desktop, VS Code Copilot, or any MCP-compatible AI. Click any card to copy to your clipboard.

Knowledge Discovery

Use query_expertise to find everything sarah@company.com knows.

Get a full expertise profile for any employee

Knowledge Discovery

Search for all documentation we have about our authentication system.

Full-text search across all connected data sources

Knowledge Discovery

Who are our top experts on Kubernetes? Use find_knowledge_gaps to check if there's a single point of failure.

Identify expertise concentration risks

Knowledge Discovery

Use get_collaboration_network to show me who alex@company.com works most closely with and in what contexts.

Map collaboration patterns and dependencies

Offboarding

Run the offboarding-kickoff prompt for john.smith@company.com.

Generate a comprehensive offboarding briefing

Offboarding

Run the knowledge-transfer-interview prompt for maria@company.com with departure ID dep_abc123, focusing on the payments infrastructure topic.

Start a structured knowledge extraction session

Offboarding

Run the successor-briefing prompt for the new hire (newhire@company.com) replacing the departing employee (departing@company.com). Focus on authentication, database design, and API patterns.

Create a personalized onboarding plan for the successor

Risk Assessment

Use simulate_departure_impact to show me the organizational impact of our current active departures.

Model the risk of all pending departures at once

Risk Assessment

Use find_knowledge_gaps to find all knowledge areas where we have a single point of failure. Who are our key people?

Discover your organizational bus factor risks

Risk Assessment

Fetch the resource cograph://org/bus-factor-analysis and summarize the critical risks.

Get a structured bus factor report

Successor Matching

Use identify_successors to find the 5 best people to take over the "payment processing" knowledge from departing@company.com.

Find the best candidates for knowledge transfer

Successor Matching

Compare the expertise of alice@company.com and bob@company.com. Who has more overlap with the departing employee carol@company.com?

Compare candidates for knowledge transfer fit

Rate Limits

Read tools60 requests/minute per key · 500 requests/hour per organization
Write tools10 requests/minute per key (stricter tier for mutations)