Harness MCP Server
for AI Agents
Connect your AI agent to StackOne's Harness MCP server and give it 83 MCP tools out of the box. Auth, tool execution, and security all managed.
Coverage
83 Agent Actions
Create, read, update, and delete across Harness — and extend your agent's capabilities with custom actions.
Authentication
Agent Tool Authentication
Per-user OAuth in one call. Your Harness MCP server gets session-scoped tokens with zero credentials stored on your infra.
Agent Auth →Security
Agent Protection
Every Harness 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 Harness call.
Tools Discovery →What is the Harness MCP Server?
A Harness MCP server lets AI agents read and write Harness data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's Harness MCP server ships with 83 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 Harness MCP Tools
Every action from Harness's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.
SDK API Keys
- Create SDK API Key
Create a new Feature Flags SDK API key for an environment. Use Server keys for backend SDKs and Client keys for frontend or mobile SDKs.
- List SDK API Keys
Retrieve all Feature Flags SDK API keys for a specific environment, including their type, name, and metadata.
- Get SDK API Key
Retrieve detailed metadata for a specific SDK API key, including its type, name, and expiration status.
- Delete SDK API Key
Delete an SDK API key, immediately revoking access for all Feature Flag SDKs that use it.
Environments
- Create Environment
Create a new environment in a project to serve as a deployment target for feature flag targeting and release management.
- List Environments
Retrieve a paginated list of all environments in a project, providing the environment identifiers needed for feature flag and deployment actions.
- Get Environment
Retrieve full details for a specific environment by its identifier, including name, type, tags, and configuration metadata.
- Update Environment
Update an existing environment by replacing all fields. Provide complete values for every field, not just the ones being changed, as this is a full replacement operation.
- Delete Environment
Delete an environment from a project, permanently removing all environment-specific feature flag states, targeting rules, and variation maps.
Feature Flags
- Create Feature Flag
Create a new feature flag in a project with specified variations, kind, and default serving behavior.
- List Feature Flags
Retrieve all feature flags for a project with optional filtering by name, kind, status, and pagination support.
- Get Feature Flag
Retrieve a single feature flag by identifier with full configuration details including variations, targeting rules, and environment state.
- Update Feature Flag
Modify a feature flag using instruction-based patching to toggle state, update targeting rules, add targets to variations, or change serving configuration.
- Delete Feature Flag
Delete a feature flag by identifier, removing it from the project and all SDK evaluations.
Unified Groups
- List Unified Groups
List Harness user groups mapped to the StackOne IAM unified group schema.
- Get Unified Group
Retrieve a single Harness user group by identifier, mapped to the StackOne IAM unified group schema.
Unified Organizations
- List Unified Organizations
List Harness organizations within the account, mapped to the StackOne IAM unified organization schema.
- Get Unified Organization
Retrieve a single Harness organization by identifier, mapped to the StackOne IAM unified organization schema.
Unified Roles
- List Unified Roles
List Harness roles (both built-in and custom) mapped to the StackOne IAM unified role schema.
- Get Unified Role
Retrieve a single Harness role by identifier, mapped to the StackOne IAM unified role schema.
Unified Users
- List Unified Users
List Harness users mapped to the StackOne IAM unified user schema. Returns each user's UUID, email, name, status, and MFA flag; role assignments are included when expand contains "roles".
- Get Unified User
Retrieve a single Harness user by UUID, mapped to the StackOne IAM unified user schema. Role assignments are included when expand contains "roles".
Invites
- List Invites
Retrieve a paginated list of pending invitations at account, organization, or project scope, showing who has been invited but has not yet accepted.
- Get Invite
Retrieve a single pending invitation by its invite ID, returning the full invite details including email, role bindings, invite type, and approval status.
- Delete Invite
Delete a pending invitation by its identifier, permanently canceling the invitation so the invitee can no longer accept it.
Organizations
- Create Organization
Create a new organization in the Harness account with a unique identifier, name, and optional description and tags.
- List Organizations
Retrieve a paginated list of all organizations accessible under the authenticated account, with optional filtering by identifiers, search term, and sort order.
- Get Organization
Retrieve the full details of a single organization by its unique identifier, including name, description, tags, and metadata.
- Update Organization
Replace all fields of an existing organization. Provide values for every field, not just the fields being changed, as this performs a full replacement.
- Delete Organization
Permanently delete an organization and all its contained resources, including projects, feature flags, targets, and segments.
Projects
- Create Project
Create a new project within an organization to serve as a container for feature flags, targets, segments, and other module resources.
- List Projects
Retrieve a paginated list of all projects the authenticated user is a member of, with optional filtering by organization, module type, and search term.
- Get Project
Retrieve the full details of a specific project by its unique identifier, including enabled modules, color, and tags.
- Update Project
Update an existing project by replacing all fields. Provide the complete project object with every field, not just the changed ones.
- Delete Project
Permanently delete a project and all its contained resources including feature flags, targets, segments, and environments. This action is irreversible.
Role Assignments
- Create Role Assignment
Assign a role to a principal (user, user group, or service account) within a resource group at a specific scope, granting that principal the role's permissions.
- List Role Assignments
Retrieve a paginated list of role assignments at a given scope, showing which principals (users, user groups, service accounts) hold which roles on which resource groups.
- Get Role Assignment
Retrieve the full details of a single role assignment by its identifier, including the assigned role, resource group, principal, scope, and management flags.
- Delete Role Assignment
Remove a role assignment, revoking the assigned role's permissions from the principal (user, user group, or service account) at the specified scope.
Roles
- Create Role
Create a custom role with specific permissions and allowed scope levels for fine-grained access control.
- List Roles
Retrieve a paginated list of roles with their permissions, scope levels, and assignment counts, with optional filtering by name and management type.
- Get Role
Retrieve the full details of a single role including its permission identifiers, allowed scope levels, and management metadata.
- Update Role
Update a role's name, permissions, scope levels, description, and tags via full replacement. Requires all fields to be provided.
- Delete Role
Permanently delete a role by its identifier. Returns the deleted role object on success.
Target Groups
- Create Target Group
Create a new target group (segment) with explicit target inclusion/exclusion and rule-based targeting clauses for a given project and environment.
- List Target Groups
Retrieve all target groups (segments) for an environment with optional filtering by name or identifier and configurable sorting and pagination.
- Get Target Group
Retrieve full details for a specific target group including its included/excluded targets, targeting rules, and version metadata.
- Update Target Group
Modify a target group using instruction-based patch operations to add or remove included and excluded targets.
- Delete Target Group
Delete a target group (segment) permanently from the specified environment, removing all target associations.
Service Accounts
- Create Service Account
Create a service account at account, organization, or project scope, usable as a SERVICE_ACCOUNT principal in role assignments.
- List Service Accounts
Retrieve service accounts at account, organization, or project scope, resolving a service account's name or email to the identifier required by role assignment actions.
- Get Service Account
Retrieve a single service account by identifier, including its token count and role assignment metadata.
- Update Service Account
Update a service account's name, email, description, or tags by replacing the full object.
- Delete Service Account
Delete a service account by identifier, removing its role assignments and API keys.
Tags
- Create Tag
Create a new tag for organizing and categorizing feature flags within a project. Tags are auto-created when attached to feature flags, but this action lets you pre-define them.
- List Tags
Retrieve all tags available for categorizing feature flags in a given project and environment. Returns one row per tag-to-flag association, so entries repeat; de-duplicate client-side.
- Get Tag
Retrieve a specific tag by identifier. Returns only the tag's identifier and name; to find which flags use the tag, call list_features with the tags filter.
- Delete Tag
Delete a tag and automatically remove it from all feature flags it was associated with.
Targets
- Create Target
Create a new feature flag target representing a user, service, or entity for flag evaluation in a specific environment.
- List Targets
Retrieve a paginated list of all feature flag targets for a specific environment, with optional filtering and sorting.
- Get Target
Retrieve the full details for a specific target, including its custom attributes and associated segments.
- Delete Target
Permanently remove a target from the environment, stopping all feature flag evaluations for this target.
User Groups
- Create User Group
Create a new user group at account, organization, or project scope with optional initial members, notification channels, and SSO linking.
- List User Groups
Retrieve a paginated list of user groups at account, organization, or project scope, with optional filtering by name, scope inheritance, and SSO group linkage.
- Get User Group
Retrieve the full details of a single user group by its identifier, including the member user list, notification configurations, and SSO linking status.
- Update User Group
Update an existing user group via full replacement (PUT). All fields must be provided, not just the changed ones -- omitted optional fields will be cleared.
- Delete User Group
Permanently delete a user group by its identifier. Member users are not deleted from the account.
Users
- Add Users
Invite one or more users to the account, organization, or project by email address, with optional role bindings and user group assignments at time of invitation.
- List Users
Retrieve a paginated list of users in the account, organization, or project scope, with optional filtering by name, email, specific UUIDs, and parent scope inheritance.
- Get User
Retrieve a single user's full profile and role assignments by UUID, including every role binding with its resource group, scope level, and management flags.
- Update User
Update the authenticated caller's user profile by replacing the full user object. Call get_user first, then resend all fields.
- Remove User
Remove a user from the specified account, organization, or project scope, revoking all their role assignments and access at that scope without deleting their Harness account.
Other (11)
- Add User To Group
Add a single user to an existing user group by their user UUID and group identifier. The user inherits all role assignments associated with the group.
- List Feature Flag Dependants
List all feature flags that depend on the specified flag as a prerequisite.
- Get Unified Credentials
Retrieve information about the API key owner mapped to the StackOne IAM credentials schema.
- List Pending Users
Retrieve a paginated list of pending (not yet accepted) user invitations with aggregated role assignment details, with optional filtering by name, email, role, and resource group.
- List Segment Flags
Retrieve all feature flags that reference the specified target group in their targeting rules.
- Get Target Segments
Retrieve all target groups (segments) that a specific target belongs to, including both explicit and rule-based memberships.
- List Aggregated Users
Retrieve users enriched with their role assignment metadata, including role names, resource groups, scope levels, and management flags, with optional filtering by role or resource group.
- Remove User From Group
Remove a single user from a user group by their user UUID and group identifier. The user's individual role assignments are not affected.
- Restore Feature Flag
Restore a previously deleted feature flag back to active state with its original configuration.
- Resend Invite
Resend the invitation email for a pending invite that has not yet been accepted, optionally updating the invite's role bindings and user group assignments.
- Modify Target
Perform a full replacement update of a target, replacing its name, attributes, and all associations.
Set Up Your Harness MCP Server in Minutes
One endpoint. Any framework. Your agent is talking to Harness 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 Developer Tools MCP Servers
185+ actions
150+ actions
142+ actions
136+ actions
136+ actions
131+ actions
129+ 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
Harness MCP Server FAQ
Does StackOne have a Harness MCP server?
Harness MCP server vs direct API integration — what's the difference?
How does Harness authentication work for AI agents?
origin_owner_id.Are Harness MCP tools vulnerable to prompt injection?
What is the context bloat of a Harness agent and how do I avoid it?
Can I limit which actions my Harness agent can access?
Can I create custom agent actions for my Harness MCP server?
When should I NOT use a Harness MCP server?
What AI frameworks and AI clients does the StackOne Harness 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.