Company Brain MCP
A local AI assistant that answers questions across a company's internal knowledge using MCP, providing controlled access to internal documents with role-based permissions and citations.
README
Company Brain MCP
A local AI assistant that answers questions across a company's internal knowledge using the Model Context Protocol (MCP).
Overview
Company Brain MCP provides controlled access to internal company documents through MCP tools, enabling AI agents to query policies, product documentation, meeting notes, and engineering documentation with proper access control and citation support.
Architecture
User
↓
LLM / Agent
↓
MCP Client
↓
Local MCP Server
↓
┌──────────────┬──────────────┬──────────────┐
Policies Product Docs Meeting Notes
Engineering Architecture Internal FAQs
└──────────────┴──────────────┴──────────────┘
↓
Grounded answer + citations
Features
- MCP Tools:
search_documents(),read_document(),list_policies(),find_meeting_notes() - Access Control: Role-based permissions (admin, engineer, product, hr, guest)
- Semantic Search: Vector embeddings for document search
- Citations: Source tracking for all answers
- Audit Logging: Complete audit trail of all queries
- Read-Only: All tools are read-only for safety
Installation
cd company-brain-mcp
pip install -r requirements.txt
Usage
Start the MCP Server
cd server
python mcp_server.py
Available Tools
- list_policies - List all policy documents
- read_document - Read a specific document by ID
- search_documents - Search documents by query
- find_meeting_notes - Find meeting notes matching a query
- list_categories - List all accessible categories
Example Queries
- "What is our AI deployment policy?"
- "What decisions were made about authentication last month?"
- "What's on the product roadmap for Q4?"
- "Show me all security policies"
Project Structure
company-brain-mcp/
├── server/
│ ├── mcp_server.py # Main MCP server
│ ├── tools.py # MCP tools implementation
│ ├── permissions.py # Access control system
│ ├── document_loader.py # Document loading
│ ├── embeddings.py # Semantic search
│ └── config.py # Configuration
├── agent/
│ ├── assistant.py # LLM agent
│ └── citation_formatter.py
├── knowledge/
│ ├── policies/ # Company policies
│ ├── product/ # Product documentation
│ ├── engineering/ # Technical docs
│ ├── meetings/ # Meeting notes
│ └── internal/ # Internal docs
├── evals/
│ ├── questions.json # Test questions
│ └── evaluator.py
├── tests/
└── README.md
Permissions
| Role | Policies | Product | Engineering | Meetings | Internal |
|---|---|---|---|---|---|
| Admin | ✓ | ✓ | ✓ | ✓ | ✓ |
| Engineer | ✗ | ✓ | ✓ | ✓ | ✗ |
| Product | ✓ | ✓ | ✗ | ✓ | ✗ |
| HR | ✓ | ✗ | ✗ | ✓ | ✓ |
| Guest | ✗ | ✓ | ✗ | ✗ | ✗ |
Development
Adding Documents
Add markdown, text, or JSON files to the appropriate knowledge/ subdirectory. Documents are automatically loaded on server startup.
Adding Tools
- Implement the tool in
server/tools.py - Add the tool definition in
server/mcp_server.pyunder_handle_tools_list - Add the tool handler in
_handle_tool_call
Testing
# Run unit tests
python -m pytest tests/
# Run evaluation
python evals/evaluator.py
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.