MCP Guidelines 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., "@MCP Guidelines Serverfind security guidelines for cloud deployment"
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.
MCP Guidelines Server
A remote MCP server that serves versioned Enterprise & Architecture
guidelines (security / architecture / compliance policies) to LLM clients
(Claude Desktop, IDE integrations, …) over Streamable HTTP behind
static Bearer-token auth. Guidelines are plain Markdown files with YAML
frontmatter, indexed in-memory with SQLite FTS5 for ranked full-text search and
hot-reloaded on change. Built on the official mcp SDK (FastMCP) and packaged
for Docker (e.g. a Synology NAS behind a reverse proxy / Tailscale).
Features
Five core MCP tools +
find_applicableand two prompts (see Tools).Ranked full-text + tag search (SQLite FTS5,
bm25) with highlighted snippets.Hot-reload: edits in the guidelines directory are picked up without a restart (watchdog), with a
POST /reloadfallback for filesystems where inotify/FSEvents doesn't fire (NAS shares).Schema validation: malformed frontmatter is logged and skipped — never crashes.
Static Bearer-token auth; unauthenticated MCP calls get
401. Scopes are modelled (data-model ready) but not enforced in Phase 1.Structured JSON audit logging per tool call; optional Prometheus
/metrics.Per-token rate limiting and a
/healthendpoint for Docker/reverse-proxy.Read-only by design: the server never writes guidelines.
Related MCP server: SentinelScan Cloud MCP Server
Project layout
src/mcp_guidelines/
server.py # composition root: FastMCP, watcher lifecycle, ops routes, entrypoint
loader.py # read dir, parse frontmatter, validate, skip-on-error
models.py # Pydantic models (frontmatter contract + I/O shapes)
index.py # GuidelineIndex: in-memory cache + SQLite FTS5 search
auth.py # static bearer tokens, scope model, rate limiter
tools.py # MCP tool + prompt registrations
config.py # 12-factor env config
metrics.py # dependency-free Prometheus counters
logging_setup.py # JSON logging to stdout
guidelines/ # seed guidelines (security / architecture / compliance)
tests/ # loader, index/search, auth, tools (MCP protocol), HTTP (401)
Dockerfile docker-compose.yml .env.example pyproject.tomlInstallation
Requires Python ≥ 3.11.
# editable install with dev/test extras
pip install -e ".[dev]"
# or, with uv
uv syncRunning locally
AUTH_TOKENS=dev=secret GUIDELINES_PATH=guidelines mcp-guidelines
# equivalently: python -m mcp_guidelinesThe MCP endpoint is served at http://<host>:<port>/mcp (Streamable HTTP).
Clients MUST send Authorization: Bearer <token>.
curl -s localhost:8000/health # {"status":"ok","documents":4,"revision":"…"}
# unauthenticated MCP call is rejected:
curl -s -o /dev/null -w '%{http_code}\n' -X POST localhost:8000/mcp \
-H 'content-type: application/json' -d '{}' # -> 401Docker
# create your token(s) first (see "Token generation")
echo 'AUTH_TOKENS=team=PUT-A-REAL-TOKEN-HERE' > .env
docker compose up --build
curl localhost:8000/health # -> 200, container reports "healthy"docker-compose.yml mounts ./guidelines read-only into the container,
passes config via env vars, defines a healthcheck against /health, and
restarts unless stopped. Put the container behind your reverse proxy
(Synology / Traefik / nginx) or expose it over Tailscale; terminate TLS there.
Configuration (environment variables)
All configuration is via env vars (12-factor); a .env file is read when present.
See .env.example.
Variable | Default | Description |
|
| Directory of guideline |
| (empty) | Comma-separated |
| (unset) | Path to a JSON secrets file (below); entries override |
|
|
|
|
| Bind address. |
|
| Listen port. |
|
| Requests per minute per token ( |
|
| OAuth issuer URL, used only for |
| (unset) | Optional protected-resource metadata URL. |
|
| Expose Prometheus metrics at |
Token generation
Generate a strong random token and add it to AUTH_TOKENS:
python -c "import secrets; print(secrets.token_urlsafe(32))"
# AUTH_TOKENS=alice=<token1>,bob=<token2>Secrets file (AUTH_TOKENS_FILE)
For per-token scopes or to keep tokens out of the environment, point
AUTH_TOKENS_FILE at a JSON file. File entries override AUTH_TOKENS.
{
"tokens": [
{ "name": "alice", "token": "…", "scopes": ["read:all"] },
{ "name": "secaudit", "token": "…", "scopes": ["read:security"] }
]
}Scopes are recorded on the token and surfaced to the audit log. Phase 1 does not enforce them — any valid token may read everything. Enforcement is a later phase (set
required_scopesinbuild_auth_settingsand/or checktok.scopesintools._begin). Swapping in real OAuth is a drop-in replacement ofStaticTokenVerifierwith an introspection verifier (sameTokenVerifierprotocol).
Guideline frontmatter schema
Each guideline is a Markdown file with a YAML frontmatter block. Place files
under category subdirectories of GUIDELINES_PATH (the directory layout is for
humans; category comes from the frontmatter, not the path).
---
id: arch-api-design # required, unique, stable slug ([a-z0-9-])
title: API Design Guidelines # required
category: architecture # required, slug (e.g. security|architecture|compliance)
tags: [rest, versioning, http] # optional
version: 2.1.0 # required, SemVer
status: active # required: draft | active | deprecated
owner: platform-team # required
updated: 2026-06-01 # required, ISO date
applies_to: [backend, api] # optional: scope/domains (drives find_applicable)
supersedes: arch-api-v1 # optional
---
# API Design Guidelines
… actual content …idandcategorymust be slugs;versionmust be SemVer;statusis one of the three literals. Files that fail validation (bad YAML or schema) are logged and skipped — the server keeps running.Unknown extra frontmatter keys are allowed and ignored.
status: deprecatedguidelines still appear in search, flagged with awarning(andsupersedeswhen set).
Tools and prompts
Tool | Input | Output |
|
| summaries (id, title, category, tags, version, status) |
|
|
|
|
| ranked hits with |
| – | categories with counts |
|
| frontmatter only (token-sparing) |
|
| active guidelines overlapping the context, ranked by overlap |
Prompts: apply_guideline(id, code) (check code against one guideline) and
review_against_category(category, code) (review against all active guidelines
in a category).
Connecting a client
Use any MCP client that speaks Streamable HTTP. Point it at
http://<host>:<port>/mcp with header Authorization: Bearer <token>, e.g.:
npx -y @modelcontextprotocol/inspector
# URL: http://localhost:8000/mcp Header: Authorization: Bearer <token>Operational endpoints
Endpoint | Method | Auth | Purpose |
| GET | public | Liveness/readiness: |
| GET | public | Prometheus text exposition (when |
| POST | Bearer | Force a full re-read of the guidelines directory (hot-reload fallback). |
| POST | Bearer | The MCP Streamable HTTP endpoint. |
Maintaining guidelines
Guidelines live in a versioned Git repo (keep version/updated current).
To add or change one:
Drop or edit a
.mdfile under a category directory inGUIDELINES_PATH.The file watcher applies the change within moments — no restart needed.
If your filesystem doesn't deliver watch events (some NAS shares), trigger a reload explicitly:
curl -X POST -H 'Authorization: Bearer <token>' localhost:8000/reload
The server never writes guidelines; all maintenance is via Git/the filesystem.
Development & tests
pip install -e ".[dev]"
pytest -qTests cover the loader (skip-on-error), the FTS5 index (ranked search, snippets,
category filter, deprecation flagging, hot-reload add/edit/delete), auth (token
verification, env+file principal merge, rate limiter), every tool over the real
in-memory MCP protocol, and the HTTP surface (/health, the 401 auth gate,
and /reload).
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.
Latest Blog Posts
- 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/eagleffz/demo-ea-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server