How collibra/chip works
1. What this repo is
- A Go-based Model Context Protocol (MCP) server that exposes Collibra Data Governance Center capabilities to AI clients.
- The server is a thin integration layer: it does not store business data locally; it translates MCP tool calls into Collibra API requests and returns the results.
2. Top-level runtime boundary
- The executable entrypoint is cmd/chip/main.go.
- That package wires together configuration, transport selection, and server startup.
- The repo supports two runtime modes:
- stdio for local/client-managed MCP integrations
- HTTP for networked clients, with localhost-only binding for safety
3. Configuration boundary
- Configuration comes from environment variables and/or a YAML config file under ~/.config/collibra/mcp.yaml.
- The config defines the Collibra base URL and credentials, plus tool enable/disable controls.
- This is an important architectural boundary: auth can be server-wide in stdio mode or client-provided per request in HTTP mode.
4. Server core
- pkg/chip contains the MCP server runtime support:
- server.go for server composition/lifecycle
- http.go for HTTP transport behavior
- context.go for shared request/server context
- version.go for version metadata
- This layer is the orchestration boundary between the MCP protocol and the tool implementations.
5. Tool layer
- pkg/tools is the main capability surface area.
- Each file implements one MCP tool, such as asset discovery, glossary lookup, lineage traversal, classification matches, and data contract operations.
- tools_register.go centralizes tool registration, so the server can expose a selected subset based on config/flags.
- The tools are the primary unit of functionality exposed to external MCP clients.
6. Collibra API client layer
- pkg/clients contains the outbound integration code to Collibra services.
- The clients are split by domain:
- core / GraphQL / search / responsibility / relation / datacontract / classification
- lineage-specific client support
- Copilot integration support
- This separation keeps tool handlers thin and isolates Collibra-specific API details from MCP concerns.
7. Data domains exposed
- The server groups Collibra capabilities into a few major domains:
- Data asset discovery and asset metadata retrieval
- Business glossary and term-to-asset relationships
- Semantic layer queries for tables, columns, and measures
- Data contracts push/pull/list workflows
- Data classification search and classification match management
- Technical lineage for entities, upstream/downstream flows, and transformations
- These domains map directly to the tool list in the README and are the main architecture axes for diagrams.
8. Request/data flow
- An MCP client invokes a tool over stdio or HTTP.
- The server routes the request to the corresponding implementation in pkg/tools.
- The tool calls one or more domain clients in pkg/clients.
- The client performs the outbound Collibra API request and returns structured data.
- The result is transformed into MCP-compatible tool output and sent back to the caller.
9. State and persistence
- There is no local database or queue.
- The server is effectively stateless aside from runtime config and request context.
- All persistent system-of-record data remains in Collibra; this repo only mediates access.
10. Operational and delivery concerns
- Tests exist for server behavior, versioning, client behavior, and most tools, indicating the boundaries are designed for isolated unit testing.
- GitHub Actions and Goreleaser handle build/release packaging of the CLI binary.
- Documentation under docs/ covers configuration and MCP examples, reinforcing that deployment is primarily as a configurable binary rather than a hosted platform.
Main entry points: tools_register.go Tool registry · dgc_core_client.go Core API · server.go Server · main.go Main
Components 22
Runtime
Executable entrypoint and transport modes
Core
Server composition and shared request context
- Server · Server composition and lifecycle
pkg/chip/server.go - HTTP transport · HTTP protocol handling
pkg/chip/http.go - Context · Shared server and request context
pkg/chip/context.go - Version · Build and version metadata
pkg/chip/version.go
Tools
MCP tool surface grouped by capability
- Tool registry · Registers enabled MCP tools
pkg/tools/tools_register.go - Assets · Asset discovery and metadata
pkg/tools/discover_data_assets.go - Glossary · Business glossary and term lookup
pkg/tools/discover_business_glossary.go - Semantics · Tables, columns, and measures
pkg/tools/get_table_semantics.go - Contracts · Data contract push, pull, and list
pkg/tools/list_data_contracts.go - Classification · Classification search and matches
pkg/tools/search_data_classification_matches.go - Lineage · Entity, flow, and transformation lineage
pkg/tools/get_lineage_entity.go
Clients
Outbound Collibra integrations by domain
- Core API · Base Collibra API access
pkg/clients/dgc_core_client.go - GraphQL · GraphQL queries and mutations
pkg/clients/dgc_gql_client.go - Search · Search and lookup operations
pkg/clients/dgc_search_client.go - Contracts API · Data contract integration
pkg/clients/dgc_datacontract_client.go - Classify API · Classification and match APIs
pkg/clients/dgc_classification_client.go - Lineage API · Technical lineage integration
pkg/clients/lineage_client.go - Copilot · Copilot support integration
pkg/clients/copilot_client.go
Ops
Config, docs, build, and release concerns
- Docs & release · Config docs, examples, CI, and packaging
docs/CONFIG.md
Connections 27
- Main → Config: loads · Reads environment and YAML configuration
- Main → Server: starts · Constructs and runs the MCP server
- Main → HTTP mode: selects · Chooses stdio or HTTP runtime mode
- HTTP mode → HTTP transport: uses · Delegates transport behavior
- Server → Context: shares · Provides request-scoped context
- Server → Tool registry: registers · Exposes configured tools
- Server → Version: reports · Publishes version metadata
- Tool registry → Assets: enables · Registers asset discovery tools
- Tool registry → Glossary: enables · Registers glossary tools
- Tool registry → Semantics: enables · Registers semantic-layer tools
- Tool registry → Contracts: enables · Registers data contract tools
- Tool registry → Classification: enables · Registers classification tools
- Tool registry → Lineage: enables · Registers lineage tools
- Assets → Search: queries · Uses search and lookup APIs
- Glossary → GraphQL: queries · Uses GraphQL-backed Collibra access
- Semantics → Core API: queries · Uses core Collibra API access
- Contracts → Contracts API: uses · Push/pull/list contract workflows
- Classification → Classify API: uses · Searches and updates match data
- Lineage → Lineage API: uses · Traverses lineage relationships
- Search → Core API: builds on · Search client layers on core API access
- GraphQL → Core API: builds on · GraphQL client layers on core API access
- Contracts API → Core API: builds on · Contract client layers on core API access
- Classify API → Core API: builds on · Classification client layers on core API access
- Lineage API → Core API: builds on · Lineage client layers on core API access
- Copilot → Core API: builds on · Copilot integration uses shared API plumbing
- Docs & release → Config: documents · Configuration and example setup
- Docs & release → Tool registry: describes · Tool surface and selection behavior