Citations Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Citations Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server for searching and citing research papers using Retrieval-Augmented Generation (RAG). This server helps you find relevant citations, search for specific passages, and answer research questions based on your collection of PDF research papers.
┌─────────────────────────────────────────────────┐
│ MCP Client (Claude, etc.) │
└───────────────────┬─────────────────────────────┘
│ SSE Transport
┌───────────────────▼─────────────────────────────┐
│ FastAPI + Starlette │
│ MCP Server │
├─────────────────────────────────────────────────┤
│ RAG Engine │
│ ┌─────────────┐ ┌──────────────┐ │
│ │ LangChain │◄──────►│ ChromaDB │ │
│ │ Retrieval │ │ Vector Store │ │
│ └─────────────┘ └──────────────┘ │
│ │ ▲ │
│ ▼ │ │
│ ┌─────────────┐ ┌──────────────┐ │
│ │ OpenAI LLM │ │ PDF Processor│ │
│ │ & Embeddings│ │ (PyPDFLoader)│ │
│ └─────────────┘ └──────┬───────┘ │
└────────────────────────────────┼───────────────┘
│
┌────────▼────────┐
│ Research Papers │
│ (PDF Files) │
└──────────────────┘ git clone <your-repo-url>
cd citations-mcp # Using uv (recommended)
uv sync
# Or using pip
pip install -e . cp .env.example .envEdit .env and set:
OPENAI_API_KEY: Your OpenAI API keyPAPERS_DIRECTORY: Path to your folder containing PDF research papers.env.example)# Using uv
uv run uvicorn src.main:app --host 127.0.0.1 --port 8000 --reload
# Or using uvicorn directly
uvicorn src.main:app --host 127.0.0.1 --port 8000 --reloadThe server will:
http://127.0.0.1:8000http://127.0.0.1:8000/mcp/sse#### 1. search_papers Search for relevant passages in your research papers.
{
"query": "machine learning for natural language processing",
"num_results": 5
}#### 2. search_in_paper Search for relevant passages within a specific paper only.
{
"query": "transformer architecture",
"filename": "attention_is_all_you_need.pdf",
"num_results": 5
}#### 3. find_citation Find relevant citations for a specific topic, grouped by source paper.
{
"topic": "transformer architecture",
"num_citations": 3
}#### 4. answer_question Ask a research question and get an answer with sources.
{
"question": "What are the main challenges in few-shot learning?"
}#### 5. list_papers List all indexed research papers.
{}#### 6. get_paper_info Get information about a specific paper.
{
"filename": "attention_is_all_you_need.pdf"
}#### 7. rebuild_index Rebuild the vector store index (use after adding new papers). During rebuild, the server automatically:
{
"force": true
}Note: Metadata extraction uses GPT-4o API calls (one per paper), so rebuilding with many papers may incur API costs.
#### 8. extract_methodology Extract structured methodology details from a research paper.
{
"filename": "attention_is_all_you_need.pdf"
}Returns: Research approach, datasets, models, evaluation metrics, experimental setup, baselines, and implementation details.
#### 9. summarize_paper Generate a summary of a research paper with custom prompts or pre-defined focus.
{
"filename": "attention_is_all_you_need.pdf",
"focus": "key_findings" // Options: "general", "key_findings", "methodology", "limitations", "contributions"
}Or with a custom prompt:
{
"filename": "attention_is_all_you_need.pdf",
"custom_prompt": "Summarize the experimental results and their statistical significance"
}#### 10. extract_bibliography Extract the bibliography/references from a paper in APA format.
{
"filename": "attention_is_all_you_need.pdf"
}Returns: APA-formatted list of all citations used in the paper.
Add this to your Claude Desktop MCP configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"research-citations": {
"url": "http://127.0.0.1:8000/mcp/sse"
}
}
}Restart Claude Desktop and you'll see the research tools available.
To expose your server publicly via ngrok:
# Install ngrok (if not already installed)
brew install ngrok
# Configure your ngrok auth token
export NGROK_AUTHTOKEN="your_ngrok_token"
# Start the public server
./start_public.shThis will give you a public URL like https://abc123.ngrok-free.app/mcp/sse that you can use with ChatGPT or other remote MCP clients.
See NGROK_SETUP.md for detailed instructions.
| Variable | Description | Default |
|---|---|---|
OPENAI_API_KEY | OpenAI API key (required) | - |
PAPERS_DIRECTORY | Path to research papers folder (required) | - |
VECTOR_DB_PATH | Path to store vector database | ./vector_db |
COLLECTION_NAME | ChromaDB collection name | research_papers |
CHUNK_SIZE | Text chunk size for processing | 1000 |
CHUNK_OVERLAP | Overlap between chunks | 200 |
EMBEDDING_MODEL | OpenAI embedding model | text-embedding-3-small |
LLM_MODEL | OpenAI LLM model | gpt-4o-mini |
HOST | Server host | 127.0.0.1 |
PORT | Server port | 8000 |
PAPERS_DIRECTORYrebuild_index tool with force: truecitations-mcp/
├── src/
│ ├── __init__.py
│ ├── config.py # Configuration management
│ ├── pdf_processor.py # PDF loading and chunking
│ ├── rag_engine.py # RAG pipeline and search
│ ├── mcp_server.py # MCP tool definitions
│ ├── sse_transport.py # SSE transport layer
│ └── main.py # FastAPI application
├── pyproject.toml # Dependencies
├── .env.example # Environment template
└── README.md # This file# Using uv
uv run pytest
# Or using pytest directly
pytestEdit src/mcp_server.py and add a new function decorated with @mcp.tool():
@mcp.tool()
async def my_new_tool(param: str) -> Dict[str, Any]:
"""Tool description."""
# Implementation
return {"result": "value"}PAPERS_DIRECTORY exists and contains PDF filesOPENAI_API_KEY is validCHUNK_SIZE and CHUNK_OVERLAP in .envEMBEDDING_MODEL optionsforce: truetext-embedding-3-small is fast and cost-effectiveMIT License - See LICENSE file for details
Contributions welcome! Please open an issue or PR.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.