powertools-lambda-dotnet icon indicating copy to clipboard operation
powertools-lambda-dotnet copied to clipboard

[I Made This]: Local MCP Document Search Server

Open walmsles opened this issue 7 months ago • 3 comments

Link to your material

https://github.com/serverless-dna/powertools-mcp

Description

This project implements an MCP server that enables Large Language Models (LLMs) to search through AWS Lambda Powertools documentation.

The server accesses the live documentation search_index.json data and re-constructs a local search index using lunr.js. This provides an identical search experience for AI Agents and returns the exact same results as a person would get on the website. With the index being local searches are super fast and the index is cached for the life of the server to save rebuilding used indexes. Since the MCP Server uses real search data it is capable of working for any Powertools document site so naturally supports ALL the runtimes.

It provides 2 tools for AI:

search_docs: For searching a mkdocs index (first time use will create the session cached index)

fetch_doc_page: A simple webscraper that fetches a Powertools document URL page and returns the main content div as markdown for the AI to consume. Only pages from Powertools document sites can be loaded by this tool (all other domains are rejected).

I hope you find this useful!

Preferred contact

https://www.linkedin.com/in/walmsles/

(Optional) Social Network

No response

(Optional) Additional notes

I have released this as the "Unofficial Powertools MCP Server" because its not endorsed by AWS and I want to respect that the AWS Powertools team should control the projects.

I am more than happy to donate this to the Powertools team as an official project starting point if there is interest.

Other important note about this: I am researching and plan to contact mkdocs to see if they are interested in me creating a core project that baselines the mkdocs MCP Server and officially leverage their index code from mkdocs. Right now the index loading is reverse engineered because the search_index.json is custom for the way mkdocs sets up its search engine configuration via the plugin.

Acknowledgment

  • [x] I understand this content may be removed from Powertools for AWS Lambda (.NET) documentation if it doesn't conform with the Code of Conduct

walmsles avatar Apr 22 '25 08:04 walmsles

Thanks for opening your first issue here! We'll come back to you as soon as we can. In the meantime, check out the #dotnet channel on our Powertools for AWS Lambda Discord: Invite link

boring-cyborg[bot] avatar Apr 22 '25 08:04 boring-cyborg[bot]

Hey @walmsles I saw it earlier today on LinkedIn, this is amazing. Will have a go at it later today!! Thanks for doint it and raising the issue!!

hjgraca avatar Apr 22 '25 08:04 hjgraca

Its pretty cool - I am making some videos about MCP at the moment because its pretty amazing to watch it go! What is even cooler is the implementation is website agnostic - so works for any mkdocs site

walmsles avatar Apr 22 '25 08:04 walmsles

[celebrate] Michael Walmsley reacted to your message:


From: Henrique Graca @.> Sent: Tuesday, May 6, 2025 11:03:28 AM To: aws-powertools/powertools-lambda-dotnet @.> Cc: Michael Walmsley @.>; Mention @.> Subject: Re: [aws-powertools/powertools-lambda-dotnet] [I Made This]: Local MCP Document Search Server (Issue #855)

Closed #855https://github.com/aws-powertools/powertools-lambda-dotnet/issues/855 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/aws-powertools/powertools-lambda-dotnet/issues/855#event-17535230894, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAUULDRHHRBK3TQUIYJE5DD25CJIBAVCNFSM6AAAAAB3TA4AKOVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJXGUZTKMRTGA4DSNA. You are receiving this because you were mentioned.Message ID: @.***>

walmsles avatar May 06 '25 11:05 walmsles