Skip to main content
Polyvia implements the Model Context Protocol (MCP), enabling seamless integration with AI assistants like Claude Desktop, IDEs, and other MCP-compatible tools.
Using Claude Code or Cursor? The Polyvia plugin installs the MCP server and agent skills in one command — no config editing required.

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 at https://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:
This registers 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.
Generate a dedicated API key for each MCP client so you can revoke it independently.

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:
Restart Claude Desktop. You should see Polyvia appear in the MCP server list.

Connecting via SDK

Both the Python and TypeScript SDKs expose a client.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, use client.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)

Requires pip 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 document
  • file_content_base64 (string, either/or): Base64-encoded file bytes
  • file_name (string, required with base64): Filename with extension (e.g. report.pdf)
  • file_mime_type (string, optional): MIME type; inferred from file_name if omitted
  • name (string, optional): Display name in Polyvia
Returns { "document_id", "task_id", "status": "pending" }.

polyvia_check_ingestion_status

Poll a parse task started by polyvia_ingest_document. Parameters:
  • task_id (string, required): From polyvia_ingest_document
Returns { "task_id", "document_id", "status", "error" }.

polyvia_list_documents

List documents in your workspace. Parameters:
  • status (string, optional): Filter by uploading, parsing, completed, or failed
  • response_format (string, optional): markdown (default) or json

polyvia_get_document

Get metadata and summary for one document. Parameters:
  • document_id (string, required): From polyvia_list_documents
  • response_format (string, optional): markdown (default) or json

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 document
  • group_id (string, optional): Scope to documents in a specific group
  • group_ids (string[], optional): Scope to documents across multiple groups
  • Omit all three to search your entire workspace
Documents must have 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
Returns { "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 update
  • group_id (string | null, required): Target group ID, or null to 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 delete
  • delete_documents (boolean, optional): If true, delete all documents in the group before deleting the group itself. Defaults to false.

Example Workflows

Ingest a public PDF and ask a question

Find information across your whole workspace

Check what documents you have before querying

Troubleshooting

  • 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
  • Ensure your API key is correctly set in the Authorization header
  • Verify the API key has not been revoked or expired
  • Check that you have an active Polyvia account
  • Large workspaces may take longer to search
  • Use document_id in polyvia_query to 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