Affinity MCP Server
for AI Agents
Connect your AI agent to StackOne's Affinity MCP server and give it 34 MCP tools out of the box. Auth, tool execution, and security all managed.
Coverage
34 Agent Actions
Create, read, update, and delete across Affinity — and extend your agent's capabilities with custom actions.
Authentication
Agent Tool Authentication
Per-user OAuth in one call. Your Affinity MCP server gets session-scoped tokens with zero credentials stored on your infra.
Agent Auth →Security
Agent Protection
Every Affinity tool response scanned for prompt injection in milliseconds — 88.7% accuracy, all running on CPU.
Prompt Injection Defense →Performance
Max Agent Context. Min Cost.
Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every Affinity call.
Tools Discovery →What is the Affinity MCP Server?
A Affinity MCP server lets AI agents read and write Affinity data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's Affinity MCP server ships with 34 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.
All Affinity MCP Tools
Every action from Affinity's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.
Current Users
- Get Current User
Retrieve information about the currently authenticated user
Opportunities
- List Opportunities
Retrieve a paginated list of all opportunities (deals) in Affinity
Opportunitys
- Create Opportunity
Create a new opportunity (deal) in Affinity
- Get Opportunity
Retrieve a specific opportunity by its ID
- Update Opportunity
Update an existing opportunity in Affinity
- Delete Opportunity
Delete an opportunity from Affinity
Organizations
- Create Organization
Create a new organization (company) in Affinity
- List Organizations
Retrieve a paginated list of all organizations (companies) in Affinity
- Get Organization
Retrieve a specific organization by its ID
- Update Organization
Update an existing organization in Affinity
- Delete Organization
Delete an organization from Affinity
Persons
- Create Person
Create a new person (contact) in Affinity
- List Persons
Retrieve a paginated list of all persons (contacts) in Affinity
- Get Person
Retrieve a specific person by their ID
- Update Person
Update an existing person in Affinity
- Delete Person
Delete a person from Affinity
Lists
- List Lists
Retrieve all lists (pipelines) in Affinity
Get Lists
- Get List
Retrieve a specific list by its ID
Entries
- List List Entries
Retrieve all entries in a specific list
Entrys
- Create List Entry
Add an entity to a list in Affinity
- Get List Entry
Retrieve a specific list entry by its ID
- Delete List Entry
Remove an entry from a list in Affinity
Notes
- Create Note
Create a new note associated with a person, organization, or opportunity
- List Notes
Retrieve notes associated with a specific person, organization, or opportunity
- Get Note
Retrieve a specific note by its ID
- Update Note
Update an existing note in Affinity
- Delete Note
Delete a note from Affinity
Interactions
- List Interactions
Retrieve interactions (emails, meetings, etc.) associated with a person, organization, or opportunity
- Get Interaction
Retrieve a specific interaction by its ID
Fields
- List Fields
Retrieve field metadata definitions available in Affinity
Field Values
- Create Field Value
Set a field value on an entity in Affinity
- List Field Values
Retrieve field values for a specific entity in Affinity
- Update Field Value
Update an existing field value in Affinity
- Delete Field Value
Delete a field value from an entity in Affinity
Affinity AI Agent Use Cases
Connect your AI agent to Affinity and help your team scale the sales operations they run by hand today.
Use StackOne to connect your AI agent to your CRM, email, and calendar tools to automate post-demo follow-up.
ViewUse StackOne to connect your AI agent to your CRM, email, and calendar tools to automate deal risk scoring and pipeline alerts.
ViewUse StackOne to connect your AI agent to your CRM, sales engagement, and messaging tools to automate outbound prospecting.
ViewSet Up Your Affinity MCP Server in Minutes
One endpoint. Any framework. Your agent is talking to Affinity in under 10 lines of code.
Agent Frameworks
{
"mcpServers": {
"stackone": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://api.stackone.com/mcp?x-account-id=<account_id>",
"--header",
"Authorization: Basic <YOUR_BASE64_TOKEN>"
]
}
}
}Check More CRM MCP Servers
380+ actions
158+ actions
127+ actions
121+ actions
120+ actions
88+ actions
88+ actions
Platform Resources
MCP Code Mode: Keeping Tool Responses Out of Agent Context
Anthropic's code_execution processes data already in context. Custom MCP code mode keeps raw tool responses in a sandbox. 14K tokens vs 500.
11 min
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, their shared security risks including indirect prompt injection, and when to use one, both, or a hybrid architecture.
12 min
MCP vs API: What 200+ Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building 200+ connectors that serve both, here's when each approach wins.
14 min read
Affinity MCP Server FAQ
Does StackOne have a Affinity MCP server?
Affinity MCP server vs direct API integration — what's the difference?
How does Affinity authentication work for AI agents?
origin_owner_id.Are Affinity MCP tools vulnerable to prompt injection?
What is the context bloat of a Affinity agent and how do I avoid it?
Can I limit which actions my Affinity agent can access?
Can I create custom agent actions for my Affinity MCP server?
When should I NOT use a Affinity MCP server?
What AI frameworks and AI clients does the StackOne Affinity MCP server support?
Put your AI agents to work
All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.