Skip to main content
Glama

EN 中文

Code Search MCP Server

High-performance, batch-oriented MCP (Model Context Protocol) code understanding toolkit for AI agents, specially optimized for Java.

Designed to solve the challenge where AI agents get "lost" in large codebases or lack precise context. It focuses on deep parsing, parallel batch processing, and panoramic context to explore large codebases efficiently, significantly reducing token usage while improving logical understanding.

Use Cases

  • Panoramic Context: Read multiple files in one call with dependency context auto-expanded.

  • Structural Mapping: Build project outlines fast with deep Java annotation awareness.

  • Precise Surgery: Precisely locate classes/methods/definitions and return in batch.

Related MCP server: Knowledge Graph MCP Server

Core Tools

Tool

Capability

Notes

view_files_full_context

Panoramic context

Batch read with dependency + model field expansion

view_files_outlines

Structural outline

Batch outline extraction with Java annotation awareness

view_code_items

Precise location

Batch locate classes/methods/definitions

Design Notes

  • stdio transport: JSON-RPC 2.0 via standard I/O.

  • Deterministic protocol: absolute paths only, no path wildcards.

  • Java outline enhancement: annotation backtracking merged into signatures.

Java Spring Deep Fit

More than just text search, it understands business logic:

  • Layer-Aware Ordering: Intelligent sorting (Controller → Service → Impl → MQ → Repository) so AI understands the business flow immediately.

  • Deep Annotation-Awareness: Instead of just seeing signatures, AI sees merged annotations (like @Transactional, @PreAuthorize) to understand business semantics.

  • Smart DI Parsing: Automatically identifies injected fields (dependencies), eliminating the need for AI to guess where userService comes from.

  • Project Structure: Full support for src/main/java and multi-module Maven/Gradle projects.

Requirements

  • Node.js v18.0.0 or later

Install & Build

npm install
npm run build

Integration

"mcpServers": {
  "code-search": {
    "command": "node",
    "args": ["{file}/code-search/index.js"]
  }
}

Tips

  • Prefer view_files_full_context for full context in one call.

  • Absolute paths are required for stability and reproducibility.

  • Complex queries should be split into precise calls.

Open Source

This project is open-sourced under the MIT License. You may use, modify, and distribute it under the license terms.

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    F
    maintenance
    A high-performance CLI tool that provides semantic code search, advanced architectural analysis, and codebase indexing with vector embeddings across multiple programming languages. Enables AI assistants to understand and navigate large codebases through graph-based relationships and intelligent code pattern detection.
    Last updated
    854
  • A
    license
    -
    quality
    D
    maintenance
    Enables fast semantic code search and analysis across 15+ programming languages. Supports searching for functions and classes, tracing code usage, detecting syntax errors, and analyzing code quality and structure.
    Last updated
    120
    32
    GPL 3.0
  • F
    license
    -
    quality
    D
    maintenance
    Enables LLMs to perform high-performance code search and analysis across multiple languages using symbol indexing, regex text search, and structural AST pattern matching. It also provides tools for technology stack detection and dependency analysis with persistent caching for optimized performance.
    Last updated
    6

View all related MCP servers

Related MCP Connectors

  • Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.

  • Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…

  • Give your AI agent a persistent map of your project's structure, dependencies, and bugs.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raintear94/code-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server