Skip to main content

An MCP server that onboards you to any codebase — point it at a repo and ask questions like a senior engineer who knows the project inside out.

Project description

onboarding-agent

An MCP server that onboards you to any codebase. Point it at a repo, and it builds a knowledge graph of the project — files, functions, classes, imports, and their relationships. Then ask questions like you're talking to a senior engineer who knows the project inside out.

What it does

  • Ingests any local repo — crawls the file tree, detects languages and frameworks
  • Builds a knowledge graph — maps files, functions, classes, modules, and how they connect via imports
  • Answers onboarding questions — "where does auth happen?", "what does this file do?", "who should I ask about the database?"
  • Analyzes git history — finds the most-changed files (often the most important), recent activity, and contributors per file
  • Works 100% locally — no API keys, no cloud, no data leaves your machine

Install

Requires Python 3.12+.

# From PyPI (recommended)
uv pip install onboarding-agent

# Or run directly without installing
uvx onboarding-agent

# Or clone and install locally
git clone https://github.com/abab754/onboarding-agent.git
cd onboarding-agent
uv sync

Connect to an MCP client

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "onboarding-agent": {
      "command": "uvx",
      "args": ["onboarding-agent"]
    }
  }
}

Claude Code

Add a .mcp.json file to your project root (or the repo you want to onboard to):

{
  "mcpServers": {
    "onboarding-agent": {
      "command": "uvx",
      "args": ["onboarding-agent"]
    }
  }
}

Then restart Claude Code.

Any MCP-compatible client

The server uses stdio transport. Any MCP client can connect by running onboarding-agent (after pip install) or uvx onboarding-agent.

Local development

If you cloned the repo and want to run from source:

{
  "mcpServers": {
    "onboarding-agent": {
      "command": "uv",
      "args": ["--directory", "/path/to/onboarding-agent", "run", "main.py"]
    }
  }
}

Usage examples

Once connected, just talk to your AI assistant naturally:

Full onboarding:

"Onboard me to the repo at /Users/me/projects/my-app"

Understand a file:

"Explain what /Users/me/projects/my-app/src/auth.py does"

Find relevant code:

"Where does database configuration happen in /Users/me/projects/my-app?"

Check project activity:

"Who are the main contributors to /Users/me/projects/my-app and what files change the most?"

Freeform questions:

"How is error handling done in this project?"

Tools

Tool Description
ingest_repo Crawl a repo and return the file tree
read_file Read a file's contents with metadata
get_overview High-level summary: languages, frameworks, entry points
explain_file File contents + imports, functions, classes
explain_module Directory overview with per-file symbols
build_knowledge_graph Index the repo into a queryable knowledge graph
query_entities Search the graph for files, functions, classes, modules
query_relationships Find how entities connect (imports, contains)
find_relevant_code Search by topic and get ranked results
get_architecture Import graph, module structure, coupling analysis
ask Freeform Q&A — gathers context automatically
get_git_history Recent commits and contributor summary
get_hot_files Most frequently changed files
get_file_contributors Who has worked on a specific file

Resources

URI Description
repo://overview Project summary (after a repo is loaded)
repo://structure File tree
repo://dependencies Import/dependency graph

Prompts

Prompt Description
onboard Full onboarding walkthrough
explain_this_file Deep dive into a specific file
find_code_for Find code related to a topic
ask_question Freeform question answering

How it works

  1. You point the server at a repo path
  2. It crawls the file tree, skipping noise directories (.git, node_modules, etc.)
  3. For Python files, it extracts functions, classes, and import statements
  4. Everything gets stored in a knowledge graph (saved to .onboarding_agent/graph.json in the repo)
  5. When you ask a question, it searches the graph, reads relevant files, and bundles the context for the LLM to answer

The knowledge graph persists between sessions, so re-analysis is only needed when the code changes.

Development

git clone https://github.com/YOUR_USERNAME/onboarding-agent.git
cd onboarding-agent
uv sync

# Run the server
uv run main.py

# Test with MCP Inspector
npx @modelcontextprotocol/inspector uv run main.py

Project structure

onboarding_agent/
├── server.py              # FastMCP instance and global state
├── constants.py           # Language maps, config signals, skip dirs
├── helpers.py             # File tree building, Python symbol extraction
├── knowledge_graph.py     # KnowledgeGraph class with JSON persistence
├── resources.py           # MCP resources (repo://overview, etc.)
├── prompts.py             # MCP prompt templates
└── tools/
    ├── ingest.py          # ingest_repo, read_file
    ├── analysis.py        # get_overview, explain_file, explain_module
    ├── graph.py           # build_knowledge_graph, query_entities, query_relationships
    ├── search.py          # find_relevant_code, get_architecture, ask
    └── git_history.py     # get_git_history, get_hot_files, get_file_contributors

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onboarding_agent-0.1.1.tar.gz (51.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onboarding_agent-0.1.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file onboarding_agent-0.1.1.tar.gz.

File metadata

  • Download URL: onboarding_agent-0.1.1.tar.gz
  • Upload date:
  • Size: 51.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for onboarding_agent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a71cab5ebe3c9ebff5409523c15bac86ddaf020cc3847854929844bbcc95bdb0
MD5 b73a29779913208da96ec85094504b11
BLAKE2b-256 9ffd4beafb3aa52d7c86a9abab57bf75793fa0400e31cce7c9d561cda559caec

See more details on using hashes here.

File details

Details for the file onboarding_agent-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: onboarding_agent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for onboarding_agent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 beb5f4eb4b18bff84270ad2fb408ab54d43facc439b0e9227e1a715d7c4f7243
MD5 204df4db3680508dc4e3842cc92da019
BLAKE2b-256 3018a051b38b0881d205ec77c57f642ec1db616c74ad4380b31f38f0a8c6864d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page