
MCP Server
Your files,their AI,no keys shared.
A research assistant server for the Model Context Protocol: any AI app that speaks MCP can list a team's documents and summarize them.
The server holds no AI key. When it needs a summary it asks the connected AI to write it, and every team's files stay behind their own wall.
- Year
- 2025
- Role
- Design, build
- Stack
- Python · FastMCP · Pydantic
- Source
- GitHub
One command, and it is listening.
A real start, recorded in the terminal. The server loads its logging, registers its tools and waits for an AI app to connect over standard input and output.
- Framework3.0.2FastMCP
- Transportstdiolocal
- Tools2registered
Watch the AI and the server talk.

- Connect
The AI app says hello.
Any MCP client can connect: a desktop assistant, an IDE, an agent. The server introduces itself as ResearchAssistantServer.
- Discover
“What can you do?”
The server answers with its tools, each with a name, a description and typed inputs, so the AI knows exactly how to call them.
- Call
“Summarize the Q3 report.”
The AI picks summarize_document and fills in the team and the file name. A name is enough: the server finds the file itself.
- Check
Checks before reading.
The file is found, then checked against the team's wall before a single byte is read. Each step is reported back to the AI as a log line.
- Sampling
The arrow turns around.
Now the server asks the AI to write the summary. This is MCP sampling: the server borrows the client's model, so it never needs an API key of its own.
- Result
Back with a summary.
The AI writes it, the server checks that what came back is really text, reports 100% and returns the file name with its summary.
Two tools, typed and described.
A tool is a plain Python function. FastMCP reads its signature and turns it into a schema the AI can follow, so a wrong argument is caught before the function runs.
tool list_research_documents
Lists the research files and folders in a team's own folder.
- tenant_id
- str · required
- relative_path
- str = "."
- recursive
- bool = true
- include_hidden
- bool = false
- allowed_file_types
- .md .txt .pdf .csv .json .docx .pptx .xlsx
tool summarize_document
Finds a document by name, reads it and has the connected AI summarize it.
- tenant_id
- str · required
- filename
- str · with or without extension
- ctx
- logs · progress · sampling
Try to get out.
Every path goes through one check. It rejects absolute and parent paths outright, then resolves the rest, links included, and refuses anything that lands outside the team's folder.

tenant_alpha_docs/reports/q3-report.mdResolves inside the team's folder.
Every way in, tested.
- Wall · traversal
Climbing out with “..”
A path that starts by stepping up a folder is refused before it is ever resolved.
- Wall · absolute
Jumping straight to /etc/passwd.
Absolute paths are refused, even ones that point inside the server's own data.
- Wall · neighbours
Reading another team's folder.
A path built to reach tenant_beta from tenant_alpha is refused.
- Wall · links
A link that points outside.
Links are followed first, then judged by where they really land.
- Listing · 11 tests
Folders, filters and edge cases.
Recursive and flat listings, hidden files, empty folders, missing paths, a file passed as a folder, and file-type filters.
Built in Python 3.12 with FastMCP and Pydantic, with structured logging, typed errors and tests on every tool.
A learning project · built with production patterns, not running in production yet


