Notion Terminal MCP

Notion Terminal MCP

Enables Notion Custom Agents to execute terminal commands and manage files on a Windows host via MCP, with restricted mode for safety.

Category
Visit Server

README

Notion Terminal MCP

MCP Node.js License: MIT

Give a Notion Custom Agent authenticated access to a Windows terminal and filesystem through the Model Context Protocol (MCP).

No domain? No Cloudflare account? The included one-command launcher creates a temporary HTTPS URL for you.

[!CAUTION] This server can execute commands and modify files on its host. Start in restricted mode, use a dedicated Windows account, keep the API key private, and enable full access only when you understand the consequences.

Why this project?

  • Native MCP Streamable HTTP endpoint at /mcp
  • PowerShell and Command Prompt execution
  • Read, write, list, inspect, move, create, and delete filesystem entries
  • Constant-time Bearer token or X-API-Key authentication
  • Restricted workspace mode by default
  • Explicit opt-in full host access
  • Command timeouts and configurable output/file limits
  • Host-header allowlist and filesystem-root deletion protection
  • Free, zero-account HTTPS quick tunnel for testing with Notion
  • Windows-first setup with Node.js 20+

Quick start

Requirements: Windows, Node.js 20 or newer, and npm.

git clone https://github.com/Speedstu/notion-terminal-mcp.git
cd notion-terminal-mcp
npm install
.\setup.ps1
.\start-public.ps1

The launcher verifies the official Cloudflare binary signature, starts the MCP server, and prints:

  1. The public URL to paste into Notion, such as https://random-name.trycloudflare.com/mcp.
  2. The authentication header name: Authorization.
  3. The value: Bearer <your generated key>.

Keep the PowerShell window open. A Quick Tunnel URL is temporary and changes after a restart.

Connect it to Notion

In your Notion Custom Agent settings:

  1. Open Tools & Access.
  2. Choose Add connection → Custom MCP server.
  3. Paste the /mcp URL printed by start-public.ps1.
  4. Select header-based authentication.
  5. Add Authorization: Bearer <your MCP_API_KEY>.
  6. Review every exposed tool and its confirmation policy before enabling it.

Notion Custom MCP connections require a publicly reachable hosted URL and support OAuth or header-based authentication. See the Notion documentation.

Local development

npm install
.\setup.ps1
npm run check
npm run build
npm start

Health check: http://127.0.0.1:3000/health

MCP endpoint: http://127.0.0.1:3000/mcp

Tools

Tool Purpose
terminal_execute Run a PowerShell or cmd command with a working directory and timeout
file_read Read UTF-8 or base64 file data with offsets and size limits
file_write Create, overwrite, or append UTF-8/base64 data
file_list List a directory, optionally recursively
file_stat Inspect file or directory metadata
file_mkdir Create a directory and missing parents
file_move Move or rename a filesystem entry
file_delete Permanently delete a file or explicitly recursive directory

Configuration

setup.ps1 generates an ignored .env file with a random 256-bit key.

Variable Default Description
MCP_API_KEY generated Bearer/API key; minimum 32 characters
HOST 127.0.0.1 Listening interface
PORT 3000 Listening port
FULL_ACCESS false Allow terminal and file tools outside FILES_ROOT
FILES_ROOT ./workspace Allowed root in restricted mode
ALLOWED_HOSTS localhost + Quick Tunnels Semicolon-separated Host patterns
COMMAND_TIMEOUT_MS 120000 Default command timeout
MAX_OUTPUT_BYTES 1048576 Maximum captured stdout/stderr per stream
MAX_FILE_BYTES 10485760 Maximum bytes per file read/write

To deliberately grant the server the Windows account's full permissions:

FULL_ACCESS=true

Security model

  • Requests to /mcp require a valid API key.
  • The API key is compared in constant time and never committed by default.
  • Restricted mode prevents paths outside FILES_ROOT.
  • Full access means exactly that: commands may read secrets, install software, or destroy data accessible to the Windows account.
  • Quick Tunnels are intended for development, have no uptime guarantee, and expose the endpoint to the public Internet. Authentication remains mandatory.
  • Never paste an API key, GitHub token, .env, or tunnel logs into an issue.

Please report vulnerabilities according to SECURITY.md, not through a public issue.

Roadmap

  • Linux and macOS shell adapters
  • Fine-grained per-tool allow/deny policies
  • Audit log with secret redaction
  • Long-running job management
  • Optional OAuth authorization server
  • Automated MCP protocol compatibility tests and CI

Contributions are welcome. See CONTRIBUTING.md.

License

MIT

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured