codeskeleton
Enables AI agents to efficiently read Python code by first providing file skeletons then fetching only needed implementations, reducing noise and cost.
README
CodeSkeleton
Compact Python code reader for AI agents. It returns file skeletons first, then lets the agent fetch only the implementation regions it actually needs.
Why: reading whole files is often noisy and expensive. CodeSkeleton exposes compact CLI and MCP tools for signatures, globals, symbols, targeted line ranges, and batch reads.
Install
From GitHub:
uv tool install "codeskeleton[mcp] @ git+https://github.com/dugd/CodeSkeleton.git"
From a local checkout:
git clone https://github.com/dugd/CodeSkeleton.git
cd CodeSkeleton
uv sync --all-extras --dev
Quick check:
codeskel --help
codeskel skeleton "src/**/*.py" --preset min
From a local checkout, prefix commands with uv run:
uv run codeskel --help
uv run codeskel skeleton "codeskeleton/*.py" --preset min
uv run codeskel-mcp
Without installing, run directly from GitHub:
uvx --from "codeskeleton[mcp] @ git+https://github.com/dugd/CodeSkeleton.git" codeskel --help
CLI Examples
codeskel skeleton codeskeleton/core.py
codeskel skeleton "codeskeleton/*.py" --preset min
codeskel skeleton codeskeleton/core.py --inline-bodies --inline-max-lines 2
codeskel symbols codeskeleton/core.py
codeskel implementation codeskeleton/core.py --symbol render_skeleton
codeskel implementation codeskeleton/core.py --lines 1-80 --preset min
codeskel implementation-batch '[{"path":"a.py","symbol":"foo"},{"path":"b.py","lines":"1-80"}]'
codeskel smart-batch render_skeleton "codeskeleton/**/*.py"
Presets:
min: line ranges and signatures.medium: default; compact hashes, docstrings, globals, signatures.full: detailed metadata.
MCP Setup
The MCP server command is:
codeskel-mcp
Codex
codex mcp add codeskeleton -- codeskel-mcp
Verify:
codex mcp list
Claude Code
claude mcp add --transport stdio codeskeleton -- codeskel-mcp
Inside Claude Code, run /mcp to verify the server is connected.
Gemini CLI
Add this to .gemini/settings.json in a project, or to the user settings file:
{
"mcpServers": {
"codeskeleton": {
"command": "codeskel-mcp"
}
}
}
Restart Gemini CLI after changing settings.
MCP Tools
skeleton,skeletons: compact file maps for paths or globs.symbols: symbol list for a file.implementation,implementations: targeted code reads.implementation_batch: targeted reads across multiple files.smart_batch: find a symbol across files/globs and return matching implementations.
Suggested agent workflow:
- Use
skeletonswithpreset="medium"first. - Use
preset="min"for broad scans. - Use
implementation_batchorsmart_batchinstead of full-file reads.
Development
uv sync --all-extras --dev
uv run pytest
uv run ruff check .
uv run ruff format --check .
Status
Prototype. Currently Python-focused and AST-based.
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.