VignanUniversity MCP Server
Vignan University MCP Server
A FastAPI-based Model Context Protocol (MCP) server that enables semantic search over the Vignan University knowledge base using Pinecone vector storage and Sentence Transformers.
Overview
This server exposes a simple tool interface that allows clients to retrieve semantically relevant chunks of information from the Vignan University namespace stored in Pinecone. It uses the all-MiniLM-L6-v2 sentence transformer model to embed queries and perform similarity search.
Prerequisites
Python 3.8+
A Pinecone account with an index populated under the
VignannamespaceThe index must use 384-dimensional vectors (matching
all-MiniLM-L6-v2output)
Installation
Clone the repository and navigate to the project directory.
Install dependencies:
pip install -r requirements.txtSet up environment variables by creating a
.envfile in the project root:PINECONE_API_KEY=your_pinecone_api_key PINECONE_INDEX=your_index_name
Running the Server
python vignan_mcp_server.pyThe server will start at http://localhost:8000.
API Endpoints
GET /list-tools
Returns metadata about all available tools exposed by this MCP server.
Response:
{
"server": "VignanUniversity MCP Server",
"tools": [
{
"name": "VignanUniversity",
"description": "...",
"parameters": { ... }
}
]
}POST /callTool
Invokes a tool by name with the provided arguments.
Request body:
{
"name": "VignanUniversity",
"arguments": {
"query": "query",
"top_k": 5
}
}Field | Type | Required | Description |
| string | Yes | Must be |
| string | Yes | Natural language query to search the knowledge base |
| integer | No | Number of results to return (default: |
Response:
{
"result": [
{
"score": 0.91,
"text": "Relevant chunk text...",
"source": "document_name.pdf",
"chunk_index": 3
}
]
}GET /health
Health check endpoint.
Response:
{ "status": "healthy" }Project Structure
.
├── vignan_mcp_server.py # Main server application
├── requirements.txt # Python dependencies
└── .env # Environment variablesDependencies
Package | Purpose |
| Web framework for building the API |
| ASGI server to run the FastAPI app |
| MCP protocol utilities |
| Pinecone vector database client |
| Embedding model ( |
| Load environment variables from |
| HTTP client (async support) |