What is MCP?
Model Context Protocol is an open standard that allows AI applications to securely access external data sources and tools. Polyvia’s MCP server exposes your document workspace as a set of tools that AI assistants can use to ingest, browse, and query your documents — all without leaving the conversation. Polyvia’s MCP server is hosted athttps://app.polyvia.ai/mcp and uses the streamable HTTP transport. No installation required — just point your client at the URL and pass your API key as a bearer token.
Connecting from Claude Code
Add the server with a single command:polyvia for the current project. Add --scope user to make it available in every project, or --scope project to share it with your team via a checked-in .mcp.json. Run claude mcp list to confirm it’s connected, then ask Claude about your documents.
Connecting from Claude Desktop & other clients
Claude Desktop and most other MCP clients read a JSON config file rather than a CLI. Open (or create)~/.claude/claude_desktop_config.json and add the polyvia entry:
Connecting via SDK
Both the Python and TypeScript SDKs expose aclient.mcp helper that generates the correct config for each major AI client.
Anthropic SDK
OpenAI Responses API
OpenAI Agents SDK
Claude Desktop
Agent Tools (programmatic)
For frameworks that don’t support remote MCP, useclient.tools to get JSON-schema tool definitions and an executor that calls the REST API directly. All 10 Polyvia tools are available: ingest, status, list/get/update/delete documents, list/create/delete groups, and query.
Anthropic Messages API
OpenAI ChatCompletion
LangChain (Python)
Requirespip install "polyvia[langchain]".
Available Tools
polyvia_ingest_document
Upload a document from a public URL or raw base64 content.
Parameters:
source_url(string, either/or): Publicly accessible URL of the documentfile_content_base64(string, either/or): Base64-encoded file bytesfile_name(string, required with base64): Filename with extension (e.g.report.pdf)file_mime_type(string, optional): MIME type; inferred fromfile_nameif omittedname(string, optional): Display name in Polyvia
{ "document_id", "task_id", "status": "pending" }.
polyvia_check_ingestion_status
Poll a parse task started by polyvia_ingest_document.
Parameters:
task_id(string, required): Frompolyvia_ingest_document
{ "task_id", "document_id", "status", "error" }.
polyvia_list_documents
List documents in your workspace.
Parameters:
status(string, optional): Filter byuploading,parsing,completed, orfailedresponse_format(string, optional):markdown(default) orjson
polyvia_get_document
Get metadata and summary for one document.
Parameters:
document_id(string, required): Frompolyvia_list_documentsresponse_format(string, optional):markdown(default) orjson
polyvia_query
Ask a natural-language question about your documents.
Parameters:
query(string, required): Your question (max 2000 chars)document_id(string, optional): Scope to one documentgroup_id(string, optional): Scope to documents in a specific groupgroup_ids(string[], optional): Scope to documents across multiple groups- Omit all three to search your entire workspace
status=completed before they can be queried.
polyvia_list_groups
List all groups in your workspace.
No parameters required. Returns an array of group objects with id, name, color, and created_at.
polyvia_create_group
Create a new group.
Parameters:
name(string, required): Display name for the group
{ "group_id": "g_<id>" }.
polyvia_update_document
Move a document to a different group, or remove it from its current group.
Parameters:
document_id(string, required): The document to updategroup_id(string | null, required): Target group ID, ornullto remove from any group
polyvia_delete_document
Permanently delete a document and all its indexed content.
Parameters:
document_id(string, required): The document to delete
polyvia_delete_group
Delete a group. The group must be empty, or you must pass delete_documents: true to wipe its documents first.
Parameters:
group_id(string, required): The group to deletedelete_documents(boolean, optional): Iftrue, delete all documents in the group before deleting the group itself. Defaults tofalse.
Example Workflows
Ingest a public PDF and ask a question
Find information across your whole workspace
Check what documents you have before querying
Troubleshooting
MCP server not appearing in Claude
MCP server not appearing in Claude
- Verify the configuration file path is correct (
~/.claude/claude_desktop_config.json) - Check that the API key is valid and starts with
poly_ - Restart Claude Desktop completely
- Check Claude’s logs for error messages
Authentication errors
Authentication errors
- Ensure your API key is correctly set in the
Authorizationheader - Verify the API key has not been revoked or expired
- Check that you have an active Polyvia account
Slow response times
Slow response times
- Large workspaces may take longer to search
- Use
document_idinpolyvia_queryto narrow to a specific document
Next Steps
Python SDK
Full Python SDK reference
TypeScript SDK
Full TypeScript / JavaScript SDK reference
Polyvia API
Build custom integrations with the REST API
Polyvia Platform
Upload documents and manage your workspace
