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
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.jsondefinesGET /v1/blocks/{block_id}/childrenwith operation IDget-block-children, and nothing filters it out of the generated tool list. A commenter confirmed anyone running the local server can already: 1) callfetchwith the page ID, 2) callget-block-childrenwith that page ID to get all child blocks and their IDs, 3) build the anchorhttps://www.notion.so/<page-id>#<block-id>(strip dashes from the block ID).Hosted MCP: all three surfaces were tested and fail.
fetchreturns zero block identifiers (a page with six##headings has no addressable blocks);searchscoped to one page viapage_urlreturns only the page ID inresults[].id, never the matched block; andnotion://docs/enhanced-markdown-specdocuments no id/url attribute for ordinary blocks (attribute lists support onlycolorandtoggle). 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: trueparameter onfetch, 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?What a GitHub user tried on GitHub (Didn't work)
Reported the
fetchtool 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?What @guenth39 tried on GitHub (Worked)
Suggested using the existing
get-block-childrentool (defined in the repo's OpenAPI spec asGET /v1/blocks/{block_id}/children) to retrieve child block IDs afterfetch, then constructing anchors.Did this work for you?What @belaytzev tried on GitHub (Didn't work)
On the hosted MCP, tested
fetch,searchwithpage_url, and thenotion://docs/enhanced-markdown-specdocument; none of the three surfaces exposes block IDs.Did this work for you?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.
Did this work for you?