Hierarchically optimized documentation for AI coding agents
AI coding tools work best when given access to up-to-date documentation.
Lovely Docs places the documentation inside a folder ( lovely-docs/ by default) in your project. The documentation is available in both condensed and fulltext forms - noise is removed from pages, and
content summaries are created for each directory.
Your coding agent should have an easy time searching and reading the documentation using its built-in tools, and you can also
directly point it to any particular file using @lovely-docs/... or equivalent mechanism.
You can also use Lovely Docs MCP Server , but a local folder works better for AI coding agents.
Want me to add more libraries or have feedback? Reach out on Discord or .
Tokens ain't cheap, buy me a coffee .
Note: The Lovely Docs CLI is written in TypeScript, but your project can be written in any language
npx -y lovely-docs@latest initnpx -y lovely-docs@latest listnpx -y lovely-docs@latest add sveltejs/svelteYou can experiment with the installed. So far I found that "Diegst only" without directory summaries and llm map works best in Windsurf and Antigravity, but give it a try and let me know how it goes.
You can add the following rule to your .cursorrules or similar configuration to help your AI agent use the documentation effectively:
Or a more agressive
You can run a Lovely Docs MCP server locally. Or you can access the one I'm running publicly.
{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}File → Preferences → Cursor Settings → Features → MCP Servers → "Add New MCP Server" → Paste configuration
Command palette → "MCP: Add Server..." → Select "Command (stdio)" → Command: npx -y lovely-docs@latest mcp → Name: lovely-docs
{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}Settings → Developer → "Edit Config" → Add to claude_desktop_config.json
claude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs@latest mcpclaude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs@latest mcpclaude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs@latest mcpclaude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs@latest mcpclaude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs@latest mcpRun the command in your terminal.
gemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs@latest mcpgemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs@latest mcpgemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs@latest mcpgemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs@latest mcpgemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs@latest mcpRun the command in your terminal.
[mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs@latest",
"mcp"
][mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs@latest",
"mcp"
][mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs@latest",
"mcp"
][mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs@latest",
"mcp"
][mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs@latest",
"mcp"
]Add to ~/.codex/config.toml
{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}Add to opencode.jsonc configuration file
{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}Ctrl+Alt+, (or "zed: open settings") → Add to settings.json (~/.config/zed/settings.json)
{
"mcpServers": {
"lovely-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
],
"tools": [
"*"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
],
"tools": [
"*"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
],
"tools": [
"*"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
],
"tools": [
"*"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
],
"tools": [
"*"
]
}
}
}Repository Settings → Copilot → Coding agent → Edit MCP configuration
Command: npx
Args: -y lovely-docs@latest mcpCommand: npx
Args: -y lovely-docs@latest mcpCommand: npx
Args: -y lovely-docs@latest mcpCommand: npx
Args: -y lovely-docs@latest mcpCommand: npx
Args: -y lovely-docs@latest mcpRefer to your client's documentation for adding MCP servers.