HaiAI123

Curated Global AI Tools Directory

Industry update
Flat

Building a codebase-query MCP server in about 100 lines of Python

12/03/2026 — 12/03, 21:16·1 sources (all)·1 reports (all)

Key takeaways

  • A developer built a codebase-query MCP server in about 100 lines of Python using the official mcp SDK. It parses a repository into an import…

Background & analysis

On December 3, 2026, a post in DEV Community's AI section described a custom MCP server written in roughly 100 lines of Python for querying a code repository. The author built it on the official mcp SDK: an MCPServer instance is created, plain functions are marked with the @mcp.tool() decorator, and the server is started with mcp.run(). The post notes that on mcp 1.x the same class is called FastMCP.

The server uses Python's standard-library ast module to parse a repository into an import graph and exposes three tools: who_imports, imports_of and most_imported. Counting docstrings and blank lines, the implementation comes to 116 lines.

For performance, the author tested it on a Django repository containing 2,943 Python files. The first call parses every file and took 30 to 36 seconds; after that, each query returned quickly. The report ends there and does not mention any later updates or releases of the server.

AI-generated from 1 reports · updated 2 days ago

updream
24-hour heatHeat index 25 · peak 47 · 23h ago
24 hours agonow

Reports on this story headlines open the original

Dec 3
  1. Using the official mcp SDK, the author builds an MCP server in roughly 100 lines of Python that parses a repo into an import graph with the stdlib ast module and exposes three tools: who_imports, imports_of and most_imported. On a Django repo with 2,943 Python files, the first call took 30 to 36 seconds to parse everything, after which each query returned quickly.

    DEV Community · AIAI score 59

Other stories people are talking about

How is heat calculated?About the method

Heat counts how many independent sources covered a story in the last 48 hours: one source counts once no matter how many posts it published, decaying with a 24-hour half-life. What ranks first is what many people are talking about.

This page aggregates public feeds. Headlines and summaries are machine-organized and remain the property of the original authors; verify important facts at the source. If you believe a headline or summary infringes your rights, email the contact address in the footer with the page URL and basis of your claim, and we will remove or replace it after review.

Surge
Discussion rising fast
New
First report within 6 hours
Rising
Still gathering discussion

Back to AI industry updates →