Code Declaration Lookup MCP Server

Code Declaration Lookup MCP Server

Fast, language-agnostic code declaration search and lookup server via MCP.

2
Stars
1
Forks
2
Watchers
0
Issues
Provides a Model Context Protocol (MCP) server that indexes code declarations using universal ctags and SQLite with FTS5 full-text search. Offers search and listing functionality for functions, classes, structures, enums, and other code elements across any language supported by ctags. Enables seamless integration with coding agents for dynamic indexing, respects .gitignore, and supports ctags file ingestion and management.

Key Features

MCP-compliant server implementation
Full text search for code declarations using FTS5 and SQLite
Universal ctags integration for multi-language support
Dynamic and manual code indexing
Efficient handling of large codebases
Respects .gitignore for selective indexing
Listing and filtering of indexed API files
Search and exploration of code structure by file or API
Easy extension via manual ctags files
Integration with coding agents for automated workflows

Use Cases

Quickly searching for functions, classes, or enums in large codebases
Integrating code lookup capabilities into developer tools or agents
Enabling AI agents to retrieve and reason about source code context
Automating API discovery and documentation workflows
Supporting code review by facilitating targeted code exploration
Indexing and searching cross-language codebases
Providing context-aware code assistance and completion
Accelerating onboarding by surfacing code structure
Tracking changes to code declarations over time
Enhancing static analysis with rapid lookup of symbols and APIs

README

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)

Installation

bash
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:

bash
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

Star History

Star History Chart

Repository Owner

osinmv
osinmv

User

Repository Details

Language Python
Default Branch master
Size 95 KB
Contributors 1
MCP Verified Nov 12, 2025

Programming Languages

Python
98.73%
Shell
1.27%

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • FastMCP

    FastMCP

    The fast, Pythonic way to build MCP servers and clients.

    FastMCP is a production-ready framework for building Model Context Protocol (MCP) applications in Python. It streamlines the creation of MCP servers and clients, providing advanced features such as enterprise authentication, composable tools, OpenAPI/FastAPI generation, server proxying, deployment tools, and comprehensive client libraries. Designed for ease of use, it offers both standard protocol support and robust utilities for production deployments.

    • 20,201
    • MCP
    • jlowin/fastmcp
  • Ancestry MCP Server

    Ancestry MCP Server

    MCP server for managing and interacting with GEDCOM genealogy files

    Ancestry MCP Server is a Python-based server that implements the Model Context Protocol (MCP) to enable operations on GEDCOM (.ged) genealogy files. It allows for reading, parsing, listing, renaming, and searching within GEDCOM files, primarily used for family history research. The server supports integration with tools like Claude Desktop and provides a standardized interface for programmatic access to ancestry data. Operations are restricted to user-specified directories for data safety.

    • 27
    • MCP
    • reeeeemo/ancestry-mcp
  • Exa MCP Server

    Exa MCP Server

    Fast, efficient web and code context for AI coding assistants.

    Exa MCP Server provides a Model Context Protocol (MCP) server interface that connects AI assistants to Exa AI’s powerful search capabilities, including code, documentation, and web search. It enables coding agents to retrieve precise, token-efficient context from billions of sources such as GitHub, StackOverflow, and documentation sites, reducing hallucinations in coding agents. The platform supports integration with popular tools like Cursor, Claude, and VS Code through standardized MCP configuration, offering configurable access to various research and code-related tools via HTTP.

    • 3,224
    • MCP
    • exa-labs/exa-mcp-server
  • MCP Language Server

    MCP Language Server

    Bridge codebase navigation tools to AI models using MCP-enabled language servers.

    MCP Language Server implements the Model Context Protocol, allowing MCP-enabled clients, such as LLMs, to interact with language servers for codebase navigation. It exposes standard language server features—like go to definition, references, rename, and diagnostics—over MCP for seamless integration with AI tooling. The server supports multiple languages by serving as a proxy to underlying language servers, including gopls, rust-analyzer, and pyright.

    • 1,256
    • MCP
    • isaacphi/mcp-language-server
  • Sourcerer MCP

    Sourcerer MCP

    Semantic code search & navigation MCP server for efficient AI agent context retrieval.

    Sourcerer MCP provides a Model Context Protocol (MCP) server that enables AI agents to perform semantic code search and navigation. By indexing codebases at the function, class, and chunk level, it allows agents to retrieve only the necessary code snippets, greatly reducing token consumption. The tool integrates with Tree-sitter for language parsing and OpenAI for generating code embeddings, supporting advanced contextual code understanding without full file ingestion.

    • 95
    • MCP
    • st3v3nmw/sourcerer-mcp
  • Octocode MCP

    Octocode MCP

    Enterprise-grade AI context server for codebase research and analysis.

    Octocode MCP is a Model Context Protocol (MCP) server designed to enable AI assistants to search, analyze, and extract insights from millions of GitHub repositories with high security and token efficiency. It offers intelligent orchestration for deep code research, planning, and agentic workflows, streamlining the process of building and understanding complex software projects. The platform features robust tools and commands, such as /research for expert code research, designed to support developers and AI systems with context-rich information.

    • 577
    • MCP
    • bgauryy/octocode-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results