Back to directory

Code2Prompt

A CLI and library that converts a codebase into a single LLM prompt, with prompt templating, token counting, and a matching Python SDK and MCP server.

Code2Prompt

Code2Prompt is a context engineering tool that ingests a codebase and formats it for large language models, whether a user is manually copying context for ChatGPT, building AI agents in Python, or running an MCP server. It installs via Cargo, Homebrew, or as a Python SDK, and generates a prompt from a target directory in one command, sending it to stdout, the clipboard, or a file.

An agent skill teaches a coding agent to install and use code2prompt for repository navigation and scoped context gathering, inspecting a compact map of functions and classes before reading the relevant source files and tests together, with a fallback directory map for builds without the optional entity-map feature.

The project describes itself as an ecosystem with four parts: a core library handling secure file traversal and Git metadata, a CLI for humans with both a minimal mode and an interactive TUI, a Python SDK, and an MCP server.

More in MCP servers

See all 734
  • Light Cloud

    light-cloud.com

    A hosting platform that deploys a static site, a container, or a managed Postgres database straight from a GitHub, GitLab, or Bitbucket push, with a preview URL for every branch and an MCP server for deploying from Claude Code.

  • ForensicDbg

    forensicdbg.com

    A post-mortem debugger for native Windows x86 and x64 crashes, with an MCP interface so AI tools can consume crash-dump analysis directly.

  • Karada.ai

    karada.ai

    A CI/CD platform that auto-compiles existing APIs into Go MCP servers, attaches composable middleware, and exposes them through one gateway usable from Cursor, Claude Code, and Windsurf.