
NetDocuments MCP Server
Enables users to search and fetch NetDocuments files through OAuth authentication. Binary files are automatically converted to plaintext for AI model consumption.
README
NetDocuments MCP (Draft)
Minimal remote MCP server for ChatGPT connectors that lets users search and fetch NetDocuments files via per-user OAuth (Authorization Code + PKCE). Binary files are downloaded and converted to plaintext (PDF/DOCX/TXT best effort) and returned to the model.
What this is
- An MCP server exposing only two tools:
search(query: string)
→{ results: [{ id, title, text, url }] }
fetch(id: string)
→{ id, title, text, url, metadata }
- Built for ChatGPT Connectors (Deep Research & chat).
- Uses Authorization Code + PKCE with scope=read.
Connectors do not upload the original binary like drag-and-drop; they consume returned text and urls.
Quickstart (Replit or local)
- Install deps
pip install -r requirements.txt
-
Create
.env
from.env.example
and fill in:ND_CLIENT_ID=...
ND_CLIENT_SECRET=...
ND_REDIRECT_URI=https://<your-replit-host>.repl.co/oauth/callback
- (Optional) adjust
SEARCH_DEFAULT_TOP
,MAX_FETCH_CHARS
, region URLs.
-
Authorize once (saves tokens to
tokens.json
):
python oauth_runner.py
# browser opens: complete the ND login/approval
- Run the MCP server (SSE):
python app.py
Confirm your repl URL ends with /sse/
(FastMCP exposes this automatically).
- Connect in ChatGPT → Settings → Connectors
Add your/sse/
URL, allowsearch
andfetch
(approval: never). Test a query.
Tool behavior
search(query: string)
- Accepts a single string (per MCP spec), but also supports an inline mini-language to pass ND params:
cabinetId:<id>
— Cabinet to search (if omitted, uses the first available cabinet for the user).top:<n>
— Page size (default 50; ND allows up to 500).orderby:<relevance|lastMod>
— Sort order (desc).select:<standardAttributes>
— Returned fields set.
- Remaining words are treated as the full-text
q
parameter (pass ND query syntax directly). - Returns up to
top
results, each with{id, title, text (snippet), url}
.
fetch(id: string)
- Looks up metadata, downloads binary via
GET /v1/Document/{id}?base64=true
, decodes, and extracts plaintext:- PDF →
pdfminer.six
- DOCX →
python-docx
(toggle viaENABLE_DOCX=true
in.env
) - TXT/CSV/JSON → decoded as text
- Others → best-effort decode; if not extractable,
text
is empty with metadata hint.
- PDF →
- Truncates output over
MAX_FETCH_CHARS
withmetadata.truncated=true
.
Notes & limits
- Per-user OAuth: this MVP stores a single user's tokens in
tokens.json
. For multi-user, add a session/token store keyed per SSE connection or user subject. - Cross-cabinet search: supported by ND. If you omit
cabinetId
, we attempt a cross-cabinet call. To be precise per ND docs, some scenarios require special qualifiers inq
. Supply full ND syntax in your query if needed. - Rate limits: the client retries on 401 by refreshing; consider backoff for 429 (future work).
- Security: scope is
read
. Do not log tokens. Consider encryptingtokens.json
for real deployments.
Environment variables
See .env.example
. All values are read from .env
.
ND_CLIENT_ID
,ND_CLIENT_SECRET
,ND_REDIRECT_URI
,ND_OAUTH_SCOPE
ND_AUTH_AUTHORIZE_URL
,ND_AUTH_TOKEN_URL
,ND_API_BASE
(US by default)SERVER_HOST
,SERVER_PORT
SEARCH_DEFAULT_TOP
,SEARCH_DEFAULT_ORDER
,MAX_FETCH_CHARS
,ENABLE_DOCX
Development
- Extend
nd_client.search(...)
to expose more ND search params as needed. - Consider adding
$skiptoken
support for paging if you want "Load more". - Add per-connection token scoping if you expect multiple concurrent users.
License
MIT (draft)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.