Skip to main content

MCP tools that help AI agents get their bearings in a codebase — unified SQL views over code, git, docs, and conversations, powered by DuckDB.

Project description

Fledgling

MCP tools that help AI agents get their bearings in a codebase — unified SQL views over code, git, docs, and conversations, powered by DuckDB.

Three ways to run:

# Zero-dependency MCP server (pure DuckDB, no Python)
curl -sL https://teaguesterling.github.io/fledgling/install.sql | duckdb

# Python API
pip install fledgling
python -c "import fledgling; fledgling.connect().find_definitions('**/*.py').show()"

# FastMCP server with smart defaults, caching, and compound workflows
pip install fledgling[pro]
fledgling-pro

Before and After

Your agent wastes tokens parsing text. Fledgling gives it purpose-built tools that return structured data.

Find a function definition

Before — grep returns raw text the agent has to parse:

grep -rn 'def parse_config' src/
src/config.py:42:def parse_config(path: str, strict: bool = False) -> Config:

After — the agent calls FindDefinitions:

FindDefinitions(file_pattern="src/**/*.py", name_pattern="parse_config%")

| file_path     | name         | kind                | start_line | end_line | signature                                   |
|---------------|--------------|---------------------|------------|----------|---------------------------------------------|
| src/config.py | parse_config | DEFINITION_FUNCTION | 42         | 68       | def parse_config(path: str, strict: ...) -> |

Compose queries across domains

-- Functions in recently changed files, ranked by cyclomatic complexity
SELECT * FROM changed_function_summary('HEAD~3', 'HEAD', 'src/**/*.py')

Code analysis + git history in one call. No shell pipelines, no string parsing.

What's Included

MCP Tools (14)

Tool What it does
ReadLines Read file lines with range, context, and match filtering
FindDefinitions AST-based search for functions/classes across 30 languages
FindInAST Semantic code search: calls, imports, loops, conditionals, strings, comments
CodeStructure Structural overview with cyclomatic complexity metrics
MDOverview Browse all docs with keyword/regex search
MDSection Read a specific markdown section by ID
GitDiffSummary File-level change summary between revisions
GitDiffFile Line-level unified diff
GitShow File content at a specific git revision
Help Built-in skill guide with workflows and macro catalog
ChatSessions Browse Claude Code conversation sessions
ChatSearch Full-text search across conversation messages
ChatToolUsage Tool usage patterns
ChatDetail Deep view of a single session

Plus 20+ composable SQL macros via the query tool: complexity_hotspots, function_callers, module_dependencies, structural_diff, doc_outline, and more.

Fledgling Pro (FastMCP)

The fledgling[pro] package adds a FastMCP server with:

  • Smart defaults — auto-detects your project's language, doc directory, and git branch
  • Token-aware output — auto-truncation with hints ("use lines='N-M' to narrow")
  • Compound workflowsexplore, investigate, review, search in one call
  • MCP resources — project overview, docs, git state always available without tool calls
  • Prompt templates — context-aware exploration, investigation, and review workflows
  • Session state — caching, access log, and kibitzer (suggests better tool usage)

Python API

import fledgling

con = fledgling.connect()

# Macros as methods — return composable DuckDB Relations
con.find_definitions("**/*.py", name_pattern="parse%").show()
con.recent_changes(5).select("hash, message").df()
con.code_structure("src/**/*.py").filter("cyclomatic_complexity > 5").show()

# Module-level for quick scripting
from fledgling.tools import find_definitions, recent_changes
find_definitions("**/*.py").show()

CLI for Humans

fledgling find-definitions 'src/**/*.py' '%parse%'
fledgling recent-changes 10 -c hash,message
fledgling CodeStructure '**/*.rs' -f csv
fledgling query "SELECT * FROM complexity_hotspots('**/*.py', 10)"
fledgling help
fledgling update   # preserves your module/profile config

Tab completion: eval "$(fledgling --completions bash)"

Install

Per-project (recommended)

curl -sL https://teaguesterling.github.io/fledgling/install.sql | duckdb

Creates .fledgling-init.sql, .fledgling-help.md, and .mcp.json in your project root. Customize modules and profile on the install page.

Via pip

pip install fledgling          # CLI + Python API
pip install fledgling[pro]     # + FastMCP server

Requirements

  • DuckDB >= 1.5.0 (CLI for MCP server, Python package for API)
  • Community extensions installed automatically

Architecture

┌─────────────────────────────────────────┐
│  fledgling-pro (FastMCP)                │  pip install fledgling[pro]
│  Smart defaults, caching, workflows,    │
│  prompts, kibitzer, resources           │
│                                         │
│  ┌───────────────────────────────────┐  │
│  │  fledgling (Python API)           │  │  pip install fledgling
│  │  fledgling.connect()              │  │
│  │  con.find_definitions().show()    │  │
│  │                                   │  │
│  │  ┌─────────────────────────────┐  │  │
│  │  │  SQL macros (DuckDB)        │  │  │  curl | duckdb
│  │  │  14 MCP tools               │  │  │
│  │  │  read_lines, sitting_duck,  │  │  │
│  │  │  duck_tails, duckdb_markdown│  │  │
│  │  └─────────────────────────────┘  │  │
│  └───────────────────────────────────┘  │
└─────────────────────────────────────────┘

The SQL macros are the foundation — pure DuckDB, zero Python dependency, sandboxed read-only. The Python API wraps them as composable Relations. The FastMCP layer adds coordination intelligence.

Development

git clone https://github.com/teaguesterling/fledgling.git
cd fledgling
pip install -e ".[pro]"
pip install duckdb pytest
pytest

523 tests across SQL macros, MCP integration, CLI, Python API, and FastMCP server.

Coming Soon

  • fledgling-edit — AST-aware code editing with pattern matching and template substitution (design spec)
  • Kit management — Quartermaster pattern: curated tool subsets per task type with model-aware configuration

Why "Fledgling"?

From the 1996 film Fly Away Home — a girl raises orphaned geese and teaches them their migration route by leading them with an ultralight aircraft. The geese imprint on her, learn the path, and eventually fly it on their own.

Fledgling gives AI agents structured tools so they can learn to navigate your codebase. A fledgling is a young bird learning to fly. This tool is what gets it airborne.

License

Apache-2.0

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

fledgling_mcp-0.6.0.tar.gz (315.9 kB view details)

Uploaded Source

Built Distribution

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

fledgling_mcp-0.6.0-py3-none-any.whl (98.3 kB view details)

Uploaded Python 3

File details

Details for the file fledgling_mcp-0.6.0.tar.gz.

File metadata

  • Download URL: fledgling_mcp-0.6.0.tar.gz
  • Upload date:
  • Size: 315.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fledgling_mcp-0.6.0.tar.gz
Algorithm Hash digest
SHA256 227e489f1260fd25575827445a4c70841025cbef3fd9660fd77dcd3d32e982ba
MD5 a89871ff0cef423d98586c93d2a18e33
BLAKE2b-256 512f269b998d34bc650d3cd0cbc066e788ad7d86ccfb4126d906888a7bed3183

See more details on using hashes here.

Provenance

The following attestation bundles were made for fledgling_mcp-0.6.0.tar.gz:

Publisher: publish.yml on teaguesterling/fledgling

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fledgling_mcp-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: fledgling_mcp-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 98.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fledgling_mcp-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9631cb90badfa972cd96f5d9f509f5e215ac32078d0987224aad1e87455fcb9
MD5 917b9fa31983b85d9646e260a2cc61d3
BLAKE2b-256 345c83344728e7acd5094c5578b6a18bdbe7ceca33c2e1c2473d0fbd5be12e3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fledgling_mcp-0.6.0-py3-none-any.whl:

Publisher: publish.yml on teaguesterling/fledgling

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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