MCP-Server

MCP-Server

3.1

If you are the rightful owner of MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Python-based server application that provides tools for metadata retrieval from SharePoint and entity retrieval from a Neo4j knowledge graph using semantic similarity search.

MCP Server

A Python-based server application that provides tools for metadata retrieval from SharePoint and entity retrieval from a Neo4j knowledge graph using semantic similarity search.

Features

  • Metadata Retrieval: Fetches structured metadata from SharePoint's 'Documents' library
  • Entity Retrieval: Queries a Neo4j knowledge graph using semantic similarity to find relevant entities and their relationships
  • FastMCP Integration: Built on top of FastMCP framework for tool management and execution

Prerequisites

  • Python 3.x
  • Neo4j database
  • SharePoint access credentials
  • OpenAI API key (for semantic search)

Installation

  1. Clone the repository:
git clone <repository-url>
cd mcp-server
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure environment variables: Create a .env file with the following variables:
SHAREPOINT_URL=
SHAREPOINT_USERNAME=
SHAREPOINT_PASSWORD=
SHAREPOINT_LIBRARY_NAME=

NEO4J_URI=
NEO4J_USER=
NEO4J_PASSWORD=

EMBEDDING_MODEL_ENDPOINT=
EMBEDDING_MODEL_KEY=
EMBEDDING_MODEL_API_VERSION=
EMBEDDING_MODEL_DEPLOYMENT_NAME=
EMBEDDING_MODEL_CHUNK_SIZE=
EMBEDDING_MODEL_DIMENSION=
EMBEDDING_MODEL_CHUNK_OVERLAP=

Usage

  1. Start the server:
python mcp_server.py
  1. The server provides two main tools:
    • metadata_retrieve: Retrieves structured metadata from SharePoint
    • entity_retrieve: Queries the knowledge graph using semantic similarity

Project Structure

.
โ”œโ”€โ”€ mcp_server.py          # Main server application
โ”œโ”€โ”€ settings.py            # Configuration management
โ”œโ”€โ”€ services/             # Service implementations
โ”‚   โ”œโ”€โ”€ graph_store.py    # Neo4j graph operations
โ”‚   โ””โ”€โ”€ sharepoint.py     # SharePoint integration
โ”œโ”€โ”€ requirements.txt      # Project dependencies
โ””โ”€โ”€ .env                  # Environment variables

Dependencies

  • langchain-mcp-adapters
  • mcp[cli]
  • langchain_openai
  • pinecone
  • langchain
  • langchain_neo4j
  • office365-rest-python-client