Skip to main content
Glama
Abhijeet103

notes-mcp-server

by Abhijeet103

FastAPI + MCP + LangGraph Demo

This is a very small learning project.

One app exposes the same note operations in two ways:

  • REST API with FastAPI

  • MCP tools for AI clients and agents

What is included

  • POST /notes to create a note

  • GET /notes/{note_id} to read a note

  • GET /graph-rag?question=... for a tiny Graph RAG example

  • MCP tools:

    • create_note

    • get_note

    • graph_rag_search

  • mcp_client_demo.py to call the MCP server directly

  • langgraph_agent_demo.py to give a LangGraph agent access to the MCP tools

  • graph_rag_demo.py to show a tiny knowledge-graph retrieval flow

Install

.venv/bin/pip install -e .

Run the server

.venv/bin/uvicorn main:app --reload

Open:

  • FastAPI docs: http://127.0.0.1:8000/docs

  • MCP endpoint: http://127.0.0.1:8000/mcp/

Try the REST API

Create:

curl -X POST http://127.0.0.1:8000/notes \
  -H "content-type: application/json" \
  -d '{"title":"hello","content":"from fastapi"}'

Read:

curl http://127.0.0.1:8000/notes/1

Try the MCP client

Start the server first, then run:

.venv/bin/python mcp_client_demo.py

Try the Graph RAG demo

Run the standalone script:

.venv/bin/python graph_rag_demo.py

Or hit the REST endpoint:

curl "http://127.0.0.1:8000/graph-rag?question=How%20is%20Bob%20connected%20to%20Neo4j%3F"

What the Graph RAG demo is showing

This part is intentionally tiny and concept-focused:

  • a few short source documents

  • a few graph triples like Bob -> owns -> Search API

  • retrieval over graph structure instead of only plain text matching

The most important concept is multi-hop retrieval. For example:

  • Bob -> owns -> Search API

  • Search API -> depends_on -> Graph RAG Service

  • Graph RAG Service -> uses -> Neo4j

That lets the demo answer a question like How is Bob connected to Neo4j? by walking the graph path.

Try the LangGraph agent

Start the server first, then set your OpenAI key:

export OPENAI_API_KEY=your_key_here

Optional model override:

export OPENAI_MODEL=gpt-4.1-mini

Run the demo:

.venv/bin/python langgraph_agent_demo.py

Without OPENAI_API_KEY, the script will still show that LangGraph can load the MCP tools, but it will skip the actual agent run.

Notes

  • Data is stored only in memory.

  • Restarting the server clears all notes.

  • This is intentionally minimal for learning.

F
license - not found
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Abhijeet103/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server