Skip to main content
Glama
Code Declaration Lookup MCP Server

Code Declaration Lookup MCP Server

by osinmv

Code Declaration Lookup MCP Server

An MCP server that provides full text search for code declarations. Uses SQLite with FTS5 and universal ctags to index and search functions, classes, structures, enums, and other code elements. Supports all languages that ctags supports including Python, C, Go, C++, JavaScript, Rust, Java, and many others.

Requirements

  • Python 3.13

  • Universal Ctags 6.2.0

  • SQLite with FTS5 support (included in Python 3.13)

Related MCP server: syntax-map-mcp

Installation

git clone git@github.com:osinmv/function-lookup-mcp.git
cd function-lookup-mcp
claude mcp add api-lookup $(pwd)/run.sh -s user

Extending the Index

Just ask your coding agent to index your header folder. The indexing process respects your project's .gitignore file to avoid indexing unwanted files. Alternatively, you can generate ctags files manually using universal ctags:

ctags --output-format=json --fields=+Sf --kinds-C=+p -R -f apis/your_api.ctags /path/to/your/headers

Or drop existing ctags files into the apis/ folder and restart the MCP server to update the index.

MCP functions

search_declarations(name: str, offset: int = 0, limit: int = 10) - Search for code declarations by name

list_indexed_apis() - List all indexed API files

list_api_files(api_name: str, offset: int = 0, limit: int = 100) - List all unique file paths for a specific API

list_functions_by_file(file_path: str, offset: int = 0, limit: int = 100) - List all functions found in a specific file

generate_ctags(include_directory: str) - Generate ctags from source files and add to index

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      Exposes tools for AI assistants to query a persistent SQLite+FTS5 index of C/C++ symbols parsed from real build commands, enabling sub-millisecond lookup, full-text search, and natural-language explanation without hallucination.
      37
      221 PyPI
      10
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      Enables code analysis of JavaScript, TypeScript, TSX, Python, and Rust files using Tree-sitter, providing symbol listing, definition/reference lookup, AST queries, LSP-style features, and SQLite indexing for efficient cross-file searches.
      21
      29 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables local semantic code search across repositories using natural language, with AST-aware chunking and hybrid vector/FTS5 retrieval.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude Code to search and retrieve information from its past session transcripts, including tool calls, errors, and project-specific history, via an SQLite FTS5 full-text search index.
      7 npm
      MIT