home / mcp / notion mcp server

Notion MCP Server

MCP Server generated by mcp.ag2.ai

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "huazhengwang-notion-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "A JSON string with the server configuration",
        "SECURITY": "Security-related environment variables such as API keys",
        "CONFIG_PATH": "Path to a JSON configuration file like mcp_server/mcp_config.json"
      }
    }
  }
}

You run an MCP server to enable multi-agent conversations against a defined API surface. This server lets you start and manage transport modes like stdio, SSE, or streamable HTTP so clients can interact with agents via a consistent interface. It includes development tooling for linting, static analysis, testing, and easy command-driven server startup for local experimentation.

How to use

Start the MCP server in one of the supported transport modes and connect your MCP client to the provided endpoint. For local development, you will typically run in stdio mode and drive interactions through standard input/output. You can also run in SSE or streamable HTTP modes if your client supports those transports.

How to install

Prerequisites include Python 3.9 or newer, plus pip and uv to run the server and manage dependencies.

Step 1: Clone the project directory.

git clone <repository-url>
cd mcp-server

Step 2: Install development dependencies. You can install via pip or using uv to run the editable install.

pip install -e ".[dev]"
```

```
uv pip install --editable ".[dev]"

Starting the server locally

To start the server in stdio mode, run the following command. You will interact with the server through standard input and output.

python mcp_server/main.py stdio

Configuration and startup options

You can configure the server using environment variables or a configuration file. The following keys are supported in practice:

CONFIG_PATH — Path to a JSON configuration file, e.g., mcp_server/mcp_config.json.

CONFIG — A JSON string containing the configuration.

SECURITY — Environment variables that govern security parameters, such as API keys.

Available tools

lint

Runs code linting to enforce style and find potential issues using the configured toolchain.

static-analysis

Performs static analysis checks such as type checking and security scanning to catch problems early.

testing

Executes unit and integration tests to validate server behavior and coverage.

pre-commit

Runs a set of checks automatically before commits to ensure code quality.