Notion Connector
Executable Notion connector for search, page retrieval, database queries, and approved page creation.
Credential setup
bearerCreate an internal integration and explicitly share only the pages it should access.
Setup docs: https://www.notion.so/profile/integrations
After adding this connector, attach the credential on the server page, then run astrail tools list.
Hosted MCP endpoint
/api/mcp/preset-notionPrivate servers require an Astrail API key in the Authorization header.
MCP client snippets
ConnectClaude Desktop config
{
"mcpServers": {
"notion-connector": {
"url": "/api/mcp/preset-notion"
}
}
}cURL initialize
curl -sS -X POST "/api/mcp/preset-notion" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'cURL tools/list
curl -sS -X POST "/api/mcp/preset-notion" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'cURL tools/call
curl -sS -X POST "/api/mcp/preset-notion" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"notion_retrieve_page","arguments":{"page_id":1}}}'Runtime behavior
healthynot_checkedsafe_rest_executionnot recordednot recordednot recordednonestructured fallbackstandardauth_required / oauth_requiredmapping_requiredAstrail does not evaluate generated TypeScript inside Next.js. Hosted calls are routed through stored tool metadata and endpoint maps.
Tools
6notion_searchSearch Notion pages and data sources.
notion_retrieve_pageRetrieve a Notion page by ID.
notion_query_data_sourceQuery a Notion data source with provider-native filters, sorts, and pagination.
notion_create_pageCreate a Notion page with provider-native parent and properties objects.
notion_retrieve_block_childrenRetrieve the child blocks of a Notion page or block.
notion_append_block_childrenAppend reviewed content blocks to a Notion page or block.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
const server = new McpServer({ name: "Notion Connector", version: "1.0.0" });
// Curated Astrail connector for: notion_search, notion_retrieve_page, notion_query_data_source, notion_create_page, notion_retrieve_block_children, notion_append_block_children.
// The hosted endpoint executes its verified deterministic endpoint map. Attach a least-privilege provider credential before calling private tools.
server.tool("connector_status", "Confirm this curated connector template is installed.", z.object({}), async () => ({
content: [{ type: "text", text: "Connector installed. Attach provider credentials to enable hosted API calls." }],
}));
const transport = new StdioServerTransport();
await server.connect(transport);