Registry / devops / mcp-code-intelligence

mcp-code-intelligence

JSON →
library0.2.3jsnpmunverified

A standalone MCP server providing local code intelligence via SQLite FTS5 full-text search with optional Ollama semantic embeddings. Current stable version 0.2.3, released monthly. Supports indexing of multiple languages (TypeScript, JavaScript, Kotlin, Java, Python, Go, Rust, C/C++, C#, Ruby, PHP, Swift, Scala, SQL, Bash, PowerShell) and offers tools for code search, symbol lookup, context retrieval, and module listing. Configuration via workspace config file and environment variables. ESM-only, requires Node >= 20.

npm install mcp-code-intelligence
INSTALL
IMPORT
SIG · MCP-CODE-INTELLIGE
M
mcp-code-intelligence
devopsjavascriptv0.2.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

server
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
import { McpServer } from '@modelcontextprotocol/sdk'
MCP SDK exports from specific subpaths since v1.0.
initialize
import { initialize } from 'mcp-code-intelligence'
const mcp = require('mcp-code-intelligence')
ESM-only, no CJS support. TypeScript types included.
SearchResult
import type { SearchResult } from 'mcp-code-intelligence'
import { SearchResult } from 'mcp-code-intelligence'
Type-only import for runtime values. SearchResult is an interface.

Initializes and runs the MCP Code Intelligence server with environment variable configuration.

import { initialize } from 'mcp-code-intelligence'; const server = initialize({ workspace: process.env.CODE_INTEL_WORKSPACE ?? process.cwd(), watch: process.env.CODE_INTEL_WATCH !== 'false', debounceMs: Number(process.env.CODE_INTEL_DEBOUNCE ?? 500), ollamaUrl: process.env.OLLAMA_URL ?? undefined, ollamaModel: process.env.OLLAMA_MODEL ?? 'nomic-embed-text', }); server.run(); console.log('MCP Code Intelligence server started.');
Debug
Known issues
breakingWorkspace must be provided via MCP initialize roots[0].uri or CODE_INTEL_WORKSPACE env var; CLI --workspace removed in 0.2.0.
fix
Configure roots in MCP client or set CODE_INTEL_WORKSPACE environment variable.
affects: >=0.2.0
breakingESM-only package; CommonJS require() will fail.
fix
Use import syntax and ensure project is ESM or use dynamic import.
affects: >=0.1.0
deprecatedOllama embedding support is experimental; default model 'nomic-embed-text' may change.
fix
Explicitly set OLLAMA_MODEL environment variable for stability.
affects: >=0.1.0
gotchaFile watcher is enabled by default; can cause high CPU in large repos.
fix
Set CODE_INTEL_WATCH=false or watchEnabled:false in config to disable.
affects: >=0.1.0
gotchaSQLite FTS5 requires SQLite compiled with FTS5 extension; embedded better-sqlite3 includes it, but custom builds may not.
fix
Use default better-sqlite3 from npm; avoid prebuilt binaries without FTS5.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'mcp-code-intelligence'
Package not installed or not in node_modules.
fix
Run 'npm install mcp-code-intelligence' in project directory.
TypeError: require(...) is not a function
Using CommonJS require() on an ESM-only package.
fix
Use 'import' syntax or set 'type': 'module' in package.json.
Error: No workspace root provided
MCP client did not send roots[0].uri and CODE_INTEL_WORKSPACE is not set.
fix
Ensure MCP client provides roots array (e.g., "roots": ["/project"]) or set CODE_INTEL_WORKSPACE env variable.
SQLITE_ERROR: no such module: fts5
better-sqlite3 compiled without FTS5 support.
fix
Reinstall better-sqlite3 from source or use a prebuilt package that includes FTS5 (e.g., @asfernandes/better-sqlite3).
Upgrade
Version history
0.2.3latest on npm
Audit
Dependencies
@modelcontextprotocol/sdkrequiredMCP SDK for server implementation
better-sqlite3requiredSQLite database engine
chokidaroptionalFile watching for incremental indexing
Agent activity
4 hits · last 30 days
node
4
Resources
mcp-code-intelligence — npm install mcp-code-intelligence · libregistry