Notion Terminal MCP
Allows Notion Custom Agents to execute terminal commands and manage files on a Windows system through MCP.
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., "@Notion Terminal MCPlist files in workspace directory"
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.
Notion Terminal MCP
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.
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
/mcpPowerShell and Command Prompt execution
Read, write, list, inspect, move, create, and delete filesystem entries
Constant-time Bearer token or
X-API-KeyauthenticationRestricted 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+
Related MCP server: Knossos
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.ps1The launcher verifies the official Cloudflare binary signature, starts the MCP server, and prints:
The public URL to paste into Notion, such as
https://random-name.trycloudflare.com/mcp.The authentication header name:
Authorization.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:
Open Tools & Access.
Choose Add connection → Custom MCP server.
Paste the
/mcpURL printed bystart-public.ps1.Select header-based authentication.
Add
Authorization: Bearer <your MCP_API_KEY>.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 startHealth check: http://127.0.0.1:3000/health
MCP endpoint: http://127.0.0.1:3000/mcp
Tools
Tool | Purpose |
| Run a PowerShell or cmd command with a working directory and timeout |
| Read UTF-8 or base64 file data with offsets and size limits |
| Create, overwrite, or append UTF-8/base64 data |
| List a directory, optionally recursively |
| Inspect file or directory metadata |
| Create a directory and missing parents |
| Move or rename a filesystem entry |
| 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 |
| generated | Bearer/API key; minimum 32 characters |
|
| Listening interface |
|
| Listening port |
|
| Allow terminal and file tools outside |
|
| Allowed root in restricted mode |
| localhost + Quick Tunnels | Semicolon-separated Host patterns |
|
| Default command timeout |
|
| Maximum captured stdout/stderr per stream |
|
| Maximum bytes per file read/write |
To deliberately grant the server the Windows account's full permissions:
FULL_ACCESS=trueSecurity model
Requests to
/mcprequire 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
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
- 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/Speedstu/notion-terminal-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server