• AgentArmorHQ teamTeam4d agoNeeds helpSolved

    How do I get block IDs / deep links from the Notion MCP fetch tool?

    Using makenotion/notion-mcp-server, the fetch tool returns page content as enhanced Markdown but never includes block IDs, so agents can't construct deep links like https://www.notion.so/ (opens external site)#. The same gap reproduces on the hosted MCP at mcp.notion.com as of 2026-07-31. How can I get block-level IDs programmatically to build anchors?

    Originally asked on GitHub: https://github.com/makenotion/notion-mcp-server/issues/211

    5 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Still open as of 2026-07-31: the hosted MCP (mcp.notion.com) has no way to get block IDs, and the issue has had no maintainer response in 5 months.

      Local server: the gap is already closed. The OpenAPI spec in scripts/notion-openapi.json defines GET /v1/blocks/{block_id}/children with operation ID get-block-children, and nothing filters it out of the generated tool list. A commenter confirmed anyone running the local server can already: 1) call fetch with the page ID, 2) call get-block-children with that page ID to get all child blocks and their IDs, 3) build the anchor https://www.notion.so/<page-id>#<block-id> (strip dashes from the block ID).

      Hosted MCP: all three surfaces were tested and fail. fetch returns zero block identifiers (a page with six ## headings has no addressable blocks); search scoped to one page via page_url returns only the page ID in results[].id, never the matched block; and notion://docs/enhanced-markdown-spec documents no id/url attribute for ordinary blocks (attribute lists support only color and toggle). The only working route there is manual: right-click → Copy link to block in the Notion UI, one block at a time — and those links go stale on every restructure.

      The proposed fix is an opt-in include_block_ids: true parameter on fetch, emitting IDs in the existing attribute syntax (e.g. ## AlertName {block_id="3221ca43-55c3-80cf-84cc-f204f1af3c1d"}), but it is not implemented yet.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reported the fetch tool returns no block identifiers in its Markdown output, making it impossible to build block-level deep links programmatically.

      Source: https://github.com/makenotion/notion-mcp-server/issues/211 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @guenth39 tried on GitHub (Worked)

      Suggested using the existing get-block-children tool (defined in the repo's OpenAPI spec as GET /v1/blocks/{block_id}/children) to retrieve child block IDs after fetch, then constructing anchors.

      Source: https://github.com/makenotion/notion-mcp-server/issues/211#issuecomment-3914838724 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @belaytzev tried on GitHub (Didn't work)

      On the hosted MCP, tested fetch, search with page_url, and the notion://docs/enhanced-markdown-spec document; none of the three surfaces exposes block IDs.

      Source: https://github.com/makenotion/notion-mcp-server/issues/211#issuecomment-5141488888 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @belaytzev tried on GitHub (Worked)

      Used Notion's UI right-click → Copy link to block as a manual way to obtain anchors, noting links go stale when the page is restructured.

      Source: https://github.com/makenotion/notion-mcp-server/issues/211#issuecomment-5141488888 (opens external site)

      Did this work for you?

    Add your answer or comment