Permissioned MCP Server
A compact MCP server demonstrating explicit tool boundaries, least-privilege discovery, execution-time authorization, destructive-action confirmation, and metadata-only audit logs using a local note store.
README
Permissioned MCP Server
A compact Model Context Protocol server that demonstrates the parts usually missing from quickstarts: explicit tool boundaries, least-privilege discovery, execution-time authorization, destructive-action confirmation, and metadata-only audit logs.
The domain is deliberately boring: a local note store. The reference is about designing a safe boundary between an AI agent and real side effects.
What it demonstrates
- JavaScript on Node.js with the official MCP SDK v2
- Narrow read, write, and destructive tools
- Separate
notes:read,notes:write, andnotes:adminscopes - Unauthorized tools omitted from
tools/listand rejected again at execution - Identifier-bound confirmation for destructive actions
- Structured tool results and MCP behavior annotations
- Audit events that never log arguments, content, or credentials
- Atomic local persistence with restrictive file permissions
- Tests for policy, handlers, persistence, and failure cases
Run it
Requires Node.js twenty or newer.
npm install
cp .env.example .env
MCP_SCOPES=notes:read,notes:write npm start
Example client configuration:
{
"mcpServers": {
"permissioned-notes": {
"command": "node",
"args": ["/absolute/path/to/permissioned-mcp-server/src/server.js"],
"env": {
"MCP_SCOPES": "notes:read,notes:write",
"MCP_DATA_FILE": "/absolute/path/to/notes.json",
"MCP_ACTOR": "local-agent"
}
}
}
}
Start read-only. Grant notes:write only when mutation is necessary. Keep notes:admin out of the default configuration.
Tool boundary
| Tool | Scope | Side effect |
|---|---|---|
notes.list |
notes:read |
Returns metadata only |
notes.get |
notes:read |
Reads one note |
notes.create |
notes:write |
Creates one note |
notes.delete |
notes:admin |
Permanently deletes one note |
See the decision record for the reasoning behind discovery filtering, double authorization, confirmation design, audit redaction, transport choice, and storage isolation.
Verify it
npm run check
npm test
The test suite never starts a model or calls a paid API.
Production notes
This is a local stdio reference, not a turnkey hosted authorization server. Before exposing an MCP server over Streamable HTTP, add OAuth-based authorization, token audience validation, HTTPS, rate limits, tenant isolation, durable audit storage, and client-specific consent.
License
MIT
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.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
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.