9 minute read

How I migrated my notes from Notion to Github and Cursor using the Notion MCP

After years of maintaining my notes and documentation in Notion, I recently made the decision to migrate everything to Github and manage it all through Cursor. Notion is a powerful tool with its own AI capabilities and I’ve used it for years. But the friction of context-switching between tools and the limitations of working across multiple apps finally outweighed the benefits. I like having a “second mind” and there’s many ways to do it (Obsidian fans have strong opinions on this) but I figure that the easiest way to do this is to have lightweight markdown files that AI agents can easily index.

Now, with the Notion MCP and Cursor, this migration process is trivially easy and took ~2 minutes of prompting and then letting the agent run for 30 minutes.

The problem: working in two places at once

I was already spending most of my day in Cursor. Whether I’m writing code, managing projects, or working on research, Cursor is where I live. Every time I needed to reference my notes, document a decision, or update my knowledge base, I had to switch to Notion, navigate to the right page, make my edits, and switch back.

My notes and my work were living in separate ecosystems, and that separation was limiting what I could do with both. I already tried before to amend this by having Linear as my source of truth, and although it’s great for that, I sometimes go into more detail in my scratch notes and daily notes in Notion, which I do technically reference in my Github PRs so I can find it in the future. But it would be better if I could easily index and search without having to open Notion and scroll down to see what I wrote.

Using the Notion MCP

Instead of manually exporting my Notion workspace and dealing with cleanup scripts, I used the Notion MCP (docs for setting up the MCP are in this link) to automate the entire migration. This dramatically lowered the friction and made what would have been a tedious multi-day project into a streamlined, automated process. Instead of manually exporting data, writing cleanup scripts, and dealing with formatting issues, the AI agent can search my Notion workspace, fetch specific pages, and intelligently process the content—all through natural language instructions.

Cursor supports MCP servers out of the box, which means I could simply connect to the Notion MCP and start giving the AI instructions about what I wanted to migrate and how I wanted it organized.

The migration process

First, I started with prompting the agent in Cursor for what I wanted it to do. This required (1) having Cursor and (2) setting up the Notion MCP.

Starter prompt

Here’s what the agent responded with. I like that it asks clarifying questions so that it’s more certain that it’s doing exactly what I want. Starter prompt

After iterating back and forth with the AI agent, here’s what it proposed for a plan. Starter prompt

Then, when I pressed “Build”, it went to work. It used Notion’s MCP to get the information that I wanted it to retrieve. Starter prompt

The agent intelligently swaps between using the Notion MCP, running commands on its own, and also tracks its own progress along the way. Starter prompt

It creates new files, using the filename and folder specs I gave it, and it 100% correctly follows the data that it got from the Notion MCP (I didn’t find any hallucinations). It just took the data from the MCP and pasted it directly, which is apparent from the Notion-specific formatting that’s still in the raw output (but I prefer it this way, as it means that the entries are not generated by the LLM, which still do hallucinate even now, but rather are from the MCP itself). Starter prompt

Zooming out, here’s a screenshot of the work in progress. As you can see, the files are being made, one after the other, and the agent is trucking along. This is probably at around ~10 minutes or so of it running, and it’s able to keep to its task for a long period successfully. Starter prompt

Finally, after ~30 minutes or so, it was 100% done with its task, successfully and correctly finishing the migration and summarizing its output for me. Starter prompt

Impressively simple, pain-free migration, made possible by Cursor’s AI agents and the Notion MCP.

The benefits of markdown files in Github

Moving to markdown files stored in Github solved several problems at once:

Source control for knowledge

One of the biggest advantages is having my notes under version control. Every change is tracked, I can see the history of how my thinking has evolved, and I can roll back if needed. This is particularly valuable for documentation that changes as projects evolve or for research notes where I’m iterating on ideas.

With Notion, you have page history, but it’s limited and not as robust as Git. You can’t easily compare versions, branch your notes, or merge changes the way you can with Git. For someone who works with code daily, having that same version control for my knowledge base just makes sense.

Better integration with AI tools

This is the big one. With my notes as markdown files in my workspace, Cursor’s AI agents can directly access, search, and reference my entire knowledge base. When I’m working on a problem and need to reference past decisions or documentation, the AI can pull that context automatically.

For example, if I’m debugging an issue and I’ve documented a similar problem before, Cursor can find that documentation and suggest solutions based on my own notes. If I’m writing code that relates to a research project I’ve documented, the AI can reference that research without me having to manually copy it over.

This tight integration means my knowledge base isn’t just passive storage—it’s an active part of my development workflow.

Plain markdown files are easy to search, index, and process. AI agents are very good at indexing and searching markdown files. They’re lightweight and easy to review with grep and other similar tools.

With Notion, you’re limited to their search interface. It’s good, but it’s not as powerful or flexible as having direct file system access to your content.

Portability and longevity

Markdown files are future-proof. They’re plain text, they’ll work with any editor, and they’ll still be readable decades from now. If Cursor disappears tomorrow, I can open my notes in any text editor. If I want to switch tools in the future, I can take my notes with me with zero friction.

Notion databases and pages, while you can export them, are tied to Notion’s format and structure. Migrating away from Notion is always going to be more painful than migrating between text editors or development environments.

Automated migration with MCP

One concern people often have about migrating from Notion is the effort required. Traditionally, this would be true—exporting, cleaning up, and organizing hundreds of notes would be a multi-day project. But with the Notion MCP (Model Context Protocol), I was able to automate the entire migration process through Cursor’s AI agents. More on this in the migration section below, but the key point is that the technical barrier to migration is much lower than it used to be.

Linking between notes

One thing Notion does well is linking between pages. With markdown, I use relative links between files: [related concept](../concepts/topic.md). Cursor understands these links, and the AI can follow them when it needs context from multiple notes.

I also use wikilinks in some cases: [[concept]], which some markdown tools support. The key is that everything is still plain text and still works even if a particular linking convention isn’t supported.

The AI advantage

The real power of this setup becomes apparent when working with AI agents in Cursor. Because my notes are part of my workspace, the AI has full access to my entire knowledge base when helping me solve problems.

When I ask the AI to help with a technical problem, it can reference my previous documentation on similar issues. When I’m writing code, it can check my architectural decision records to ensure I’m following the patterns I’ve documented. When I’m researching a topic, it can cross-reference my existing notes and help me build on previous work.

Automated backlog management

One example of this integrated setup is automated backlog management. I have a backlog.md file that I use to track tasks, ideas, and follow-ups across all my work. Now I can have an AI agent review my list of notes and meeting notes and automatically update my backlog as necessary.

This is incredibly valuable because I never lose these one-off tasks or thoughts that come up during research, meetings, or brainstorming sessions. It’s essential for keeping track of my progress across many days, especially in my work where there’s a lot of idea generation and projects that don’t have immediate follow-ups but are worth considering at some point.

The agent can:

  • Extract action items from meeting notes
  • Identify ideas that need follow-up
  • Categorize tasks by priority or project
  • Update the backlog with proper formatting and links

This automated process helps me keep track of the many possible ideas and projects that get thrown around in research work, ensuring nothing falls through the cracks. Without this automation, I’d either have to manually review every note file (which I’d never actually do) or risk losing important follow-up items.

Here’s an example of that. Here’s the backlog of tasks that I came up with myself. Starter prompt

Now I’m asking ChatGPT to scan my notes to populate this backlog.

Starter prompt

The raw output is pretty noisy.

Starter prompt

But, having the AI agent curate it and give me the noisy list helps me to go through and trim it myself without having to go through months of notes to get the same information.

Starter prompt

Plan Mode vs. my custom planning system

I actually have my own custom planning system that I’ve been using for heavier projects. It’s designed for deep planning and thinking where the plan needs to be very detailed and requires extensive iteration.

For this Notion migration, Cursor’s Plan Mode was the perfect fit. It’s excellent for:

  • Smaller tasks and tickets
  • Generally simpler workflows
  • Projects that need planning but don’t require the depth of custom planning
  • Quick iteration and execution

I still use my custom planning system for complex research projects or when I need extensive planning with multiple stakeholders. But for day-to-day tasks like this migration, Plan Mode works really well and I use it all the time. I highly recommend it for anyone doing AI-assisted development work.

All of this happened automatically. The AI agent handled:

  • Searching Notion for the right content
  • Understanding my naming conventions by looking at examples
  • Creating the directory structure (notes/ and meeting_notes/)
  • Fetching page content through the Notion API
  • Converting to clean markdown
  • Saving files with proper naming (e.g., 2025-10-15.md for daily notes, 2025-10-15_billy.md for meeting notes)

Conclusion

This migration completely changed how I think about knowledge management. Instead of juggling between Notion and Cursor, I now have everything in one place where my AI agents can actually use my notes to help me work better. The Notion MCP made what would’ve been a painful weekend project into a 30-minute automated process—just describe what you want and let the AI handle it.

The real win isn’t just having my notes in markdown files. It’s that now when I’m debugging something, the AI can reference similar problems I’ve solved before. When I’m planning projects, it can pull insights from past research. My notes aren’t just sitting there—they’re actively making me more productive.

If you’re living in your code editor and constantly switching to a separate notes app, this approach is worth trying. The technical barrier is basically zero now with MCP, and the productivity gains are immediate. Sometimes the best solution is just bringing everything into the environment where you already spend your time.