SQLite Literature Manager MCP server

Integrates literature management operations with knowledge graphs to enable flexible paper tracking, structured note-taking, and research trend analysis.
Back to servers
Setup instructions
Provider
YU Zongmin
Release date
Dec 25, 2024
Language
Python
Stats
11 stars

This MCP server provides a flexible system for managing various types of sources like papers, books, and webpages, integrating them with knowledge graphs. It allows you to track source information, take notes, and establish connections between sources and entities in your knowledge base.

Installation

Prerequisites

Before installing, ensure you have access to the MCP Memory Server for persistent knowledge graph storage.

Setup Database

First, create a new SQLite database using the provided schema:

# Create a new database
sqlite3 sources.db < create_sources_db.sql

Install the Server

Install the source management server using fastmcp:

# Install for Claude Desktop with your database path
fastmcp install source-manager-server.py --name "Source Manager" -e SQLITE_DB_PATH=/path/to/sources.db

Usage

Managing Sources

The system supports various source types and multiple identifiers per source.

Adding a Paper Source

add_source(
    title="Attention Is All You Need",
    type="paper",
    identifier_type="arxiv",
    identifier_value="1706.03762",
    initial_note={
        "title": "Initial thoughts",
        "content": "Groundbreaking paper introducing transformers..."
    }
)

Adding Additional Identifiers

add_identifier(
    title="Attention Is All You Need",
    type="paper",
    current_identifier_type="arxiv",
    current_identifier_value="1706.03762",
    new_identifier_type="semantic_scholar",
    new_identifier_value="204e3073870fae3d05bcbc2f6a8e263d9b72e776"
)

Adding a Webpage Source

add_source(
    title="Understanding Transformers",
    type="webpage",
    identifier_type="url",
    identifier_value="https://example.com/transformers",
)

Taking Notes on Sources

Add structured notes to your sources:

add_note(
    title="Attention Is All You Need",
    type="paper",
    identifier_type="arxiv",
    identifier_value="1706.03762",
    note_title="Implementation details",
    note_content="The paper describes the architecture..."
)

Linking Sources to Entities

Connect your sources to knowledge graph entities:

link_to_entity(
    title="Attention Is All You Need",
    type="paper",
    identifier_type="arxiv",
    identifier_value="1706.03762",
    entity_name="transformer",
    relation_type="introduces",
    notes="First paper to introduce the transformer architecture"
)

Querying Sources by Entity

Retrieve sources related to specific entities:

get_entity_sources(
    entity_name="transformer",
    type_filter="paper",
    relation_filter="discusses"
)

Best Practices

Source Management

  • Use consistent titles across references
  • Provide as many identifiers as available
  • Keep notes structured with clear titles
  • Use appropriate source types

Entity Linking

  • Be specific with relation types
  • Add contextual notes to relationships
  • Verify entity names against memory graph
  • Keep entity relationships focused

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "source-manager" '{"command":"python","args":["source-manager-server.py"],"env":{"SQLITE_DB_PATH":"/path/to/sources.db"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "source-manager": {
            "command": "python",
            "args": [
                "source-manager-server.py"
            ],
            "env": {
                "SQLITE_DB_PATH": "/path/to/sources.db"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "source-manager": {
            "command": "python",
            "args": [
                "source-manager-server.py"
            ],
            "env": {
                "SQLITE_DB_PATH": "/path/to/sources.db"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later