Provides AI agents with a retrieval layer over peer-reviewed papers, books, patents, social media, and technical standards with full-text access.
Also known as SpaceFrontiers/mcp, mcp
- Stars
- 11
- Tools
- 3
- Downloads, 30 days
- —
- Latest version
- 0.4.0
- Last commit
- Nov 10, 2026
- License
- MIT
What is Machine Library MCP?
Machine Library provides AI agents with a retrieval layer over peer-reviewed papers, books, patents, social media, and technical standards with full-text access. It exposes 3 tools, such as machinelibrary_search, machinelibrary_fetch_document, machinelibrary_search_in_document.
Summary generated from the project's README
About Machine Library MCP server
Machine Library provides a retrieval layer for AI agents to access a wide range of information including peer-reviewed papers, books, patents, technical standards, and social media content from platforms like Reddit, Discord, and YouTube. Developers can integrate this server into clients such as Claude Code, Cursor, or VS Code using either OAuth 2.1 with PKCE or a Bearer API key. The server is hosted via streamable HTTP transport, though it can also be self-hosted using stdio.
The system offers specific tools for different research needs. The machinelibrary_search tool generates ranked lists from various sources, while machinelibrary_fetch_document retrieves bounded full text up to 100K characters. For larger documents, machinelibrary_search_in_document allows agents to find up to five specific matching passages. These tools are designed to be read-only and idempotent, ensuring stable performance in multi-server agent environments. Every result includes canonical source URIs to facilitate accurate citations.
What you can do with it
- 1Conduct multi-source academic researchAsk an agent to find and rank papers, books, and patents related to a specific technical topic.
- 2Extract full text for analysisInstruct an AI to retrieve the complete text of a specific document for deep reading.
- 3Locate specific passages in large filesHave an agent search for specific information within a document that exceeds 20,000 tokens.
Written from the project's README. Every use case is checked against a quote from it.
How to install Machine Library MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Machine Library MCP in Claude Code
$ claude mcp add --transport http mcp https://mcp.machinelibrary.ai/Install Machine Library MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"url": "https://mcp.machinelibrary.ai/"
}
}
}Install Machine Library MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp": {
"type": "http",
"url": "https://mcp.machinelibrary.ai/"
}
}
}Install Machine Library MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp","type":"http","url":"https://mcp.machinelibrary.ai/"}'Install Machine Library MCP in Codex
$ codex mcp add mcp --url https://mcp.machinelibrary.ai/Install Machine Library MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp] url = "https://mcp.machinelibrary.ai/"
Install Machine Library MCP in Gemini CLI
$ gemini mcp add -s user --transport http mcp https://mcp.machinelibrary.ai/Install Machine Library MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp": {
"url": "https://mcp.machinelibrary.ai/",
"type": "http"
}
}
}Machine Library MCP tools 3
Detected from the READMEmachinelibrary_searchmachinelibrary_fetch_documentmachinelibrary_search_in_document
Configuration
MACHINELIBRARY_API_KEYSEARCH_API_ENDPOINT
Automated checks
Ran Nov 12, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packageNot checked
- Remote endpoint uses HTTPSPass
- Destructive tools are labelledPass
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesNot checked
README
View on GitHubMachine Library MCP Server
Official MCP server for Machine Library, the search and AI product by Space Frontiers Company.
- Endpoint:
https://mcp.machinelibrary.ai(canonical) - Server name:
machinelibrary; tools are prefixedmachinelibrary_ - Agent install guide: https://machinelibrary.ai/install.md
A retrieval layer for AI agents over peer-reviewed papers, books, patents, standards, Wikipedia, Reddit, Telegram, Discord, and YouTube. Returns bounded full text and canonical source URIs for citation.
Hosted at https://mcp.machinelibrary.ai/ (Streamable HTTP transport, OAuth 2.1 with PKCE or Bearer API key).
Try a worked example: Find research, inspect supporting passages, and retain citations. Includes exact tool calls and observations from a live run, plus a small evaluation checklist for research teams.
Tools
The three core retrieval tools below are read-only, idempotent, and prefixed machinelibrary_ to avoid collisions in multi-server agent setups. This repository implements them. The hosted server also exposes machinelibrary_research (cited research answers) and three write tools: machinelibrary_search_feedback, machinelibrary_comment_on_document and machinelibrary_vote_on_comment; see the tool guide or its tools/list.
| Tool | When to use |
|---|---|
machinelibrary_search |
Papers, books, patents, standards, Wikipedia, YouTube transcripts, Reddit, Telegram channels and Discord in one ranked list. Narrow with filter_types, filter_issns or filter_uri_prefixes. |
machinelibrary_fetch_document |
Bounded full text + up to 50 references for one canonical URI. Defaults to 40K characters; supports up to 100K. |
machinelibrary_search_in_document |
Up to five matching passages within one document. Use for documents over ~20K tokens. |
Search defaults to 10 compact, hybrid-ranked results and is capped at 30. Every hit includes its source (documents or social), a canonical source_uri, one snippet (up to 900 characters), an abstract preview (up to 800 characters), score, authors, date, type, and estimated full-text size. Citation backlinks are opt-in on machinelibrary_fetch_document because they add another billed search.
Install
The hosted server has its own /mcp install page with one-click links for Cursor, VS Code, and Smithery.
Claude Code (recommended)
claude mcp add --transport http --scope user machinelibrary https://mcp.machinelibrary.ai
On first use a browser opens for OAuth login — no API key paste required.
Cursor / VS Code / Cline / Windsurf (HTTP)
{
"mcpServers": {
"machinelibrary": {
"type": "http",
"url": "https://mcp.machinelibrary.ai",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}
Get an API key at https://machinelibrary.ai/keys.
Self-hosted (stdio)
git clone https://github.com/SpaceFrontiers/mcp.git
cd mcp
uv sync
SEARCH_API_ENDPOINT=https://api.machinelibrary.ai \
MACHINELIBRARY_API_KEY=ml_xxx uv run fastmcp run mcp_server.py
The environment variable is used as the upstream API credential in stdio mode.
The command selects the public Machine Library API with SEARCH_API_ENDPOINT.
The internal default remains http://search-api for existing deployments.
For HTTP deployments, set SEARCH_API_ENDPOINT to your trusted internal
search API and USERS_API_ENDPOINT to your internal users API; the auth
middleware forwards verified identity headers to that internal service.
OAuth uses the https://api.machinelibrary.ai authorization server and
browser sign-in at https://machinelibrary.ai.
Pricing
- Search: $0.01 base + $0.001 per returned result (the 10-result MCP default costs $0.02).
- Full document fetch: $0.05.
- In-document passage search: $0.015.
referenced_by_limit > 0on a fetch adds a separately billed search.
Add credits at https://machinelibrary.ai/payments.
Repository layout
mcp_server.py— Starlette + FastMCP entrypoint, OAuth well-known endpoints.tools.py— three tools with Pydantic output schemas.prompts.py—deep_research_agentprompt.resources.py—machinelibrary://document/{uri_b64}URI template.auth.py— Bearer-token validation, Origin allowlist, MCP-Protocol-Version check.client.py— async HTTP client for the v2 search API.server.json— Official MCP Registry entry.smithery.yaml— Smithery deployment config.registry.json— in-house registry metadata.tests/— pytest unit tests.
Spec compliance
- Transport: Streamable HTTP, stateless.
- Auth: OAuth 2.1 with RFC 7591 Dynamic Client Registration; long-lived API keys also accepted.
- Annotations: every tool declares
readOnlyHint,idempotentHint,openWorldHint,destructiveHint:false. - Output schemas: every tool's
outputSchemais auto-generated from a Pydantic return model. - Resources: one URI template registered for documents.
- Spec versions accepted:
2025-03-26,2025-06-18,2025-11-25.
Development
uv sync
uv run pytest
uv run ruff check .
mcp-name: io.github.SpaceFrontiers/mcp
Compatibility
Existing accounts and API keys work unchanged, and the former
https://mcp.spacefrontiers.org endpoint remains supported; new setups should
use https://mcp.machinelibrary.ai. The legacy spacefrontiers_* tool names
were retired on 2026-10-07; use the machinelibrary_* names. Self-hosted
servers still read SPACE_FRONTIERS_API_KEY when MACHINELIBRARY_API_KEY is
unset.
License
MIT
Machine Library MCP questions
How do I add Machine Library MCP to Claude Code?
Run claude mcp add --transport http mcp https://mcp.machinelibrary.ai/ in your terminal. Add --scope user to make it available in every project.
How do I add Machine Library MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Machine Library MCP provide?
It exposes 3 tools, including machinelibrary_search, machinelibrary_fetch_document, machinelibrary_search_in_document.
What kind of sources can I search?
You can search across peer-reviewed papers, books, patents, standards, Wikipedia, Reddit, Telegram, Discord, and YouTube.
How much does it cost to use the server?
Search costs $0.01 base plus $0.001 per result, full document fetches are $0.05, and in-document passage searches are $0.015.
How do I authenticate with the hosted server?
The hosted server supports OAuth 2.1 with PKCE or Bearer API keys.