Skip to main content
All connectors
qbash Connectors / Affinity

Affinity MCP serverand Python AI tasks

qbash hosts a Affinity MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse.

Developers use qbash Tasks to write cloud-hosted Python functions that pair Affinity with models such as Claude and GPT.

MCP server

Build a Affinity MCP server

Give ChatGPT, Claude and your other AI tools access to Affinity through one server. You pick which Affinity tools it shares, and you can add other connectors, memory folders and Tasks to the same server.

How to set it up

  1. Connect Affinity on the qbash Connectors page.
  2. Create an MCP server and add the Affinity tools you want to share.
  3. Paste the server URL into your client. It connects with OAuth or an access token.

Python AI task

Write a Affinity task in Python

A qbash Task is a hosted Python function that calls Affinity and AI models.

Prepare an account meeting brief

Ask an inline prompt to extract commitments and open questions from one page of an organization’s notes.

main.py
report = qbash.integrations.affinity.get_organization_notes(
organization_id=12345, page_size=25,
)
notes = report["notes"]
if notes:
brief = qbash.ai.run_prompt(
slug="affinity-account-brief",
variables={"notes": json.dumps(notes)},
)
qbash.output(brief)
else:
qbash.output("No notes on this page for the organization.")
Sample get_organization_notes response
{
"status": "success",
"notes": [
{
"id": 42,
"content": "<p>Send the revised proposal before Friday.</p>",
"created_at": "2026-09-28T13:00:00Z",
"organization_ids": [
12345
]
}
],
"next_page_token": null
}

What the Affinity connector can do

  • Search people and organizations by name, email or domain
  • Read notes and interaction history for people, companies and opportunities
  • Read lists, saved views, list entries and opportunities
  • Read relationship scores and enriched person and company fields
  • Add a record to a list or remove it
  • Create, update or delete field values
See all 39 Affinity methods in the SDK Reference

qbash Tasks: AI applications in Python

A Task is a Python function that calls Affinity, your other connectors and models such as Claude, GPT, Gemini and Grok. qbash hosts and runs it.

AnthropicOpenAIGeminixAI

Run Tasks on a schedule or from your team's tools

OpenAIAnthropicGrokGmailSlackGitHub+ more
  • Deterministic where it counts Write the logic in Python and call a model only for the steps that need judgement, so the rest runs the same way every time.
  • Version controlled Every save is a revision you can compare and roll back.
  • Logged Each run records its inputs, output, errors and what started it.
  • Shared credentials Connections belong to your organization, so a Task keeps working when its author is away.

Affinity MCP questions

Does Affinity have an official MCP server?

Yes. Affinity announced its own hosted server at mcp.affinity.co/mcp in May 2026. qbash runs a separate server that combines Affinity with your other connectors on one URL and makes the same methods callable from Python tasks.

Whose permissions does the Affinity connection use?

The API key owner’s. Records that person cannot open in Affinity stay out of results, and every call counts toward the account’s monthly quota and the user’s per-minute limit.

Which Affinity records can it change?

It can create, update or delete a field value and add or remove a list entry. No method edits notes, people or organizations.

Build a Affinity task

Write it in Python with AI steps, and qbash hosts it with versions and run logs.

Build a task

Build a Affinity MCP server

Pick the Affinity tools to share and connect ChatGPT, Claude or Grok Bot.

Build an MCP server