Archive MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Archive MCP ServerWhich IT department records are overdue for archival?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Archive MCP Server
An MCP server that exposes the Enterprise Data Archival & Records Management System's records and retention logic to any MCP client — Claude Code, Claude Desktop, Cursor, or your own client — over stdio.
Instead of clicking through the React dashboard to answer "what can we archive in Finance?", you ask the model, and it calls these tools.
Tools
Tool | What it does |
| Find records by employee, department, or document type |
| Fetch one record with its retention verdict |
| Active records past their retention period, most overdue first |
| Active vs archived counts per department |
| Month-by-month projection of what becomes archivable next |
| What the scheduled archival job did, and when |
Related MCP server: EndpointRead-MCP
Resources
URI | Contents |
| Retention period, in years, per document type |
Requirements
Python 3.10+ and MCP SDK 2.x. The v2 SDK renamed FastMCP to MCPServer
and moved it to mcp.server.mcpserver; this code targets v2. Data access is
SQLAlchemy 2.x, with psycopg2 for PostgreSQL.
Setup
python -m venv .venv
source .venv/bin/activate # macOS/Linux
.venv\Scripts\activate # Windows
python -m pip install -r requirements.txt
python seed_db.py # builds the local demo database
python server.py --selftest # sanity check, no MCP client neededThen verify it over a real MCP session:
python verify_mcp.pyChoosing a database
The server reads DATABASE_URL (from the environment, or from a .env file —
see .env.example):
| Backend |
unset |
|
set | the real archive database, e.g. |
archive.db holds synthetic records, so the server — and --selftest — run for
anyone who clones this repo without credentials. It is not a different codebase:
seed_db.py builds the same five-table schema the production database uses
(active_records, archived_records, retention_policy, audit_logs,
documents), so every query in server.py runs unchanged against either one.
Never commit a real DATABASE_URL. .env is gitignored; .env.example is
the committed template.
Connecting to Claude Code
From the project directory:
claude mcp add --scope project archive-system -- /absolute/path/to/.venv/bin/python /absolute/path/to/server.py
claude mcp list--scope project writes a committable .mcp.json at the project root, so anyone
who clones the repo gets the server. Start claude, approve the project server
when prompted, and check /mcp — archive-system should show Connected with
6 tools. Then ask:
Which IT department records are overdue for archival?
If it fails to start, run claude --debug=mcp and read the log under
~/.claude/debug/.
Connecting to Claude Desktop
Add this to claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"archive-system": {
"command": "D:\\Python\\project\\archive-mcp\\.venv\\Scripts\\python.exe",
"args": ["D:\\Python\\project\\archive-mcp\\server.py"]
}
}
}Point command at the venv's Python, not bare python — the host does not
inherit your shell's PATH or your activated virtualenv. On Windows both paths
need doubled backslashes.
Restart from the tray icon — Quit, not the window close button — or the app keeps running with the old config.
Note for the Microsoft Store (MSIX) build on Windows: its config is not under
%APPDATA% but under the package's own directory,
%LOCALAPPDATA%\Packages\Claude_<id>\LocalCache\Roaming\Claude\. It launches
local stdio servers normally. Don't try to confirm that from logs\mcp.log —
that file can sit empty and untouched while everything works. Check for the
process instead; the server runs as a child of Claude Desktop:
Get-CimInstance Win32_Process -Filter "Name like '%python%'" |
Where-Object { $_.CommandLine -like "*archive-mcp*" }Design notes
stdio transport, because the client launches the server as a subprocess on the same machine. An HTTP transport would make sense if the server ran remotely and served several clients.
One seam for storage.
_connect()returns a SQLAlchemyEngineand is the only place that knows what the database is. Queries use named bind parameters (:department), which are dialect-neutral, so SQLite and PostgreSQL share one query set rather than two.pool_pre_ping=True, because a serverless PostgreSQL (Neon and friends) suspends idle compute and an MCP server sits idle between questions. Without it, the first question after a quiet spell fails on a stale pooled connection.Eligibility is computed in Python, not SQL. PostgreSQL
INTERVALarithmetic has no SQLite equivalent, and keeping the comparison in one place keeps the two backends honest. At a few thousand active rows the cost is not worth optimising away.Age is measured from
joining_date.created_atis the bulk-load timestamp and is identical for every row, so retention computed from it would find nothing eligible, ever.joining_dateis an employee-level date standing in for a document date — the schema carries no document date, which is a real gap worth closing upstream.Archival state is a table, not a flag. A record lives in
active_recordsor inarchived_records, and ids are stable across the move, soget_recordchecks both. Thestatuscolumn is employment status and is unrelated.Tools are annotated read-only. Each carries
ToolAnnotations(read_only_hint=True, destructive_hint=False), so a client can tell a safe call from a state-changing one before it runs.Tools are read-only in fact, too. Archiving is destructive and policy-governed;
archival_candidatesdeliberately reports what could be archived and leaves the decision to the existing scheduled job. Exposing a destructive tool to a model is a choice that needs a confirmation path first.Docstrings are the API. The model picks tools from the docstring and type hints, so the valid departments and document types are enumerated there. A stale enum is worse than none: the model passes a plausible-looking value like
Legal, gets an empty result, and reports that there is nothing to archive.One definition of "eligible", used in both directions.
_verdictages a record against its retention period;_eligible_oninverts it to give the date a record crosses that period, which is whatretention_forecastbuckets by. They must agree exactly, or a record can appear as upcoming in the forecast and overdue inarchival_candidateson the same day. Writing the inverse the obvious way (joining + timedelta(days=years * 365.25)) breaks this, becausedate + timedeltakeeps only whole days and silently drops the.75.Output is formatted text, not raw JSON dumps, so the model can quote it back to a user without reformatting.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Read-only MCP access to authorized Vocci sessions, notes, files, and memory search.
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
Related MCP Servers
- AlicenseCqualityBmaintenanceA local MCP server for the LimaCharlie security platform that provides investigation, administration, and content-review workflows via a broad read-only tool surface with explicit organization scoping and audit logging.100MIT
- AlicenseBqualityBmaintenanceA read-only MCP server for Microsoft Intune and Entra ID that enables list, get, search, and reporting operations for tenant visibility, audits, troubleshooting, and health reporting without write actions. It includes authentication helpers, report exports, and metadata discovery tools.361MIT
- AlicenseNot gradedqualityAmaintenanceProvides read-only MCP tools for market snapshots, position risk, order reconciliation, and daily report previews with deterministic financial calculations, evidence chains, and audit trails.MIT
- AlicenseAqualityBmaintenanceProvides governed retrieval over MCP with hybrid search, strict confidence gating, and access control, exposing three read-only tools.3Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Surajp1602/archive-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server