Affinda MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Affinda MCP or direct API to extract document data, validate fields, manage workspaces, and configure document types through natural language.

Affinda MCP logoAffinda MCP
Dcr Oauth

Affinda MCP is a hosted document intelligence service for extracting and validating data. It also helps teams manage Affinda workspaces, document types, fields, and integrations.

85 Tools

Try Affinda MCP now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Affinda MCP
Try asking
TOOLS

Supported Tools

Every Affinda MCP action and event your agent gets out of the box.

Add connection to integration

Attach an existing service connection to an integration.

Add tag to documents

Apply an existing tag to one or more documents.

Archive documents

Move documents to ``archived`` state.

Assign document type to workspace

Make a document type available for use in a workspace.

Bulk create data source values

Append many new rows to a data source in one call.

Bulk create fields

Create many fields on a document type in one call.

Confirm documents

Mark documents as validated, moving them from ``review`` to ``validated``.

Create api token

Create a new long-lived Affinda API key for the current user.

Create connect token

Mint an OAuth connect token + URL so the user can authorise a service.

Create data source

Create an empty data source (lookup table) in an organization.

Create data source value

Add one new row to a data source.

Create document type

Create a new document type (extraction template) in an organization.

Create field

Create a single field on a document type.

Create field group

Create a field group (heading/section) on a document type.

Create integration

Create a new integration in an organization.

Create matching criterion

Add a matching criterion to a field with an attached data source.

Create recruit workspace

Create a fully-configured Recruitment workspace in one call.

Create tag

Create a new tag in a workspace.

Create validation rule

Create a validation rule for a document type.

Create validation run

Run a validation rule against a document and refresh its results.

Create workspace

Create a new workspace with chosen processing settings.

Delete data source

Delete a data source and every row it contains.

Delete data source value

Delete one row from a data source by its key.

Delete document type

Delete a document type permanently.

Delete field

Delete a single field from a document type.

Delete field group

Delete a field group (heading/section) from a document type.

Delete integration

Permanently delete an integration.

Delete integration secret

Permanently delete a secret.

Delete matching criterion

Delete a matching criterion from a field.

Delete tag

Delete a tag from its workspace.

Delete validation rule

Delete a validation rule from a document type.

Deploy integration version

Snapshot the integration's current code as a new version and deploy it.

Get data source

Get one data source by ID — name, schema, and key/display properties.

Get document

Get one document by ID — state, workspace, document type, and basic metadata.

Get document extraction

Get the extracted data for one document — raw text plus all field values.

Get document page images

View a document's pages as rendered images — see the actual document, not just OCR text.

Get document type

Get one document type by ID — name, organization, and counts only.

Get document type details

Get a document type's full configuration — settings + counts.

Get field

Get one field by ID — full settings, formatter, and relationships.

Get field group

Get one field group by ID — label, position, parent document type.

Get integration

Get one integration by ID — full configuration, code, and connections.

Get integration run

Get one integration run by ID — full, untruncated logs and output.

Get usage

Get daily credits consumption for an organization over a date range.

Get validation rule

Get one validation rule by ID — prompt, enabled, fields, missing-data option.

Get workspace

Get one workspace by ID — name, organization, and document counts only.

Get workspace details

Get a workspace's full configuration — settings + counts.

List data sources

List data sources (lookup tables) defined on an organization.

List data source values

List the rows (records) stored in a data source.

List documents

List documents in a workspace with their state and basic metadata.

List document splitters

List document splitters available to an organization.

List document types

List document types in an organization.

List fields

List a document type's full field schema, grouped by field group.

List integration connections

List third-party service connections in an organization.

List integration runs

List recent runs for an integration, newest first.

List integrations

List integrations in an organization.

List integration secrets

List the names of secrets configured for an integration.

List integration versions

List deployed-version snapshots for an integration, newest first.

List matching criteria

List matching criteria configured on a field.

List model memory documents

List the confirmed reference documents currently in a document type's model memory.

List organizations

List organizations the current user belongs to.

List pipedream apps

Search the catalogue of Pipedream apps available for new connections.

List recent field annotations

Spot-check how one field is being extracted across recent documents.

List tags

List the tags defined in a workspace.

List validation rules

List validation rules attached to a document type.

List workspaces

List workspaces in an organization.

Populate fields from documents

Infer and create the field schema for a document type from sample documents.

Reassign document type

Reassign documents to a different document type in the same workspace.

Reject documents

Move documents to ``rejected`` state.

Remove connection from integration

Detach a service connection from an integration.

Remove tag from documents

Take a tag off one or more documents.

Revert integration version

Roll an integration back to a previous version and redeploy it.

Run integration

Execute an integration against one document as a test run.

Set integration secret

Create or update a secret on an integration.

Test connection

Verify a service connection's credentials are still valid.

Update data source

Update top-level settings on a data source (name, key, display property).

Update data source value

Update one row in a data source by its key — partial merge.

Update document type

Update one or more settings on an existing document type.

Update field

Update one or more settings on an existing field.

Update integration

Update one or more settings — including code — on an integration.

Update matching criterion

Update settings on an existing matching criterion.

Update organization

Rename an organization.

Update tag

Rename a tag.

Update validation rule

Update one or more settings on an existing validation rule.

Update workspace

Update one or more settings on an existing workspace.

Wait for document processing

Block until every document in a workspace has finished processing.

SETUP GUIDE

Connect Affinda MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["affinda_mcp"],
  mcp: true,
});
Create a session scoped to Affinda MCP and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "List the document types in my Affinda workspace",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Affinda MCP request
SETUP GUIDE

Connect Affinda MCP API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["affinda_mcp"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Affinda MCP
3

Run Affinda MCP tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "List the document types in my Affinda workspace" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Affinda MCP tool calls through the session, and print the final answer

Why Use Composio?

AI Native Affinda MCP Integration

  • Supports both Affinda MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Affinda MCP data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Affinda MCP access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Affinda MCP
  • Scoped, least privilege access to Affinda MCP resources
  • Full audit trail of agent actions to support review and compliance
FRAMEWORKS

Use Affinda MCP with any AI Agent Framework

Choose a Framework you want to connect Affinda MCP with

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with Affinda MCP.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Affinda MCP tool your agent needs.Free to start.

Start building