COS-MCP

COS-MCP

COS-MCP is an MCP server that provides AI-powered organizational continuity planning. It maintains a knowledge graph of employees, systems, projects, and relationships, and exposes tools, resources, and prompts for knowledge graph visualization, risk analysis, employee transition planning, and organizational knowledge base queries.

Category
访问服务器

README

COS-MCP

Continuity OS — The Operating System for Organizational Continuity

COS-MCP is an MCP (Model Context Protocol) server that provides AI-powered organizational continuity planning. It maintains a knowledge graph of employees, systems, projects, and relationships, and exposes tools, resources, and prompts for knowledge graph visualization, risk analysis, employee transition planning, and organizational knowledge base queries.

Built with NitroStack@nitrostack/core for the MCP server and @nitrostack/widgets for UI widgets.


Features

  • Knowledge Graph — Complete graph of employees, systems, projects, decisions, customers, and their relationships
  • Risk Analysis — Bus factor calculation, knowledge concentration detection, sole-owner identification
  • Transition Planning — Composed transition plans, successor scoring, onboarding path generation
  • GitHub Integration — Repository metadata, contributor analysis, commit/PR history, ownership risk
  • Organizational Knowledge Base — Decision records (ADRs), meeting summaries, documentation snippets with natural language querying
  • NitroStack Widgets — Pre-built dashboards and visualizations (Health Dashboard, Ownership Graph, GitHub insights)
  • MCP Prompts — Structured AI prompts for knowledge transfer summaries, transition reports, health checks, customer handovers

Architecture

cos-mcp/
├── src/
│   ├── index.ts                          # Entry point — boots MCP server
│   ├── app.module.ts                     # Root @McpApp + @Module
│   ├── models/index.ts                   # Zod schemas + TypeScript types
│   ├── services/
│   │   ├── mock-data.service.ts          # In-memory data store (employees, projects, systems, graph)
│   │   └── github.service.ts             # GitHub REST API client with caching
│   ├── modules/
│   │   ├── knowledge-graph/              # Org resources, graph tools, knowledge base, prompts
│   │   │   ├── knowledge-graph.module.ts
│   │   │   ├── knowledge-graph.tools.ts   # build_ownership_graph, find_domain_experts, etc.
│   │   │   ├── knowledge-graph.resources.ts # org://employees, org://teams, org://systems, etc.
│   │   │   ├── knowledge-graph.prompts.ts   # knowledge_transfer_summary, transition_report, etc.
│   │   │   └── knowledge-base.ts          # Static ADRs, meeting summaries, docs
│   │   ├── risk/                         # Risk analysis tools
│   │   │   ├── risk.module.ts
│   │   │   └── risk.tools.ts              # analyze_knowledge_risk, calculate_bus_factor
│   │   ├── transition/                   # Transition planning tools
│   │   │   ├── transition.module.ts
│   │   │   └── transition.tools.ts        # generate_transition_plan, recommend_successor, etc.
│   │   └── github/                       # GitHub integration
│   │       ├── github.module.ts
│   │       ├── github.tools.ts            # sync_github_repository, analyze_repository_ownership, etc.
│   │       └── github.resources.ts        # github://repo, github://contributors, github://commits
│   └── widgets/                          # NitroStack widget pages (Next.js static export)
│       ├── app/                          # Page components
│       ├── widget-manifest.json          # Widget registry
│       ├── next.config.mjs
│       └── package.json
└── package.json

Module Structure

Module Path Description
App src/app.module.ts Root module, imports all feature modules
KnowledgeGraph src/modules/knowledge-graph/ Core module — resources, tools, prompts, knowledge base
Risk src/modules/risk/ Bus factor and knowledge concentration analysis
Transition src/modules/transition/ Transition plans, successor recommendations, onboarding
GitHub src/modules/github/ GitHub REST API integration

Installation

# Clone the repository
git clone https://github.com/your-org/cos-mcp.git
cd cos-mcp

# Install dependencies
npm install

# (Optional) Install widget dependencies
cd src/widgets && npm install && cd ../..

Environment Variables

Copy .env.example to .env:

cp .env.example .env
Variable Required Default Description
NODE_ENV No development Environment (development, production, test)
PORT No 3000 Port the MCP server listens on
GITHUB_TOKEN No GitHub personal access token (5,000 req/hr vs 60 req/hr unauthenticated)

Running Locally

# Start the MCP server in dev mode (with hot reload via NitroStudio)
npm run dev

# Or build and run
npm run build
npm start

Widgets (optional)

# Dev server for widgets
npm run widgets:dev

# Build widgets for production (static export)
npm run widgets:build

Build Instructions

# TypeScript compilation
npm run build

# Build output goes to ./dist/
# Entry point: ./dist/index.js

GitHub Integration

COS-MCP integrates with the GitHub REST API to enrich the organizational knowledge graph with live repository data.

GitHub Tools

Tool Description
sync_github_repository Fetch repository metadata, contributors, commits, PRs, and languages
analyze_repository_ownership Calculate bus factor, contribution percentages, ownership risk
enrich_employee_profile Merge GitHub commit/PR/ownership data into an employee profile

GitHub Resources

URI Description
github://repo/{owner}/{repo} Repository metadata, contributors, commits, PRs, languages
github://contributors/{owner}/{repo} Contributor list with commit counts
github://commits/{owner}/{repo} Recent commit history

Setup

export GITHUB_TOKEN=ghp_your_token_here

Demo Workflow

1. Explore the Organization

GET org://employees
GET org://teams
GET org://teams/Payments
GET org://employees/emp_001

2. Build Ownership Graph

Tool: build_ownership_graph
Input: { employeeId: "emp_001" }

3. Analyze Knowledge Risk

Tool: analyze_knowledge_risk
Input: { scope: "organization" }

4. Find Domain Experts

Tool: find_domain_experts
Input: { domain: "payments" }

5. Identify Hidden Dependencies

Tool: identify_hidden_dependencies
Input: { employeeId: "emp_001" }

6. Query Organizational Knowledge

Tool: query_organizational_knowledge
Input: { question: "Why did Alice choose Kafka over RabbitMQ?" }

7. Recommend Successor

Tool: recommend_successor
Input: { roleId: "Senior Engineer", departingEmployeeId: "emp_001" }

8. Generate Transition Plan

Tool: generate_transition_plan
Input: { departingEmployeeId: "emp_001", successorId: "emp_013" }

9. Use AI Prompts

Prompt: knowledge_transfer_summary
Arguments: { employeeId: "emp_001", format: "detailed" }

Prompt: role_transition_report
Arguments: { departingId: "emp_001", successorId: "emp_013" }

Prompt: organizational_health_check
Arguments: { scope: "team", teamId: "Payments" }

10. Create Onboarding Path

Tool: create_onboarding_path
Input: { newEmployeeId: "emp_013", roleId: "Senior Engineer" }

MCP Tools

Tool Module Description Widget
build_ownership_graph KnowledgeGraph Build a complete ownership sub-graph for an employee ownership-graph
find_domain_experts KnowledgeGraph Search for domain experts by skills, system ownership, GitHub
identify_hidden_dependencies KnowledgeGraph Surface non-obvious responsibilities and hidden dependencies
query_organizational_knowledge KnowledgeGraph Natural language query of ADRs, meetings, docs
analyze_knowledge_risk Risk Bus factor, sole owners, undocumented systems per team health-dashboard
calculate_bus_factor Risk Bus factor for a specific team
generate_transition_plan Transition Composed transition plan (ownership + risk + successor)
recommend_successor Transition Score and rank potential successors
create_onboarding_path Transition Structured learning path for new hires
sync_github_repository GitHub Fetch repository metadata, contributors, commits, PRs github-repositories, top-contributors, commit-activity
analyze_repository_ownership GitHub Bus factor, contribution %, ownership risk repository-bus-factor, ownership-percentage, critical-repositories
enrich_employee_profile GitHub Merge GitHub data into employee profile

MCP Resources

URI Module Description
org://employees KnowledgeGraph All employees with roles, teams, skills
org://employees/{employeeId} KnowledgeGraph Employee details with projects, systems, relationships
org://teams KnowledgeGraph All teams with member counts, bus factor, health
org://teams/{teamId} KnowledgeGraph Team breakdown with members, risk, projects, systems
org://systems KnowledgeGraph All systems with ownership, documentation status
org://projects KnowledgeGraph All projects with ownership, contributors, systems
org://knowledge-graph KnowledgeGraph Full knowledge graph (nodes + edges)
github://repo/{owner}/{repo} GitHub Repository metadata, contributors, commits, PRs, languages
github://contributors/{owner}/{repo} GitHub Contributor list with commit counts
github://commits/{owner}/{repo} GitHub Recent commit history

MCP Prompts

Prompt Module Description
knowledge_transfer_summary KnowledgeGraph KT summary for departing employee
role_transition_report KnowledgeGraph Complete transition report with risk, readiness, timeline
organizational_health_check KnowledgeGraph Org-wide or team health assessment with RAG status
customer_handover_summary KnowledgeGraph Customer relationship handover document

Widgets

Widget Route Bound Tool
Organizational Health Dashboard /health-dashboard analyze_knowledge_risk
Employee Ownership Graph /ownership-graph build_ownership_graph
GitHub Repositories /github-repositories sync_github_repository
Top Contributors /top-contributors sync_github_repository
Repository Bus Factor /repository-bus-factor analyze_repository_ownership
Commit Activity /commit-activity sync_github_repository
Ownership Percentage /ownership-percentage analyze_repository_ownership
Critical Repositories /critical-repositories analyze_repository_ownership

Deployment

Production Build

npm run build

Run with PM2 (recommended)

npm install -g pm2
pm2 start dist/index.js --name cos-mcp

Docker (example Dockerfile)

FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY dist/ ./dist/
CMD ["npm", "start"]

Environment Variables

Ensure these are set in your production environment:

NODE_ENV=production
PORT=3000
GITHUB_TOKEN=ghp_your_token

Example Usage

# Query all employees
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"resources/read","params":{"uri":"org://employees"},"id":1}'

# Build ownership graph
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"build_ownership_graph","arguments":{"employeeId":"emp_001"}},"id":2}'

# Sync GitHub repository
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"sync_github_repository","arguments":{"owner":"nitrocloudofficial","repo":"nitrostack"}},"id":3}'

Organization Data

  • 3 teams: Payments (6 members), Platform (5 members), Growth (3 members)
  • 8 projects: Payment Gateway v3, Platform Migration to EKS, User Onboarding Redesign, Real-Time Fraud Detection, Data Lake Foundation, API Rate Limiter, A/B Testing Platform, PCI DSS Compliance Audit
  • 9 systems: Payment Processor, Ledger Service, API Gateway, Event Bus, User Service, Internal Admin Dashboard, Payment Reconciliation Service, SAP Integration, Vendor X Process
  • 12 decision records (ADR-001 through ADR-012)
  • 5 meeting summaries
  • 8 documentation snippets

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选