Install mcp-scholarly via Smithery
mainYou can automatically install mcp-scholarly for Claude Desktop using the Smithery CLI:
npx -y @smithery/cli install mcp-scholarly --client clauderepository·main·Indexed 41 days ago
https://github.com/adityak74/mcp-scholarlyAn MCP (Model Context Protocol) server version 0.2.0 that provides LLMs with access to academic research. It includes tools for searching arXiv via search-arxiv, Google Scholar via search-google-scholar, and Google Web Search via search-google-web (requiring a SERPBASE_API_KEY). The server supports installation via uvx, Docker, and Smithery, and is compatible with Claude Desktop and the zorp agent.
You can automatically install mcp-scholarly for Claude Desktop using the Smithery CLI:
npx -y @smithery/cli install mcp-scholarly --client claudeThe zorp agent requires a search-capable MCP tool to run the validate command. mcp-scholarly satisfies this requirement because its tools (search-arxiv, search-google-scholar) contain the search verb.
zorp-agent --yes \
--mcp "stdio:scholarly:uv:run:mcp-scholarly" \
validate "<your research question>"To configure it once in .zorp/mcp.toml:
[[server]]
name = "scholarly"
transport = "stdio"
command = "uv"
args = ["run", "mcp-scholarly"]
trust = "sandbox"
timeout_secs = 60Note on Timeouts: While search-arxiv is fast (~1s), search-google-scholar uses a proxy pool and can be unpredictable. Setting timeout_secs = 60 provides necessary headroom.
To use mcp-scholarly with Claude Desktop, you must add it to your claude_desktop_config.json file.
Config Locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.jsonChoose the configuration block that matches your installation method (Published via uvx, Development via uv, or Docker).
// Published Servers Configuration
"mcpServers": {
"mcp-scholarly": {
"command": "uvx",
"args": [
"mcp-scholarly"
]
}
}If you prefer running the server via Docker, add the following to your Claude Desktop configuration:
"mcpServers": {
"mcp-scholarly": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"mcp/scholarly"
]
}
}The mcp-scholarly server includes an optional SerpBase provider to bypass Google Scholar rate-limiting on datacenter IPs. This provider is only registered and available if the SERPBASE_API_KEY environment variable is set. If the key is missing, the server will start normally but the SerpBase search tool will not be available.
export SERPBASE_API_KEY='your_api_key_here'Because MCP servers communicate over stdio, it is recommended to use the MCP Inspector for debugging. You can launch it using npx and uv:
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-scholarly run mcp-scholarlyOnce launched, the Inspector will provide a URL that you can open in your browser to interact with the server.
npx @modelcontextprotocol/inspector uv --directory /Users/adityakarnam/PycharmProjects/mcp-scholarly/mcp-scholarly run mcp-scholarlysearch-google-scholar tool searches Google Scholar using the scholarly library and a free proxy pool.The search-arxiv tool allows you to search arXiv for academic articles related to a specific keyword. It does not require an API key.
Arguments:
keyword (string, required): The search term for the article.search-arxiv: Search arxiv for articles related to the given keyword.
Takes "keyword" as required string argumentsThe search-google-web tool performs a Google web search via the SerpBase API.
Requirement:
This tool is only registered and available if the SERPBASE_API_KEY environment variable is set.
The search method in ArxivSearch implements exponential backoff retries when the arXiv API fails. You can control the maximum number of retry attempts by setting the SCHOLAR_MAX_RETRIES environment variable.
SCHOLAR_MAX_RETRIES (integer)3 if the variable is unset, empty, or invalid.# Example: Setting the retry limit via environment variable
export SCHOLAR_MAX_RETRIES=5You can control the number of retry attempts for Google Scholar searches using the SCHOLAR_MAX_RETRIES environment variable. This is useful for managing how the server handles fetch failures or CAPTCHA blocks.
3 if the environment variable is not set or is invalid.MCP error -32001: fetch failed if the total time exceeds the client's timeout.The SerpBaseSearch class provides a way to perform Google web searches via the SerpBase REST API. It returns a list of formatted strings containing the Title, Summary, and URL for up to 10 organic search results.
Requirements:
SERPBASE_API_KEY must be set in the environment.search method handles the API request and automatically closes the underlying HTTP client.from mcp_scholarly.serpbase_search import SerpBaseSearch
searcher = SerpBaseSearch()
if searcher.available:
results = searcher.search("machine learning research")
for result in results:
print(result)
searcher.close()