Skip to main content

lci MCP Server

The lci MCP server provides sub-millisecond semantic code search with intelligent context reduction, enabling codebase navigation and dependency understanding.

Installation

# Using npx (recommended)
npx @standardbeagle/lci@latest mcp

# Global installation
npm install -g @standardbeagle/lci
lci mcp

Configuration

Claude Code

{
"mcpServers": {
"lci": {
"command": "npx",
"args": ["-y", "@standardbeagle/lci@latest", "mcp"],
"env": {
"LCI_INDEX_PATH": ".lci-index"
}
}
}
}

Environment Variables

VariableDescriptionDefault
LCI_INDEX_PATHPath to index storage.lci-index
LCI_EXCLUDE_PATTERNSPatterns to excludenode_modules,dist,build
LCI_MAX_FILE_SIZEMax file size to index1MB

Available Tools

ToolDescriptionParameters
searchSemantic code searchquery: string, limit?: number
search_by_typeSearch by symbol typetype: string, query?: string
search_filesSearch file namespattern: string

Context

ToolDescriptionParameters
get_contextGet symbol contextsymbol: string, depth?: number
get_definitionGet symbol definitionsymbol: string
get_referencesFind all referencessymbol: string
get_callersFind callerssymbol: string
get_calleesFind calleessymbol: string

Exploration

ToolDescriptionParameters
exploreExplore codebase structurepath?: string, depth?: number
list_symbolsList symbols in filefile: string
list_filesList files in directorypath?: string
get_file_infoGet file metadatafile: string

Index Management

ToolDescriptionParameters
index_statusCheck index status-
reindexRebuild the indexforce?: boolean
add_to_indexAdd files to indexpaths: string[]

Usage Examples

// Search for authentication logic
const results = await search({
query: "user authentication login",
limit: 10
});

console.log(results);
// Output: {
// results: [
// { file: "src/auth/login.ts", symbol: "authenticate", score: 0.95 },
// { file: "src/middleware/auth.ts", symbol: "verifyToken", score: 0.87 }
// ],
// context_reduction: 0.79
// }

Get Symbol Context

// Get context for a function
const context = await get_context({
symbol: "UserService.authenticate",
depth: 2
});

console.log(context);
// Output: {
// definition: "async authenticate(email: string, password: string): Promise<User>",
// file: "src/services/UserService.ts",
// line: 45,
// callers: ["AuthController.login", "AuthMiddleware.verify"],
// callees: ["hashPassword", "generateToken"],
// documentation: "Authenticates a user by email and password..."
// }

Explore Structure

// Explore directory structure
const structure = await explore({
path: "src/components",
depth: 2
});

console.log(structure);
// Output: {
// directories: [...],
// files: [...],
// symbol_count: 156,
// types: { class: 12, function: 89, interface: 15 }
// }

Find References

// Find all references to a symbol
const refs = await get_references({
symbol: "config"
});

console.log(refs);
// Output: {
// references: [
// { file: "src/index.ts", line: 5, context: "import { config } from..." },
// { file: "src/api/server.ts", line: 12, context: "const port = config.port" }
// ],
// count: 23
// }

Index Building

The index is built automatically on first use. You can also trigger manually:

// Check index status
const status = await index_status();
// { indexed: true, files: 234, symbols: 1567, last_updated: "..." }

// Force reindex
await reindex({ force: true });

Supported Languages

LanguageFile ExtensionsFeatures
TypeScript.ts, .tsxFull support
JavaScript.js, .jsxFull support
Python.pyFull support
Go.goFull support
Rust.rsFull support
Java.javaPartial support
C/C++.c, .cpp, .hPartial support

Response Format

All tools return responses in this format:

{
"success": true,
"data": { ... },
"metadata": {
"query_time_ms": 0.5,
"context_reduction": 0.79
}
}

Performance

OperationTypical Time
Search<1ms
Get context<2ms
Explore<5ms
Reindex~100ms per 1000 files

Context Reduction

lci achieves 79.8% context reduction by:

  1. Symbol extraction: Only relevant symbols
  2. Relationship filtering: Related code only
  3. Documentation prioritization: Comments and docs first
  4. Noise elimination: Exclude boilerplate

Error Codes

CodeDescription
INDEX_NOT_READYIndex not yet built
SYMBOL_NOT_FOUNDSymbol doesn't exist
FILE_NOT_FOUNDFile doesn't exist
PARSE_ERRORFailed to parse file

Version History

VersionChanges
0.3.0Cross-platform improvements
0.2.0Added more languages
0.1.0Initial release