Custom autocomplete sources for @ mentions (database tables, API endpoints, etc.)

Resolved 💬 3 comments Opened Apr 6, 2026 by lewistv Closed Apr 10, 2026

The @ autocomplete for files/folders is great. It would be valuable to support registering custom completion sources for domain-specific entities like database tables, API endpoints, environment variables, etc.

Use case

I work with a MySQL database containing 200+ tables. When discussing or writing queries, I'd like to type @iz_ and see matching table names autocomplete — the same way @src/ completes file paths today.

Proposed approach

A completion provider API (perhaps via MCP or plugin config) that lets you define:

  • A trigger prefix or namespace (e.g., @db:, @api:, or just fold into existing @)
  • A shell command or MCP tool that returns completion candidates
  • Optional: caching strategy (static list vs. dynamic query)

Example config:

{
  "completionSources": [
    {
      "name": "database-tables",
      "prefix": "@db:",
      "command": "mysql --defaults-file=~/.mysql/web4.cnf -N -e 'SHOW TABLES'"
    }
  ]
}

This would make Claude Code significantly more powerful for developers working with large schemas, REST APIs, or any project with domain-specific vocabulary that benefits from discoverability.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗