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.
Note: The Lovely Docs CLI is written in TypeScript, but your project can be written in any language
npx -y lovely-docs initnpx -y lovely-docs listnpx -y lovely-docs 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",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"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 mcp → Name: lovely-docs
{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}Settings → Developer → "Edit Config" → Add to claude_desktop_config.json
claude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs mcpclaude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs mcpclaude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs mcpclaude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs mcpclaude mcp add --transport stdio --scope user lovely-docs -- npx -y lovely-docs mcpRun the command in your terminal.
gemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs mcpgemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs mcpgemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs mcpgemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs mcpgemini mcp add --transport stdio --scope user lovely-docs npx -y lovely-docs mcpRun the command in your terminal.
[mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs",
"mcp"
][mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs",
"mcp"
][mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs",
"mcp"
][mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs",
"mcp"
][mcp_servers.lovely-docs]
command = "npx"
args = [
"-y",
"lovely-docs",
"mcp"
]Add to ~/.codex/config.toml
{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"mcp": {
"lovely-docs": {
"type": "local",
"command": [
"npx",
"-y",
"lovely-docs",
"mcp"
]
}
}
}Add to opencode.jsonc configuration file
{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
]
}
}
}{
"context_servers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs",
"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",
"mcp"
],
"tools": [
"*"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
],
"tools": [
"*"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
],
"tools": [
"*"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
],
"tools": [
"*"
]
}
}
}{
"mcpServers": {
"lovely-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lovely-docs",
"mcp"
],
"tools": [
"*"
]
}
}
}Repository Settings → Copilot → Coding agent → Edit MCP configuration
Command: npx
Args: -y lovely-docs mcpCommand: npx
Args: -y lovely-docs mcpCommand: npx
Args: -y lovely-docs mcpCommand: npx
Args: -y lovely-docs mcpCommand: npx
Args: -y lovely-docs mcpRefer to your client's documentation for adding MCP servers.