Notion + mcp-agent: Complete MCP Integration
Notion is a MCP server that Notion's official hosted MCP server providing secure AI tool access to workspace content including pages, databases, and comments through OAuth authentication..
When integrated with mcp-agent, you can:
- Search and retrieve live context from Notion workspace based on user access and permissions
- Access and query Notion databases to retrieve structured information
- Read page content and metadata from workspace pages you have access to
This guide provides step-by-step instructions to set up Notion in mcp-agent, including configuration, examples, and troubleshooting.
What You'll Achieve
After completing this setup:
- Notion will be fully integrated and operational
- You can use Notion tools directly in mcp-agent
- All Notion capabilities will be available for your workflows
- Access to 4 different tools
Prerequisites
Before starting, ensure you have:
- Node.js 18 or higher (for STDIO transport only)
- Active Notion workspace with appropriate access permissions
- MCP client that supports remote servers (HTTP/SSE) or STDIO transport
- Notion account with workspace access
- Supported AI tool with MCP client capabilities
- Permission to connect external applications to workspace
- mcp-agent installed and configured
- Compatible operating system (Python 3.9+, pip Installation, uv Installation, Temporal (Optional))
Installation
Step 1: Install Notion
Install using npm:
npx -y mcp-remote https://mcp.notion.com/mcp
Verify installation:
Connection verified through OAuth flow in your AI tool
Configuration
Step 2: Configure mcp-agent
- Open mcp-agent settings
- Navigate to MCP server configuration
- Add Notion server with appropriate settings
- Save and restart if needed
Examples
Once configured, you can use Notion in mcp-agent:
Create Project Documentation
Generate PRDs, tech specs, or architecture docs by pulling context from existing Notion pages
Ask mcp-agent: "Create a technical specification for the new authentication system based on our security guidelines in Notion"
Expected Result: AI retrieves security guidelines from Notion workspace and generates comprehensive tech spec
Track Campaign Progress
Monitor and report on campaign status using Notion database data
Ask mcp-agent: "Give me a summary of all marketing campaigns in progress with their current metrics"
Expected Result: AI queries the campaigns database and provides formatted progress report
Search Meeting Notes
Find specific information across all meeting notes in workspace
Ask mcp-agent: "What decisions did we make about the API redesign in recent meetings?"
Expected Result: AI searches meeting notes and returns relevant decisions with links to source pages
Generate Release Notes
Build release documentation by aggregating information from multiple Notion pages
Ask mcp-agent: "Create release notes for version 2.0 using our changelog and feature pages"
Expected Result: AI compiles information from multiple pages into formatted release notes
Task Management
Query and analyze tasks from Notion databases
Ask mcp-agent: "Show me all overdue tasks assigned to the engineering team"
Expected Result: AI filters and presents overdue engineering tasks with details and links
Testing Your Setup
- Launch mcp-agent
- Verify Notion is available in the tools list
- Test basic Notion functionality
Troubleshooting
Common Issues
AI Tool Cannot Connect to Notion MCP
Symptoms: Connection timeout or failed errors, Notion MCP not appearing in tool directory, OAuth flow not starting
Cause: AI tool may not support MCP clients or remote MCP connections
Solution:
- Verify your AI tool supports MCP client functionality
- Check if tool supports remote MCP servers (HTTP/SSE transport)
- For tools without remote support, use STDIO with mcp-remote proxy: npx -y mcp-remote https://mcp.notion.com/mcp
- If tool lacks MCP support entirely, request feature from developers
OAuth Connection Fails
Symptoms: Authorization screen does not appear, Cannot complete OAuth flow, Connection succeeds but no workspace access
Cause: OAuth flow interrupted or workspace permissions issue
Solution:
- Use Notion app Settings > Connections > Notion MCP for easiest setup
- Ensure popup blockers are disabled during OAuth
- Check you have appropriate workspace permissions
- Try disconnecting and reconnecting through Notion app
Cannot Access Specific Pages or Databases
Symptoms: Some content returns not found errors, Searches return incomplete results, Database queries fail or return empty
Cause: Content access based on user permissions - AI tool can only see what you can see
Solution:
- Verify you have access to the pages/databases in Notion app
- Check workspace sharing settings for restricted content
- Ensure pages are not in private sections you cannot access
- Contact workspace admin if you need broader access
STDIO Transport Connection Issues
Symptoms: mcp-remote command fails, Connection drops frequently, Slow response times
Cause: STDIO transport requires mcp-remote proxy for hosted Notion MCP
Solution:
- Prefer Streamable HTTP or SSE transport if your tool supports it
- Ensure Node.js and npx are properly installed for STDIO
- Use config: npx -y mcp-remote https://mcp.notion.com/mcp
- Check network connectivity to mcp.notion.com
Tool Does Not Support Remote MCP Servers
Symptoms: Only local/STDIO servers work in tool, HTTP/SSE connections not available, No option to add remote server URL
Cause: Some MCP clients only support local STDIO servers
Solution:
- Use mcp-remote as proxy to convert HTTP to STDIO
- Configuration: command: npx, args: [-y, mcp-remote, https://mcp.notion.com/mcp]
- Alternative: Use open-source notion-mcp-server for local deployment
- Check tool documentation for remote server support roadmap
Import Error - Module Not Found
Symptoms: ModuleNotFoundError: No module named mcp_agent, Import fails
Cause: mcp-agent not installed or wrong Python environment
Solution:
- Verify installation: pip show mcp-agent
- Ensure using correct Python environment/virtualenv
- Reinstall: pip install --upgrade mcp-agent
- Check Python version is 3.9 or higher
MCP Server Connection Failures
Symptoms: Server not starting, Connection timeout, Tool execution errors
Cause: Invalid MCP server configuration or missing dependencies
Solution:
- Verify npx is installed and accessible (required for stdio servers)
- Check MCP server package name and arguments are correct
- Test server independently: npx -y @modelcontextprotocol/server-filesystem /path
- Review agent logs for detailed error messages
- Ensure required environment variables are set
LLM API Authentication Errors
Symptoms: 401 Unauthorized, API key invalid, Provider authentication failed
Cause: Missing or incorrect API keys for LLM provider
Solution:
- Set environment variables: ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.
- Verify API key is valid and has correct permissions
- Check API key format matches provider requirements
- Pass api_key parameter explicitly in Agent initialization
Workflow Execution Failures
Symptoms: Workflow hangs, Timeout errors, Incomplete results
Cause: Workflow pattern misconfiguration or task complexity
Solution:
- Increase timeout values for long-running tasks
- Break complex workflows into smaller steps
- Verify all workflow dependencies are available
- Check Temporal backend is running (for production deployments)
- Review workflow logs for specific error messages
Temporal Backend Connection Issues
Symptoms: Cannot connect to Temporal, Workflow registration fails, Worker errors
Cause: Temporal server not running or misconfigured
Solution:
- Verify Temporal server is running: temporal server health
- Check Temporal connection settings (host, port, namespace)
- Ensure Temporal workers are registered correctly
- Review Temporal server logs for connection errors
- Start local Temporal dev server: temporal server start-dev
Performance Issues with Large Workflows
Symptoms: Slow execution, High memory usage, Timeout errors
Cause: Inefficient workflow design or resource constraints
Solution:
- Use map-reduce pattern for parallelizable tasks
- Implement batching for large data processing
- Enable Temporal backend for better resource management
- Monitor agent memory usage and optimize task size
- Consider streaming responses for large outputs
Notion not appearing in mcp-agent
Symptoms: Server not listed, Tools not available
Cause: Configuration or installation issue
Solution:
- Verify configuration syntax
- Check Notion installation
- Restart mcp-agent
- Check logs for error messages
Next Steps
Now that Notion is integrated with mcp-agent:
- Explore all Notion capabilities through mcp-agent
- Check out other MCP servers that work with mcp-agent
- Join the MCP community for tips and support
- Consider contributing to Notion development
Need Help?
- Search for Notion documentation
- Check the mcp-agent MCP guide
- Join the MCP community discussions