Corpus
Provides integration with Backstage by parsing catalog-info.yaml files to build a system map of components, APIs, systems, and users, enabling AI agents to traverse service ownership and dependencies.
Enables global code search across repositories, reading file contents, and searching issues and pull requests via the GitHub API.
Indexes OpenAPI and Swagger files to provide API endpoint contracts and schema information.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CorpusSearch our docs for how to set up authentication"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Corpus aggregates the documentation across all your organization's repositories, builds a live system map using Spotify Backstage catalog entities, and puts it all behind a powerful Model Context Protocol (MCP) server.
It supports GitHub, GitLab, Bitbucket, and Azure DevOps out of the box, with an extensible adapter architecture to support any VCS provider.
Give your AI agents (Claude, Copilot, etc.) the holistic context they need to understand your architecture, service ownership, docs, and codeβall in one place!
β¨ Features
πΊοΈ Auto-Generated Entity Graph: Fully parses Backstage
catalog-info.yamlentities (Components, APIs, Systems, Users) and generates a bidirectional relationship graph using well-known relations (e.g.,ownerOf/ownedBy,providesApi/apiProvidedBy).π Centralized Doc Search: Search across
README.md,docs/**/*.md,adr/**/*.md, and AI skills across your entire org. Choose between fast Lexical (keyword) search or state-of-the-art Semantic (vector embedding) search run locally in-memory.π Global Code Search: Keyword search across all organization repositories via your provider's native Code Search APIs.
π¬ Issue & PR Context: Proxies to your VCS's search APIs to find discussions, PRs, and issues across the org (
search_issues_and_prs).π File Reading: Direct access to precise file contents from any repository branch or commit.
π API Schema Aggregation: Automatically indexes
openapiandswaggerfiles so agents can pull down endpoint contracts instantly (list_api_schemas).π§ Automated Skill Directory: Scans all repositories for
.[client]/skills/**/SKILL.mdfiles (like.agents,.claude, or.cursor) and extracts their YAML frontmatter, allowing AI agents to dynamically discover and learn your company's standard operating procedures (list_company_skills).β‘ Zero-Config Start: Auto-runs missing builds on startup. If you have credentials, just hit
npm startand the server fetches and indexes everything.π¨ Gap Reporting: Optional ability to file a central Issue / Work Item when docs fail to answer an agent's question.
Related MCP server: repovine
π οΈ Quick Start
1. Prerequisites
Node.js v22+
VCS Authentication:
GitHub: Requires a PAT (Classic:
repo,read:org| Fine-Grained:Contents: Read-only,Metadata: Read-only).GitLab: Requires a Personal Access Token with
read_apiandread_repositoryscopes.Bitbucket: Requires an App Password with
repository:readandworkspace:readscopes.Azure DevOps: Requires a Personal Access Token with
Code (Read)scope.
(Note: If you enable ENABLE_GAP_REPORTING, ensure your token also has Write permissions for Issues / Work Items).
2. Configure Environment
Create a .env file in the root directory:
Global Search Settings (Optional):
# Choose between 'lexical' (default keyword search) or 'semantic' (local embeddings)
DOC_SEARCH_METHOD=lexicalFor GitHub (Default):
VCS_PROVIDER=github
GIT_ORG=your-github-org-or-username
GIT_PAT=your-github-personal-access-token
# Optional
ENABLE_GAP_REPORTING=false
GITHUB_PROJECT=your-github-org/doc-gaps-repoFor GitLab:
VCS_PROVIDER=gitlab
GIT_PAT=your-gitlab-personal-access-token
GIT_ORG=your-gitlab-group-name # Optional: Scopes discovery to a specific group
GITLAB_URL=https://gitlab.com # Optional: Change if using self-hosted GitLab
# Optional
ENABLE_GAP_REPORTING=false
GITHUB_PROJECT=your-gitlab-project-id # The Project ID where doc gaps are filedFor Bitbucket:
VCS_PROVIDER=bitbucket
GIT_ORG=your-workspace-name
GIT_PAT=your-username:your-app-password # Basic Auth or Bearer token
# Optional
ENABLE_GAP_REPORTING=false
GITHUB_PROJECT=your-workspace/your-repo-for-gapsFor Azure DevOps:
VCS_PROVIDER=azure
GIT_ORG=your-organization-name
GIT_PAT=your-personal-access-token
# Optional
ENABLE_GAP_REPORTING=false
GITHUB_PROJECT=your-project-name # The Azure Project where Doc Gaps (Work Items) are filed3. Build & Run
Local Execution:
npm install
npm run build
npm startNote: npm start automatically kicks off the corpus and system-map generation scripts if they haven't been run yet.
Docker Execution:
docker build -t corpus-mcp .
docker run -i -e GIT_ORG=your-github-org -e GIT_PAT=your-github-pat corpus-mcpπ€ Registering with AI Clients
Antigravity
Antigravity natively supports MCP. Configure the server globally by adding it to ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"corpus": {
"command": "node",
"args": ["/absolute/path/to/code-context-mcp/dist/src/index.js"],
"env": {
"GIT_ORG": "your-github-org",
"DOTENV_CONFIG_PATH": "/absolute/path/to/code-context-mcp/.env",
"CORPUS_DIR": "/absolute/path/to/code-context-mcp/corpus"
}
}
}
}Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"corpus": {
"command": "node",
"args": ["/absolute/path/to/code-context-mcp/dist/src/index.js"],
"env": {
"GIT_ORG": "your-github-org",
"GIT_PAT": "your-github-pat",
"CORPUS_DIR": "/absolute/path/to/code-context-mcp/corpus"
}
}
}
}Claude Code
Run the following in the project root:
claude mcp add corpus "node $(pwd)/dist/src/index.js"ποΈ Architecture & Commands
npm run build:corpus: Crawls the configured VCS organization and downloads docs + catalog data intocorpus/manifest.json.npm run build:map: Transforms the manifest into an active dependency graph saved tocorpus/system-map.yaml.npm run build: Runs the full pipeline and compiles TypeScript.npm run test: Runs unit tests using the native Node.js test runner.
π§© System Map & catalog-info.yaml
Corpus automatically generates a global dependency graph of your organization's services. To participate in the system map, each repository should contain a catalog-info.yaml file at its root, conforming to the Backstage Descriptor Format.
Because Corpus acts like a Backstage catalog processor, it extracts any entity type (Component, API, System, Group) and automatically wires up bidirectional relationships. If your Component defines owner: group:auth-team and providesApis: [api:auth-api], Corpus automatically generates the ownedBy/ownerOf and providesApi/apiProvidedBy edges so AI agents can natively traverse your organization's entire service graph.
Example catalog-info.yaml:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: my-auth-service
description: Handles user authentication and token generation
spec:
type: service
lifecycle: production
owner: group:auth-team
providesApis:
- api:auth-api
dependsOn:
- component:user-database
- component:email-serviceπ‘ Best Practices & Philosophy
To get the absolute most out of Corpus and your AI agents, we recommend the following ecosystem practices:
Keep Docs Close to Code: Documentation should live in the repository next to the code. The best place to document how a system works is directly beside the system itself. Corpus automatically picks up
docs/**/*.mdandadr/**/*.mdacross all your repos.Central Wiki Repository: If you have company-wide architectural decisions, RFCs, or code-quality standards that span multiple systems, keep them in a central "Wiki" repository as markdown files. Corpus will aggregate them perfectly.
Synergy with Spotify Backstage: If you use Backstage, Corpus is the perfect companion.
Backstage is an Internal Developer Portal (IDP) built for humans, providing a rich web UI.
Corpus is an IDP built for AI Agents, exposing the exact same context over MCP. Because Corpus natively parses standard
catalog-info.yamlfiles, there is zero duplicated work. If your teams are already definingdependsOn,lifecycle, andownertags for Backstage, Corpus automatically scoops them up and translates them into an active graph that AI agents can traverse.
Frequent Automated Updates: The Corpus is meant to be a living, breathing snapshot of your organization. Running the build scripts (
npm run build) re-fetches and rebuilds the corpus locally. Because it's a simple API scraping script, it consumes zero LLM tokens to build. Ideally, Corpus should be deployed centrally within your company, using a cron job (like a GitHub Action) to rebuild themanifest.jsonevery night and distribute it to your developers.
π€ Contributing
We welcome contributions! Please see our Contributing Guidelines for details on how to get started, set up your development environment, and submit Pull Requests.
This project enforces Conventional Commits. A pre-commit hook automatically formats your code with Prettier and checks it with ESLint.
See the Setup Skill Guide for more details.
π License
Corpus is free to use. All intellectual property is owned by Sayam Hussain.
This project is licensed under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
An MCP server that gives your AI access to the source code and docs of all public github repos
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server wrapping Backstage β query service catalog, fetch TechDocs, and scaffold services via AI agents.7Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server that provides coding agents with structured repository context, including graph-based navigation, dependency analysis, runtime flow tracing, and configuration surface across supported stacks.55MIT
- AlicenseNot gradedqualityBmaintenanceA local-first MCP server that lets AI assistants search and retrieve context from indexed projects, Git state, decisions, and tasks without sending data to the cloud.MIT
- AlicenseNot gradedqualityBmaintenanceMCP server that enables coding agents to retrieve project context, semantically search indexed documentation, and read specific documents from registered repositories.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VampSlayer/Corpus'
If you have feedback or need assistance with the MCP directory API, please join our Discord server