@andend-collective/codename
v2.1.1
Published
A lightweight TypeScript-based MCP server that provides uniform, deterministic naming suggestions for code entities during AI-assisted development
Downloads
22
Maintainers
Readme
// LOCKED: 0da8db49-3635-4a0e-9012-d132bbd93fc5 STATE=locked-context
Codename
A lightweight TypeScript-based MCP (Model Context Protocol) server that provides uniform, deterministic naming suggestions for code entities during AI-assisted development.
Overview
Codename ensures all generated code follows consistent, language-appropriate naming conventions by having the LLM "ask" the MCP server for each new name. It receives the entity type and context, applies configurable language-specific rules, returns a suggested name, and logs the decision.
Features
- Deterministic Name Generation: Same input always produces the same output
- Uniform Naming Conventions: Configurable rules based on language best practices
- Complete Audit Trail: Immutable log of all naming decisions
- TypeScript Support: Built-in rules for TypeScript naming conventions
- Lightweight: Minimal dependencies, simple architecture
Installation
npm install
npm run build
npm run initThe npm run init command creates the configuration directory .reporepo/codename/ with default files.
Usage
Start the MCP server:
npm startThe server provides two main tools:
1. codename - Generate Names
{
"type": "class",
"description": "handles user authentication",
"context": "optional additional context"
}2. list-names - List Generated Names
{
"limit": 50,
"entityType": "class"
}Configuration
The server uses three configuration files in .reporepo/codename/:
codename-config.json- Project metadata and language settingscodename-rules.json- Naming convention rules (user-editable)codename.json- Immutable log of naming decisions
Supported Entity Types
class- Classes (PascalCase)interface- Interfaces (PascalCase)type- Type aliases (PascalCase)enum- Enums (PascalCase)function- Functions (camelCase)variable- Variables (camelCase)constant- Constants (UPPER_CASE)file- Files (camelCase)
Development
# Development mode with watch
npm run dev
# Run tests
npm test
# Lint code
npm run lintLicense
MIT
