Search Google Scholar for Academic Research
Google Scholar MCP Server searches academic papers via search_google_scholar over a streamable HTTP MCP transport.
1.0.0Add to Favorites
Why it matters
Access and query Google Scholar to find academic articles and research papers. This asset integrates with Google Gemini for enhanced AI capabilities and provides results via streaming HTTP transport.
Outcomes
What it gets done
Search Google Scholar for academic articles using customizable parameters.
Retrieve research papers and academic content through an HTTP server.
Leverage Google Gemini AI for advanced search and analysis.
Stream search results and notifications in real-time.
Source
Get it from source
Spark does not host a copy of it.
Open sourceReports
Agent outcome reports
No reports yet
Capabilities
Tools your agent gets
Search Google Scholar for academic articles and research with customizable search parameters.
Overview
Google Scholar MCP Server
Google Scholar MCP Server exposes Google Scholar search to AI assistants over an HTTP transport with session management and SSE streaming, via the search_google_scholar tool. Use it when an AI assistant needs to search Google Scholar directly, or as a reference HTTP-transport MCP server implementation.
What it does
Google Scholar MCP Server is an MCP server that exposes Google Scholar search over a streamable HTTP transport, letting an AI assistant search for academic papers and research directly. It doubles as a reference implementation for building an MCP server with custom tools and integrating it with an AI model, in this case Google's Gemini, showing both the server side and a client that calls it.
When to use - and when NOT to
Use it when you want an AI assistant to search Google Scholar for academic papers and research as part of a research workflow, or when you're looking for a working example of an HTTP-transport MCP server with session management and streaming updates. It is HTTP-based rather than local stdio, running its own server process on port 3000 with both a POST endpoint for requests and a GET endpoint for SSE streaming, so it needs a running server process rather than being invoked as a simple local command. It currently exposes a single search tool, so it is not a broader academic-database or citation-management tool beyond Scholar search itself.
Capabilities
- search_google_scholar: search Google Scholar for academic papers and research, with configurable search parameters such as query and filters, returning structured results with paper details
- StreamableHTTPServerTransport: HTTP POST for requests and responses, HTTP GET for Server-Sent Events streams, and session management supporting multiple simultaneous connections with unique session IDs
- Multi-session support for handling several clients at once, graceful shutdown on SIGINT, structured JSON-RPC error responses, and comprehensive request and response logging
How to install
Via Smithery, for Claude Desktop:
npx -y @smithery/cli install @mochow13/google-scholar-mcp --client claude
Or build and run it yourself: clone the repository, then build both the server and the bundled client:
cd server
npm install
npm run build
cd client
npm install
npm run build
Start the server with node build/index.js; it listens on port 3000, exposing POST /mcp for MCP communication and GET /mcp for the SSE stream. The bundled client demonstrates integrating the server with Google's Gemini AI model and requires a GEMINI_API_KEY environment variable.
Who it's for
Researchers who want an AI assistant to search Google Scholar directly, and developers looking for a concrete, working example of an HTTP-transport MCP server with session management and SSE streaming. It is built on the official @modelcontextprotocol/sdk, so its transport and session-handling patterns generalize to other HTTP-based MCP servers, not just this one. It is released under the MIT License.
Source README
Google Scholar MCP Server
A Model Context Protocol (MCP) server that provides Google Scholar search capabilities through a streamable HTTP transport. This project demonstrates how to build an MCP server with custom tools and integrate it with AI models like Google's Gemini.
Overview
This project consists of two main components:
- MCP Server: Provides Google Scholar search tools via HTTP endpoints
- MCP Client: Integrates with Google Gemini AI to process queries and call tools
Architecture
MCP Server Implementation
The server is built using the @modelcontextprotocol/sdk and implements:
- Transport: StreamableHTTPServerTransport for HTTP-based communication
- Session Management: Supports multiple simultaneous connections with session IDs
- Tool System: Extensible tool registration and execution framework
- Error Handling: Comprehensive error responses and logging
Available Tools
The server currently provides one main tool:
search_google_scholar
- Description: Search Google Scholar for academic papers and research
- Parameters: Configurable search parameters (query, filters, etc.)
- Returns: Structured search results with paper details
Transport Protocol
The server uses StreamableHTTPServerTransport which supports:
- HTTP POST: For sending requests and receiving responses
- HTTP GET: For establishing Server-Sent Events (SSE) streams
- Session Management: Persistent connections with unique session IDs
- Real-time Notifications: Streaming updates via SSE
Smithery
The server is now available in Smithery: Google Scholar Search Server
Installation
Installing via Smithery
To install google-scholar-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @mochow13/google-scholar-mcp --client claude
- Clone the repository:
git clone <repository-url>
cd google-scholar-mcp
- Install and build:
cd server
npm install
npm run build
cd client
npm install
npm run build
Running the Server
- Start the MCP server:
cd server
node build/index.js
The server will start on port 3000 and provide the following endpoints:
POST /mcp- Main MCP communication endpointGET /mcp- SSE stream endpoint for real-time updates
Server Features
- Multi-session Support: Handle multiple clients simultaneously
- Graceful Shutdown: Proper cleanup on SIGINT
- Logging: Comprehensive request/response logging
- Error Handling: Structured JSON-RPC error responses
Running the Client
The client demonstrates how to integrate the MCP server with Google's Gemini AI model.
Ensure you have a valid
GEMINI_API_KEYand provide it withexport GEMINI_API_KEY=<your-key>Start the client:
cd client
node build/index.js
- The client will connect to the server and start an interactive chat loop
Client Features
Conversation Management
- Persistent Context: Maintains full conversation history across queries
- Multi-turn Conversations: Supports back-and-forth dialogue with context
- Function Call Integration: Seamlessly integrates tool calls into conversation flow
AI Integration
- Gemini 2.5 Flash: Uses Google's latest language model
- Tool Discovery: Automatically discovers and registers available MCP tools
- Function Calling: Converts MCP tools to Gemini function declarations
Interactive Features
- Chat Loop: Continuous conversation interface
- History Management: View and clear conversation history
- Graceful Exit: Type 'quit' to exit cleanly
Usage Example
Query: Find recent papers about machine learning in healthcare
[Called tool search_google_scholar with args {"query":"machine learning healthcare recent"}]
Based on the search results, here are some recent papers about machine learning in healthcare:
1. "Deep Learning Applications in Medical Imaging" - This paper explores...
2. "Predictive Analytics in Patient Care" - Research on using ML for...
...
Query: What about specifically for diagnostic imaging?
[Called tool search_google_scholar with args {"query":"machine learning diagnostic imaging healthcare"}]
Here are papers specifically focused on diagnostic imaging applications:
...
Development
Project Structure
├── server/
│ ├── src/
│ │ ├── index.ts # Express server setup
│ │ ├── server.ts # MCP server implementation
│ │ └── tools.ts # Tool definitions and handlers
├── client/
│ └── index.ts # MCP client with Gemini integration
└── package.json
Key Components
MCPServer Class (server/src/server.ts)
- Manages MCP server lifecycle
- Handles HTTP requests and SSE streams
- Implements tool registration and execution
- Manages multiple client sessions
MCPClient Class (client/index.ts)
- Connects to MCP server via HTTP transport
- Integrates with Google Gemini AI
- Manages conversation history and context
- Handles function calling workflow
Adding New Tools
- Define your tool schema in
server/src/tools.ts:
export const myNewTool = {
name: "my_new_tool",
description: "Description of what the tool does",
inputSchema: {
type: "object",
properties: {
// Define parameters
}
}
};
- Implement the tool handler:
export async function callMyNewTool(args: any) {
// Tool implementation
return {
content: [
{
type: "text",
text: "Tool result"
}
]
};
}
- Register the tool in the server setup
Configuration
Environment Variables
GEMINI_API_KEY: Required for client AI integrationPORT: Server port (defaults to 3000)
Server Configuration
The server can be configured with different capabilities:
- Tools: Enable/disable tool support
- Logging: Configure logging levels
- Transport: Customize transport settings
Error Handling
The system includes comprehensive error handling:
- Server Errors: JSON-RPC compliant error responses
- Transport Errors: Connection and stream error handling
- Tool Errors: Graceful tool execution error handling
- Client Errors: AI model and function calling error handling
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.