Skip to content

[Feature]: Respect CLAUDE_CONFIG_DIR env var #2553

Description

@sporkd

Problem Description

I'm frustrated when I set supported Claude ENV variables like CLAUDE_CONFIG_DIR, but Context7 ignores it and installs everything into hard-coded home directory ~/.claude and ~/.claude.json.

This clutters the user's home directory and does not respect the XDG Base Directory Specification.

Proposed Solution

When the supported Claude ENV variables are set, Context7 should respect them, and install to that directory instead.

For example

export XDG_CONFIG_HOME="$HOME/.config"
export CLAUDE_CONFIG_DIR="$XDG_CONFIG_HOME/claude"

Then Context7 should install to the correct directory:

~/.config/claude/.claude.json
~/.config/claude/skills/context7-mcp
~/.config/claude/rules/context7.md

See all supported Claude ENV vars

https://code.claude.com/docs/en/env-vars

Alternatives Considered

No response

Priority

Blocking my usage

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions