---
title: "Discussion on \"Build an MCP server that answers questions about your codebase in about 100 lines of Python\" | Hashnode"
description: "Discussion on \"Build an MCP server that answers questions about your codebase in about 100 lines of Python\". TL;DR\n\nA custom MCP server in Python is one file: create an MCPServer from the official mcp SDK, put @mcp.tool() on plain functions, call mcp.run(). On mcp 1.x the same class is FastMCP.\nThe server be"
url: "https://hashnode.com/posts/build-an-mcp-server-that-answers-questions-about-your-codebase-in-about-100-lines-of-python/6b12bcde362e28e6ff83bdf1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Build an MCP server that answers questions about your codebase in about 100 lines of Python](https://repowise.hashnode.dev/build-an-mcp-server-that-answers-questions-about-your-codebase-in-about-100-lines-of-python?utm_source=hashnode&utm_medium=feed)

TL;DR A custom MCP server in Python is one file: create an MCPServer from the official mcp SDK, put @mcp.tool() on plain functions, call mcp.run(). On mcp 1.x the same class is FastMCP. The server be

9h ago · 15 min read · repowise.hashnode.dev  
Read the article

-   [#ai](https://hashnode.com/tag/ai)
-   [#mcp](https://hashnode.com/tag/mcp)
-   [#python](https://hashnode.com/tag/python)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[Raghav Chamadiya](https://hashnode.com/@RaghavChamadiya)

@RaghavChamadiya

  
[View profile](https://hashnode.com/@RaghavChamadiya)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
