API & MCP Access
paperKB provides an MCP (Model Context Protocol) endpoint for AI tool integration with your knowledge bases. The main purpose of this is to allow you to integrate paperKB KBs with external AI tools, not just the chat interface available here. So, if you have a subscription to Claude or ChatGPT, then this is how you can use your own tools to interact with a KB.
API keys
Generate a personal API key from Settings → API Keys:
- Click Generate key and give it a name (e.g. "claude-desktop").
- Copy the key immediately — it's shown only once.
- After creation, only the first few characters are displayed.
Keys can be revoked at any time from the same page. Revoked keys stop working immediately.
Use your key in any MCP request as a Bearer token:
Authorization: Bearer sk-your-key-here
MCP endpoint
Each knowledge base exposes an MCP endpoint for AI tool integration. This uses the streamable HTTP transport (the modern MCP standard) and is compatible with Claude Desktop, Claude Code, and any MCP-aware AI agent.
URL: https://paperkb.org/{owner}/{kb}/mcp
Header: Authorization: Bearer sk-…
Available tools
| Tool | Description |
|---|---|
paperkb_query |
Semantic search across the KB — returns ranked passages with citations |
paperkb_get_paper |
Get full details for a paper by its internal ID or PMID |
paperkb_search_papers |
Look up papers by title or author name |
paperkb_get_author |
Get author details, papers, co-authors, and affiliations |
paperkb_search_authors |
Look up authors by name |
Setting up Claude Desktop
Add to your claude_desktop_config.json
(usually ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"paperkb": {
"type": "streamablehttp",
"url": "https://paperkb.org/{owner}/{kb}/mcp",
"headers": {
"Authorization": "Bearer sk-YOUR_KEY_HERE"
}
}
}
}
Replace {owner}/{kb} with your KB path (e.g. mylab/coga-kb) and
sk-YOUR_KEY_HERE with your API key. Restart Claude Desktop to pick up
the change.
Once connected, Claude can search your KB, look up papers, and retrieve author information directly during conversations.
Setting up Claude Code
claude mcp add paperkb --transport streamablehttp \
--url "https://paperkb.org/{owner}/{kb}/mcp" \
--header "Authorization: Bearer sk-YOUR_KEY_HERE"
Other MCP clients
Any MCP client that supports the streamable HTTP transport can connect.
The endpoint accepts standard MCP initialize, tools/list, and
tools/call requests.