How to integrate Docusign MCP with OpenAI Agents SDK

Framework Integration Gradient
Docusign Logo
open-ai-agents-sdk Logo
divider

Introduction

This guide walks you through connecting Docusign to the OpenAI Agents SDK using the Composio tool router. By the end, you'll have a working Docusign agent that can add new users to our docusign account, upload a file to the project workspace folder, bulk add contacts to my docusign address book, update my signature image and initials through natural language commands.

This guide will help you understand how to give your OpenAI Agents SDK agent real control over a Docusign account through Composio's Docusign MCP server.

Before we dive in, let's take a quick look at the key ideas and tools involved.

TL;DR

Here's what you'll learn:
  • Get and set up your OpenAI and Composio API keys
  • Install the necessary dependencies
  • Initialize Composio and create a Tool Router session for Docusign
  • Configure an AI agent that can use Docusign as a tool
  • Run a live chat session where you can ask the agent to perform Docusign operations

What is open-ai-agents-sdk?

The OpenAI Agents SDK is a lightweight framework for building AI agents that can use tools and maintain conversation state. It provides a simple interface for creating agents with hosted MCP tool support.

Key features include:

  • Hosted MCP Tools: Connect to external services through hosted MCP endpoints
  • SQLite Sessions: Persist conversation history across interactions
  • Simple API: Clean interface with Agent, Runner, and tool configuration
  • Streaming Support: Real-time response streaming for interactive applications

What is the Docusign MCP server, and what's possible with it?

The Docusign MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Docusign account. It provides structured and secure access to your digital agreements and eSignature workflows, so your agent can manage envelopes, send documents for signature, update contacts, and organize files all on your behalf.

  • Bulk contact and user management: Effortlessly add multiple contacts or users to your Docusign address book and accounts, streamlining onboarding and communication across your organization.
  • Custom envelope and email settings: Direct your agent to modify email reply-to options, BCC recipients, and attachment handling for specific envelopes to match your workflow needs.
  • Automated document and workspace file uploads: Let the agent add files directly into Docusign workspaces or envelope drafts, making collaboration and document preparation seamless.
  • Signing group and signature management: Easily expand or update signing groups, personalize user signatures, and manage custom stamps to ensure smooth and secure signing experiences.
  • Advanced user settings and branding: Enable your agent to update user-level preferences, manage branding for different groups, and keep user information perfectly aligned with your company's requirements.

Supported Tools & Triggers

Tools
Add contacts to contacts listAdds multiple contacts to a user's contacts list in docusign.
AddemailoverridestoenvelopeAdds or modifies email override settings for a specific docusign envelope, allowing customization of the reply-to email address and name, as well as bcc email addresses for archiving purposes.
Add envelope attachmentsAdds one or more envelope attachments to a draft or in-process envelope in docusign.
Add existing brand to groupThis endpoint adds one or more existing brands to a specified group in docusign.
AddfiletoworkspaceThis endpoint adds a file to a specific folder within a docusign workspace.
Add members to signing groupThis endpoint adds one or more new members to a specified signing group within a docusign account.
Add new users to a specified accountThis endpoint adds new users to a specified docusign account, allowing bulk creation of up to 500 users in a single call.
AddorupdateaccountstampsThis endpoint allows you to add or update one or more account stamps in a docusign account.
Add or update user custom settingsAdds or updates custom user settings for a specified docusign user.
AddorupdateusersignatureThis endpoint allows you to add or update a user's signature in docusign.
Add part to chunked uploadAdds a chunk or part to an existing chunked upload in docusign.
Add step to envelope workflowThis endpoint adds a new step to an existing envelope's workflow in docusign.
Add templates to document in envelopeThis endpoint adds pre-configured templates to a specific document within an existing envelope in docusign.
Add templates to envelopeThis endpoint adds templates to an existing docusign envelope.
Add user signature and initials imagesThis endpoint allows you to add or update a user's signature and/or initials images in the docusign system.
Add users to existing groupAdds one or more existing docusign users to an existing group within a specified account.
ApplyactiontobulksendenvelopesThis endpoint allows users to apply specific actions (resend, correct, or void) to all envelopes within a specified docusign bulk send batch.
ChangeusersinaccountThis endpoint allows you to update information for one or more users within a docusign account.
CloseusersinaccountCloses one or more users in a docusign account, preventing them from accessing account features without permanently deleting them.
Commit chunked upload for envelopesThis endpoint commits a chunked upload in docusign, finalizing the upload process and preparing the uploaded content for use in other api calls.
Configure cloud storage redirect urlThis endpoint configures the redirect url information for one or more cloud storage providers associated with a specific user in docusign.
Create account custom fieldCreates a new custom field at the account level in docusign, making it available for all new envelopes associated with the account.
Create a collaborative workspaceThis endpoint creates a new collaborative workspace in docusign, providing a shared area for document management and workflow collaboration.
CreatebccemailarchiveconfigurationCreates a bcc email archive configuration for a docusign account, enabling automatic archiving of docusign-generated emails.
Create brand profiles for accountThis endpoint creates brand profile files for a docusign account, customizing visual and textual elements.
Create bulk send requestThis endpoint initiates a bulk send process for docusign, allowing users to send a single envelope or template to multiple recipients efficiently.
Create bulk send test requestThis endpoint creates a bulk send test request to validate the compatibility between a bulk send list and an envelope or template for docusign's bulk sending feature.
Create connect configuration for accountThis endpoint creates a custom connect configuration for a specified docusign account, enabling webhook notifications for envelope and recipient events.
Create custom document fields in envelopeCreates custom document fields in an existing envelope document within docusign.
Create custom fields for envelopeThis endpoint allows you to create or update custom fields for a specific docusign envelope.
Create custom fields in template documentCreates custom document fields in an existing template document within docusign.
CreatecustomtabwithpropertiesCreates a custom tab with pre-defined properties for use in docusign envelopes.
CreatedocumentresponsivehtmlpreviewCreates a preview of the responsive html version of a specific document within a docusign envelope.
Create Envelope From TemplateCreates and sends an envelope using a template.
CreategroupsforaccountCreates one or more groups for a specified docusign account.
CreateidproofresourcetokenforrecipientCreates a resource token that allows a sender to retrieve identification data for a specific recipient using docusign's id evidence api.
CreatenewaccountpermissionprofileThis endpoint creates a new permission profile for a docusign account, defining specific sets of permissions for user groups.
CreatenotaryjurisdictionobjectCreates a new notary jurisdiction object in the docusign system.
CreateorupdateuserauthorizationsCreates or updates multiple user authorizations in docusign, allowing an agent user to perform specific actions on behalf of a principal user.
CreatepreviewofresponsivehtmlCreates a preview of the responsive html version of a specific template document in docusign.
CreatepreviewofresponsivehtmlinenvelopeCreates a preview of the responsive html versions of all documents in an envelope, allowing users to review how pdf documents will appear as responsive html across different device types before sending.
CreaterecipientmanualreviewlinkCreates a url for manually reviewing a recipient's identity in docusign.
CreaterecipientpreviewforenvelopeCreates a url for previewing the recipient's view of a draft envelope or template.
CreaterecipientviewurlCreates a url for embedding the docusign recipient view ui within an application, allowing users to sign documents directly in the app.
Create sender view url for envelopeCreates a url for the sender view of a docusign envelope, enabling the embedding of docusign ui within an external application.
Create signing groupCreates one or more signing groups in a docusign account.
CreatetemplatedocumentcustomfieldsThis endpoint creates custom document fields in an existing docusign template.
Create template recipient preview urlThis endpoint generates a url that allows senders to preview the experience of a specific recipient for a docusign template.
CreatetemplateresponsivehtmlpreviewCreates a preview of the responsive html versions of all documents associated with a docusign template.
Create template workflow stepThis endpoint adds a new workflow step to an existing docusign template.
CreateurlfortemplateeditviewCreates a url for embedding the docusign template edit view within an application.
CreateuserauthorizationforagentuserCreates a user authorization in docusign, enabling an agent user to perform specific actions on behalf of a principal user within the same account.
Delete account brandThis endpoint deletes a specific brand from a docusign account.
Delete account custom fieldDeletes an existing account custom field from a docusign account.
Delete account permission profileThis endpoint deletes a specific permission profile from a docusign account.
Delete account stampDeletes a specific account stamp (signature) from a docusign account.
Delete bcc email archive configurationThis endpoint deletes a bcc (blind carbon copy) email archive configuration from a specified docusign account.
DeletebrandfromgroupThis endpoint allows users to delete one or more brands from a specified group within a docusign account.
DeletebrandlogobytypeThis endpoint deletes a specific logo from an account brand in docusign.
Delete brand profilesThis endpoint allows you to delete one or more brand profiles from a docusign account.
Delete chunked uploadDeletes a chunked upload that has been committed but not yet consumed in the docusign system.
Delete connect configurationDeletes a specified docusign connect configuration from the given account.
Delete connect failure log entryDeletes one or all connect failure log entries for a specified docusign account.
DeleteconnectlogentriesDeletes a specified list of connect log entries for a docusign account.
Delete connect oauth configurationDeletes the connect oauth configuration for a specified docusign account.
Delete contact from accountDeletes a specific contact from a docusign account.
Delete custom document fieldsDeletes custom document fields from an existing envelope document in docusign.
DeletecustomdocumentfieldsfromtemplateDeletes specified custom document fields from an existing template document in docusign.
Delete custom fields in templateThis endpoint deletes specified custom fields from a docusign template.
Delete custom tab informationDeletes a specified custom tab from a docusign account.
Delete custom user settingsDeletes specified custom user settings for a single docusign user.
DeletedelayedroutingruleforenvelopestepThis endpoint deletes the delayed routing object for a specific envelope's workflow step in docusign.
Delete delayed routing rules for templateDeletes the delayed routing rules for a specific template workflow step in docusign.
Delete draft envelope attachmentsDeletes one or more envelope attachments from a draft envelope in docusign.
DeleteenoteconfigurationDeletes an existing enote configuration associated with a specific docusign account.
DeleteenvelopecustomfieldsThis endpoint deletes envelope custom fields for draft and in-process envelopes in docusign.
DeleteenvelopeemailsettingsDeletes all existing email override settings for a specific envelope in docusign.
DeleteenvelopelockThe deleteenvelopelock endpoint removes the lock from a specified envelope in docusign, allowing it to be modified again.
Delete envelope scheduled sending rulesDeletes the scheduled sending rules for a specific envelope's workflow in docusign.
Delete envelope transfer ruleDeletes a specific envelope transfer rule from a docusign account.
Delete envelope workflow definitionThis endpoint deletes the workflow definition for a specified envelope in docusign.
Delete envelope workflow stepDeletes a specific workflow step from an envelope in docusign.
Delete existing workspace logicallyLogically deletes an existing workspace in docusign.
Delete members from signing groupRemoves one or more members from a specified docusign signing group.
DeletemultiplecontactsfromaccountDeletes multiple contacts associated with a specific docusign account.
Delete notary jurisdictionDeletes a specified notary jurisdiction from the docusign system.
Delete one or more signing groupsDeletes one or more signing groups from a specified docusign account.
Delete page from document in envelopeDeletes a specific page from a document within an envelope in docusign.
Delete page from template documentDeletes a specific page from a document within a docusign template.
Delete powerform by idThis endpoint deletes a specific powerform identified by its unique id within a docusign account.
Delete request log filesDeletes all request log files associated with the docusign api.
Delete scheduled sending rulesDeletes all scheduled sending rules associated with a specific docusign template's workflow.
Delete signature for captive recipientsThis endpoint deletes the signature for one or more captive (embedded) recipient records in docusign.
Delete specific connect log entryDeletes a specified entry or all entries from the docusign connect log for a given account.
Delete specified accountDeletes (closes) a specified docusign account.
Delete stamp image for accountThis endpoint deletes a specific stamp image associated with an account signature in docusign.
DeletetemplatefromenvelopedocumentThis endpoint deletes a specified template from a document within an existing envelope in docusign.
Delete template lockDeletes the lock from a specified template in docusign.
Delete template workflow stepDeletes a specific workflow step from a template's workflow definition in docusign.
DeleteuserauthforcloudstorageprovidersThis endpoint deletes the user authentication information for one or more cloud storage providers associated with a specific docusign user account.
Delete user authorizationDeletes a specific user authorization within the docusign system.
DeleteuserauthorizationsThe deleteuserauthorizations endpoint is used to remove one or more user authorizations for a specified principal user within a docusign account.
Delete user cloud storage authenticationThis endpoint deletes the user authentication information for a specified cloud storage provider in docusign.
DeleteusergroupDeletes one or more existing user groups from a specified docusign account.
Delete user initials or signature imageThis endpoint deletes a specified initials image or signature image for a user in docusign.
Delete user profile imageDeletes the profile image of a specified user within a docusign account.
Delete users from groupDeletes one or more users from a specified group within a docusign account.
Delete workflow definition for templateDeletes the workflow definition associated with a specific template in docusign.
Delete workspace files or foldersThis endpoint allows for the deletion of one or more files or sub-folders from a docusign workspace folder or root.
Deprecated endpoint for tab blobThis deprecated endpoint is used to update tab-related data (tab blobs) within a specific envelope in a docusign account.
ExportbrandtoxmlfileThis endpoint exports information about a docusign brand to an xml file.
FetchrecipientnamesforemailRetrieves a list of all names associated with a specified email address in docusign.
GenerateeditviewurlforenvelopeGenerates a url for accessing and editing an existing envelope within the docusign ui, allowing for embedded editing functionality in external applications.
GenerateenvelopecorrectionurlGenerates a url that allows embedding the envelope correction view of the docusign ui within an application.
GeneraterecipientsharedviewurlGenerates a url that enables embedding the docusign ui recipient view of a shared envelope in your application.
Get account billing charges listRetrieves a detailed list of recurring and usage charges for a specified docusign account.
Get account password rulesRetrieves the current password rules and security settings for a specified docusign account.
Get account stamp imageRetrieves the image file for a specific account stamp, signature, or initials in docusign.
GetagentuserauthorizationsRetrieves user authorizations for a specified agent user within a docusign account.
Get api request log settingsRetrieves the current api request logging settings for the authenticated user in docusign.
Get bcc email archive configurationsRetrieves a list of bcc (blind carbon copy) email archive configurations associated with a specified docusign account.
GetbccemailarchivehistoryRetrieves the history of changes made to a specific bcc email archive configuration for a docusign account.
Get brand logo by typeRetrieves a specific logo used in a brand for a docusign account.
Get brands information for groupRetrieves detailed brand information associated with a specific group within a docusign account.
Get bulk send batch statusRetrieves the general status of a specific bulk send batch in docusign.
Get bulk send lists informationRetrieves a list of bulk send lists belonging to the current user in a specified docusign account.
GetdefaultconsumerdisclosureRetrieves the default html-formatted electronic record and signature disclosure (ersd) associated with a docusign account.
Get docusign account contactsRetrieves contact information associated with a docusign account.
GetdowngradeplaninfoforaccountRetrieves detailed billing information related to a downgrade request for a specific docusign account.
GetelectronicdisclosureforrecipientRetrieves the html-formatted electronic record and signature disclosure (ersd) for a specific envelope recipient in docusign.
GetelectronicrecordandsignaturedisclosureRetrieves the html-formatted electronic record and signature disclosure (ersd) associated with a specific docusign account.
GetenoteintegrationsettingsRetrieves the enote integration settings for a specified docusign account.
Get EnvelopeGets the status and basic information about an envelope from docusign.
Get Envelope DocGen Form FieldsGiven an envelopeid, this method returns the sender fields found in that envelope's documents.
Get Envelope Document FieldsRetrieves the custom document field information from an existing envelope document.
Get envelope lock informationRetrieves general information about an envelope lock in docusign.
GetenvelopenotificationdefaultsRetrieves the default email notification settings for envelopes in a docusign account.
GetenvelopeworkflowdefinitionRetrieves the workflow definition for a specified envelope in docusign.
GetenvelopeworkflowdelayedroutingdefinitionRetrieves the delayed routing rules for a specific workflow step within a docusign envelope.
GetgroupsinformationforaccountRetrieves detailed information about groups associated with a specific docusign account.
GetlistofaccountpermissionprofilesThis endpoint retrieves a comprehensive list of permission profiles associated with a specified docusign account.
Get members of a signing groupRetrieves the list of members in a specified docusign signing group.
GetnotaryjurisdictionobjectRetrieves detailed information about a specific notary jurisdiction for the authenticated user.
Get notary jurisdictions for userRetrieves a list of notary journals for a user in the docusign system.
GetnotaryusersettingsRetrieves the settings and information for the currently authenticated notary user in the docusign system.
GetoriginalhtmldefinitionfortemplateRetrieves the original html definition for a specified docusign template.
GetpageimagefromenvelopeRetrieves an image of a specific page from a document within a docusign envelope.
GetpdftranscriptofenvelopecommentsRetrieves a pdf transcript containing all comments added by senders and recipients to documents within a specific envelope in a docusign account.
GetpermissionprofileforaccountThis endpoint retrieves detailed information about a specific permission profile in a docusign account.
Get powerform sendersRetrieves a list of users who have sent powerforms within a specified docusign account.
GetrecipientdocumentvisibilityRetrieves document visibility settings for a specific recipient within a docusign envelope.
Get request logging log fileRetrieves detailed information for a single api request log entry from docusign's diagnostics service.
Get signature information for recipientRetrieves detailed signature information for a specific signer or sign-in-person recipient within a docusign envelope.
Get signing group informationRetrieves comprehensive information about a specific signing group, including details about its members.
GetspecificbrandresourcefileRetrieves a specific branding resource file for customizing docusign experiences.
GetspecifiedaccountstampinfoRetrieves detailed information about a specific account stamp (signature) in docusign.
GetsupportedlanguagesforrecipientsRetrieves a comprehensive list of supported languages that can be set for individual recipients when creating a docusign envelope.
GettabsblobforenvelopeThis deprecated endpoint retrieves the tabs blob associated with a specific envelope in docusign.
GettabsettingsforaccountRetrieves the current tab settings and functionality enabled for a specific docusign account.
Get TemplateGets a template definition from the specified account.
Get template delayed routing rulesRetrieves the delayed routing rules for a specific workflow step within a docusign template.
GettemplatedocumenthtmldefinitionRetrieves the html definition for a specific document within a docusign template.
Get template lock informationRetrieves general information about a template lock in docusign.
Get template notification informationRetrieves the envelope notification, reminders, and expiration information for an existing template in docusign.
Get template recipient document visibilityThis endpoint retrieves document visibility information for a specific recipient of a docusign template.
Get template scheduled sending settingsRetrieves the scheduled sending settings for a specified docusign template.
Get templates for envelope documentRetrieves the templates associated with a specific document within a docusign envelope.
Get templates used in envelopeThis endpoint retrieves a list of server-side templates used in a specific docusign envelope.
Get unsupported file types listRetrieves a comprehensive list of file types (both mime-types and file extensions) that are not supported for upload through the docusign system.
GeturlforembeddingdocusignuiThis endpoint returns a url that enables embedding the docusign ui in your applications, providing seamless integration of electronic signing capabilities.
Get user authorization detailsRetrieves detailed information about a specific user authorization in docusign.
GetuserauthorizationsforprincipalRetrieves user authorizations for a specified principal user within a docusign account.
Get user cloud storage provider configurationRetrieves the cloud storage provider configuration for a specific user within a docusign account.
Get user information by idRetrieves detailed information about a specific user within a docusign account.
Get users in groupRetrieves a paginated list of users belonging to a specific group within a docusign account.
GetwatermarkdetailsforaccountRetrieves and previews the watermark details for a specific docusign account.
GetworkflowstepforenvelopeRetrieves detailed information about a specific workflow step for a docusign template.
Get workspace fileRetrieves a binary version of a file from a docusign workspace.
Get workspace folder contentsRetrieves the contents of a specific workspace folder in docusign, including sub-folders and files.
Initiate new chunked uploadInitiates a new chunked upload in docusign by sending the first part of the content.
Get Account TemplatesGets the definition of a template or templates in the specified account.
List billing invoicesRetrieves a list of billing invoices for a specified docusign account.
List brands for accountRetrieves a comprehensive list of brands associated with a docusign account, including default brand profiles.
ListbulksendbatchsummariesRetrieves a summary of bulk send batches for a docusign account.
ListcloudstorageitemsRetrieves a list of the user's items (files and folders) from a specified cloud storage provider integrated with docusign.
ListenvelopeanddocumentcustomfieldsRetrieves a comprehensive list of envelope and document custom fields associated with a specific docusign account.
ListenvelopeattachmentsbyenvelopeidRetrieves a list of envelope attachments associated with a specified envelope in docusign.
List past due invoicesRetrieves a list of past due invoices for a specified docusign account and indicates if payment can be made through the rest api.
ListpaymentgatewayaccountsinfoRetrieves a list of all payment gateway accounts associated with a specific docusign account, along with detailed information about each account.
List registered notary jurisdictionsRetrieves a paginated list of registered notary jurisdictions for the current user, who must be a notary.
ListresourcesforrestversionspecifiedRetrieves the base resources available for the docusign esignature rest api.
ListsignatureprovidersforaccountRetrieves a list of signature providers available for a specified docusign account.
List users for accountRetrieves a list of users for a specified docusign account.
ListworkspacefilepagesRetrieves a workspace file as rasterized pages from a docusign workspace.
List workspacesRetrieves a list of docusign workspaces and their associated information for a specified account.
Lock an envelope for editingThis endpoint locks an envelope for editing, preventing other users or recipients from changing it.
LocktemplateforeditingThis endpoint locks a specified docusign template for editing, preventing other users or recipients from modifying it during the lock period.
ModifyaccountnotificationsettingsThis endpoint updates the default email notification settings for envelope senders and signers in a docusign account.
Modify tab settings for accountThis endpoint modifies the tab types and tab functionality that are enabled for a docusign account.
PostpaymenttoinvoicePosts a payment to a past due invoice in the docusign system.
Purchase additional envelopesThis endpoint completes the purchase of additional envelopes for a docusign account through an internal workflow interaction with an envelope vendor.
Queue downgrade billing plan requestQueues a downgrade request for a docusign account's billing plan.
RegistercurrentuserasnotaryThis endpoint registers the current user as a notary in docusign, enabling remote online notarization capabilities.
Remove bulk send listThis endpoint deletes a specific bulk send list from a docusign account.
RemovegroupsharingpermissionsfortemplateRemoves sharing permissions for specified member groups from a docusign template.
RemovetemplatesfromfavoritesRemoves one or more templates from an account's list of favorite templates in docusign.
Remove user signature informationRemoves the signature information for a specific user in docusign.
Republish connect data for envelopeRepublishes connect information for a specified envelope in docusign.
Republish connect info for envelopesRepublishes connect information for a specified set of envelopes in docusign.
RetrieveaccountbillingplanRetrieves detailed billing plan information for a specified docusign account.
RetrieveaccountbrandinformationRetrieves detailed information about a specific brand associated with a docusign account.
RetrieveaccountenvelopepurgeconfigRetrieves the current envelope purge configuration for a specified docusign account.
RetrieveaccountfavoritetemplatesRetrieves the list of favorite templates associated with a specified docusign account.
RetrieveaccountinformationforspecifiedaccountRetrieves comprehensive information for a specified docusign account, including account details, billing information, plan specifics, and optionally detailed account settings.
RetrieveaccountpasswordrulesRetrieves the current password rules and security settings for a user's docusign account.
RetrieveaccountprovisioninginfoRetrieves the account provisioning information for a docusign account.
RetrieveaccountsealprovidersRetrieves a list of electronic seal providers available for a specific docusign account.
RetrieveaccountsettingsinformationRetrieves the comprehensive account settings information for a specified docusign account.
RetrieveaccountsigninggroupsRetrieves a comprehensive list of all signing groups within a specified docusign account.
RetrieveaccountverificationworkflowsRetrieves a list of identity verification workflows available for a docusign account.
RetrieveallaccounttabsRetrieves a comprehensive list of all tabs associated with a specified docusign account.
RetrieveapirequestlogfilesRetrieves a list of api request log entries from docusign, providing diagnostic information for developers.
RetrieveavailableaccountstampsRetrieves a list of stamps available in a docusign account.
Retrieve billing invoiceRetrieves a specific billing invoice for a docusign account, providing detailed information about charges and payment details.
RetrievebillingpaymentinfoRetrieves detailed information for a specified billing payment within a docusign account.
Retrieve billing plan detailsRetrieves comprehensive details of a specific docusign billing plan using its unique identifier.
Retrieve chunked upload metadataRetrieves metadata for a specific chunked upload in docusign.
Retrieve cloud storage provider configurationRetrieves the list of cloud storage providers enabled for a specific user in a docusign account, along with their configuration information.
RetrieveconnectconfigurationdetailsRetrieves detailed information for a specific docusign connect configuration.
RetrieveconnectconfigurationsRetrieves all docusign custom connect definitions for a specified account.
Retrieve connect failure logsRetrieves the connect failure log information for a specified docusign account.
Retrieve connect log entryRetrieves a specific connect log entry for a docusign account.
Retrieve connect logsRetrieves the 100 most recent connect log entries for a specified docusign account.
RetrieveconnectoauthconfigurationRetrieves the connect oauth configuration for a specified docusign account.
RetrievecreditcardinfoThis endpoint retrieves detailed credit card information associated with a specific docusign account.
Retrieve custom fields for envelopeRetrieves custom field information for a specified envelope in docusign.
RetrievecustomfieldsfortemplateThis endpoint retrieves the custom document fields for an existing template document in docusign.
RetrievecustomtabinformationRetrieves detailed information about a specific custom tab associated with a docusign account.
RetrievecustomusersettingsRetrieves a list of custom user settings for a single user in docusign.
Retrieve default disclosure for envelopeRetrieves the default html-formatted electronic record and signature disclosure (ersd) for a specified envelope in docusign.
RetrieveenvelopeattachmentRetrieves a developer-only envelope attachment from a specific envelope in docusign.
RetrieveenvelopeauditeventsRetrieves the audit events for a specified envelope in docusign.
RetrieveenvelopedocumentfieldsRetrieves custom document field information from an existing envelope document in docusign.
RetrieveenvelopedocumentsRetrieves one or more documents from a docusign envelope.
RetrieveenvelopeemailoverridesRetrieves the email override settings for a specified envelope in docusign.
RetrieveenvelopehtmldefinitionRetrieves the original html definition used to generate the responsive html for a specific envelope in a docusign account.
RetrieveenvelopenotificationdetailsRetrieves the notification, reminder, and expiration settings for an existing envelope in docusign.
RetrievehtmldefinitionforresponsivedocumentThis endpoint retrieves the html definition used to generate a dynamically sized responsive document within a docusign envelope.
RetrieveitemsincloudstoragefolderRetrieves a list of items (files and folders) from a specified folder in an integrated cloud storage provider.
RetrievelistofbillingplansRetrieves a comprehensive list of billing plans associated with a distributor in the docusign system.
Retrieve payment information listRetrieves a list of payment information for a specific docusign account.
Retrieve pdf from specified templateRetrieves one or more pdf documents from a specified docusign template.
RetrievepowerformdataentriesThis endpoint retrieves data entries for a specific powerform within a docusign account.
RetrievepropertiesaboutworkspaceRetrieves detailed properties and information about a specific docusign workspace.
Retrieve rest api versionsRetrieves the available rest api versions for docusign's service.
RetrieveshareditemstatusforusersRetrieves shared item status for one or more users and types of items within a docusign account.
Retrieve signer signature image informationRetrieves the specified user's signature image from a docusign envelope.
RetrievetemplatecustomfieldsRetrieves the custom document field information from an existing template in docusign.
RetrievetemplatedocumentpageimagesRetrieves and returns images of pages from a specified template document in docusign.
Retrieve template page imageRetrieves a specific page image from a template document for display purposes.
Retrieve user account settingsRetrieves a comprehensive list of account settings and email notification preferences for a specified user within a docusign account.
Retrieve user initials image for envelopesRetrieves the initials image for a specified user within a docusign envelope.
RetrieveuserprofileimageRetrieves the user profile picture for a specified user within a docusign account.
Retrieve user profile informationThis endpoint retrieves comprehensive user profile information for a specified user within a docusign account.
Retrieve user signature definitionsThis endpoint retrieves the signature definitions for a specified user within a docusign account.
RetrieveusersignatureimageRetrieves a specified user's signature or initials image from docusign.
RetrieveusersignatureinformationThis endpoint retrieves the detailed structure and information of a single user signature within a docusign account.
RetrieveworkflowstepfortemplateRetrieves detailed information about a specific workflow step for a docusign envelope.
Return all connect service usersRetrieves all users from the configured connect service for a specific docusign account and connect configuration.
ReturnbrandresourcemetadataforaccountRetrieves metadata about the branding resources associated with a specific docusign account and brand.
ReturnenvelopetabdataforexistingenvelopeRetrieves detailed form data from a docusign envelope, including the current values of form fields, recipient information, and envelope status.
ReturnscheduledsendingrulesforenvelopeRetrieves the scheduled sending rules for a specific envelope in docusign.
Returns document page images based on inputRetrieves images of document pages from a specific envelope in a docusign account.
ReturntemplateworkflowdefinitionRetrieves the workflow definition for a specified docusign template.
Return users from connect serviceRetrieves users associated with a specific docusign connect configuration for a given account.
RevokeenvelopecorrectionurlThis endpoint revokes the correction view url for a specific envelope in docusign, effectively disabling the ability to make further corrections to the envelope.
Rotate page image for envelopeThis endpoint rotates a page image within a specific document of an envelope in docusign.
RotatetemplatepageimageRotates a page image within a docusign template for display purposes.
Send EnvelopeSends a draft envelope by updating its status to 'sent'.
Set envelope purge config for accountSets the envelope purge configuration for a specified docusign account, allowing account administrators to define automatic document removal policies for completed and voided envelopes.
Set initials image for accountless signerThis endpoint allows you to update the initials image for a signer who does not have a docusign account within a specific envelope.
Set shared access for users and templatesThis endpoint sets shared access for users and templates in docusign.
Set signature image for no account signerThis endpoint updates the signature image for an accountless signer in a docusign envelope.
Set templates as account favoritesThis endpoint allows users to set one or more templates as account favorites in docusign.
Set up connect oauth configurationSets up connect oauth configuration for a specified docusign account using a custom authorization server.
SetusersignatureimageSets or updates a user's signature image, initials, or stamp in their docusign account.
Share template with groupThis endpoint allows you to share a docusign template with a specified members group.
Submit batch historical envelopes to webhookThis endpoint submits a batch of existing envelopes to a specified webhook for historical publishing.
Toggle api request loggingThis endpoint enables or disables api request logging for troubleshooting purposes in docusign.
UpdateaccountbrandsettingsThe updateaccountbrandsettings endpoint modifies or replaces an existing brand configuration for a docusign account.
UpdateaccountcustomfieldThis endpoint updates an existing account custom field in docusign.
Update account password rulesThis endpoint updates the password rules for a docusign account.
UpdateaccountsettingsUpdates various settings for a specified docusign account.
Update account stamp by idThis endpoint allows you to update an existing account stamp (signature) in docusign.
UpdateaccountstampsThis endpoint allows you to add or update one or more account stamps (signatures) for a docusign account.
Update account watermark informationThis endpoint updates the watermark settings for a specified docusign account.
UpdateaccountwatermarkpreviewUpdates and previews watermark settings for a docusign account.
Update billing plan for accountUpdates billing plan information, address, and payment details for a docusign account.
UpdatebulksendbatchnameUpdates the name of an existing bulk send batch in docusign.
Update connect oauth configurationThis endpoint updates an existing connect oauth configuration for a docusign account.
Update contacts informationThis endpoint updates one or more contacts associated with a docusign account.
Update custom fields in envelope documentThis endpoint allows you to update existing custom document fields in a specific document within an envelope in docusign.
Update custom tab information for accountThis endpoint updates the information for a custom tab associated with a specific docusign account.
UpdatedocumentvisibilityrecipientsThis endpoint updates document visibility settings for one or more recipients within a specific docusign envelope.
Update docusign connect configurationThis endpoint updates an existing docusign connect configuration for a specified account.
Update electronic record disclosureThis endpoint updates the electronic record and signature disclosure (ersd) for a docusign account.
UpdateenoteintegrationconfigUpdates the enote integration configuration for a specific docusign account.
Update envelope attachmentUpdates an existing attachment for a draft or in-process envelope in docusign.
Update envelope custom fieldsThis endpoint allows users to update custom fields for draft and in-process envelopes in docusign.
UpdateenvelopedelayedroutingrulesUpdates the delayed routing rules for a specific workflow step in a docusign envelope.
Update Envelope DocGen Form FieldsThis method dynamically generates an envelope's documents by populating its sender fields.
UpdateenvelopeemailsettingsUpdates the existing email override settings for a specified envelope in docusign.
Update envelope notification settingsUpdates the notification settings for a specific docusign envelope, including reminders and expirations.
Update envelope scheduled sending rulesUpdates the scheduled sending rules for an envelope's workflow in docusign.
Update envelope workflow definitionUpdates the workflow definition for a specified envelope in docusign.
Update envelope workflow stepUpdates a specific workflow step for a docusign envelope, allowing for customization of envelope processing, including delayed routing and conditional recipients.
Update group informationUpdates group information and modifies or sets permission profiles for specified groups within a docusign account.
UpdatelockforenvelopeUpdates the lock information for a locked envelope in docusign.
Update notary jurisdiction infoUpdates the jurisdiction information for a notary in the docusign system.
UpdatepermissionprofilesettingsThis endpoint updates an existing account permission profile in docusign.
UpdaterecipientdocumentvisibilityThis endpoint updates the document visibility settings for a specific recipient within a docusign envelope.
Update signing group detailsUpdates the details of a specified signing group within a docusign account, including the group name, email, and member information.
UpdatesigninggroupnamesUpdates the names of one or more existing signing groups in docusign.
Update template custom fieldsUpdates the custom fields in a docusign template.
UpdatetemplatedelayedroutingrulesThis endpoint updates the scheduled sending rules for a specific workflow step in a docusign template.
Update template document custom fieldsThis endpoint updates existing custom document fields in a specific document within a docusign template.
Update Template Doc VisibilityThis endpoint updates document visibility settings for one or more recipients in a docusign template.
Update template lock informationThis endpoint allows you to update the lock information for an already locked template in docusign.
Update template notification settingsThis endpoint updates the notification structure for an existing docusign template.
UpdatetemplaterecipientdocumentvisibilityThis endpoint updates the document visibility settings for a specific recipient in a docusign template.
UpdatetemplatescheduledsendingrulesUpdates the scheduled sending rules for a docusign template, allowing users to configure delayed sending for envelopes.
UpdatetemplateworkflowdefinitionUpdates the workflow definition for a specified template in docusign, allowing for customization of the document signing process.
Update user account settingsThis endpoint updates the account settings and email notification types for a specified user in docusign.
UpdateuserauthorizationdatesUpdates the start and/or end dates for a specified user authorization in docusign.
Update user information for specified userThe user putuser endpoint allows updating user information for a specified user within a docusign account.
UpdateusernotaryinformationThe updateusernotaryinformation endpoint modifies a notary's profile and settings in docusign.
Update user profile imageUpdates a user's profile image in docusign by uploading a new image file.
UpdateuserprofileinformationUpdates a user's profile in docusign, including personal details, privacy settings, and user id card information.
Update user signature by idUpdates or creates a user's signature and initials for a specified docusign account.
Update workflow step for templateThis endpoint updates a specified workflow step for a docusign template.
UpdateworkspaceinformationUpdates information about a specific docusign workspace.
UpdateworkspaceitemmetadataThis endpoint updates the metadata for one or more specific files or folders in a docusign workspace.

What is the Composio tool router, and how does it fit here?

What is Tool Router?

Composio's Tool Router helps agents find the right tools for a task at runtime. You can plug in multiple toolkits (like Gmail, HubSpot, and GitHub), and the agent will identify the relevant app and action to complete multi-step workflows. This can reduce token usage and improve the reliability of tool calls. Read more here: Getting started with Tool Router

The tool router generates a secure MCP URL that your agents can access to perform actions.

How the Tool Router works

The Tool Router follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Prerequisites

Before starting, make sure you have:
  • Composio API Key and OpenAI API Key
  • Primary know-how of OpenAI Agents SDK
  • A live Docusign project
  • Some knowledge of Python or Typescript

Getting API Keys for OpenAI and Composio

OpenAI API Key
  • Go to the OpenAI dashboard and create an API key. You'll need credits to use the models, or you can connect to another model provider.
  • Keep the API key safe.
Composio API Key

Install dependencies

pip install composio_openai_agents openai-agents python-dotenv

Install the Composio SDK and the OpenAI Agents SDK.

Set up environment variables

bash
OPENAI_API_KEY=sk-...your-api-key
COMPOSIO_API_KEY=your-api-key
USER_ID=composio_user@gmail.com

Create a .env file and add your OpenAI and Composio API keys.

Import dependencies

import asyncio
import os
from dotenv import load_dotenv

from composio import Composio
from composio_openai_agents import OpenAIAgentsProvider
from agents import Agent, Runner, HostedMCPTool, SQLiteSession
What's happening:
  • You're importing all necessary libraries.
  • The Composio and OpenAIAgentsProvider classes are imported to connect your OpenAI agent to Composio tools like Docusign.

Set up the Composio instance

load_dotenv()

api_key = os.getenv("COMPOSIO_API_KEY")
user_id = os.getenv("USER_ID")

if not api_key:
    raise RuntimeError("COMPOSIO_API_KEY is not set. Create a .env file with COMPOSIO_API_KEY=your_key")

# Initialize Composio
composio = Composio(api_key=api_key, provider=OpenAIAgentsProvider())
What's happening:
  • load_dotenv() loads your .env file so OPENAI_API_KEY and COMPOSIO_API_KEY are available as environment variables.
  • Creating a Composio instance using the API Key and OpenAIAgentsProvider class.

Create a Tool Router session

# Create a Docusign Tool Router session
session = composio.create(
    user_id=user_id,
    toolkits=["docusign"]
)

mcp_url = session.mcp.url

What is happening:

  • You give the Tool Router the user id and the toolkits you want available. Here, it is only docusign.
  • The router checks the user's Docusign connection and prepares the MCP endpoint.
  • The returned session.mcp.url is the MCP URL that your agent will use to access Docusign.
  • This approach keeps things lightweight and lets the agent request Docusign tools only when needed during the conversation.

Configure the agent

# Configure agent with MCP tool
agent = Agent(
    name="Assistant",
    model="gpt-5",
    instructions=(
        "You are a helpful assistant that can access Docusign. "
        "Help users perform Docusign operations through natural language."
    ),
    tools=[
        HostedMCPTool(
            tool_config={
                "type": "mcp",
                "server_label": "tool_router",
                "server_url": mcp_url,
                "headers": {"x-api-key": api_key},
                "require_approval": "never",
            }
        )
    ],
)
What's happening:
  • We're creating an Agent instance with a name, model (gpt-5), and clear instructions about its purpose.
  • The agent's instructions tell it that it can access Docusign and help with queries, inserts, updates, authentication, and fetching database information.
  • The tools array includes a HostedMCPTool that connects to the MCP server URL we created earlier.
  • The headers dict includes the Composio API key for secure authentication with the MCP server.
  • require_approval: 'never' means the agent can execute Docusign operations without asking for permission each time, making interactions smoother.

Start chat loop and handle conversation

print("\nComposio Tool Router session created.")

chat_session = SQLiteSession("conversation_openai_toolrouter")

print("\nChat started. Type your requests below.")
print("Commands: 'exit', 'quit', or 'q' to end\n")

async def main():
    try:
        result = await Runner.run(
            agent,
            "What can you help me with?",
            session=chat_session
        )
        print(f"Assistant: {result.final_output}\n")
    except Exception as e:
        print(f"Error: {e}\n")

    while True:
        user_input = input("You: ").strip()
        if user_input.lower() in {"exit", "quit", "q"}:
            print("Goodbye!")
            break

        result = await Runner.run(
            agent,
            user_input,
            session=chat_session
        )
        print(f"Assistant: {result.final_output}\n")

asyncio.run(main())
What's happening:
  • The program prints a session URL that you visit to authorize Docusign.
  • After authorization, the chat begins.
  • Each message you type is processed by the agent using Runner.run().
  • The responses are printed to the console, and conversations are saved locally using SQLite.
  • Typing exit, quit, or q cleanly ends the chat.

Complete Code

Here's the complete code to get you started with Docusign and open-ai-agents-sdk:

import asyncio
import os
from dotenv import load_dotenv

from composio import Composio
from composio_openai_agents import OpenAIAgentsProvider
from agents import Agent, Runner, HostedMCPTool, SQLiteSession

load_dotenv()

api_key = os.getenv("COMPOSIO_API_KEY")
user_id = os.getenv("USER_ID")

if not api_key:
    raise RuntimeError("COMPOSIO_API_KEY is not set. Create a .env file with COMPOSIO_API_KEY=your_key")

# Initialize Composio
composio = Composio(api_key=api_key, provider=OpenAIAgentsProvider())

# Create Tool Router session
session = composio.create(
    user_id=user_id,
    toolkits=["docusign"]
)
mcp_url = session.mcp.url

# Configure agent with MCP tool
agent = Agent(
    name="Assistant",
    model="gpt-5",
    instructions=(
        "You are a helpful assistant that can access Docusign. "
        "Help users perform Docusign operations through natural language."
    ),
    tools=[
        HostedMCPTool(
            tool_config={
                "type": "mcp",
                "server_label": "tool_router",
                "server_url": mcp_url,
                "headers": {"x-api-key": api_key},
                "require_approval": "never",
            }
        )
    ],
)

print("\nComposio Tool Router session created.")

chat_session = SQLiteSession("conversation_openai_toolrouter")

print("\nChat started. Type your requests below.")
print("Commands: 'exit', 'quit', or 'q' to end\n")

async def main():
    try:
        result = await Runner.run(
            agent,
            "What can you help me with?",
            session=chat_session
        )
        print(f"Assistant: {result.final_output}\n")
    except Exception as e:
        print(f"Error: {e}\n")

    while True:
        user_input = input("You: ").strip()
        if user_input.lower() in {"exit", "quit", "q"}:
            print("Goodbye!")
            break

        result = await Runner.run(
            agent,
            user_input,
            session=chat_session
        )
        print(f"Assistant: {result.final_output}\n")

asyncio.run(main())

Conclusion

This was a starter code for integrating Docusign MCP with OpenAI Agents SDK to build a functional AI agent that can interact with Docusign.

Key features:

  • Hosted MCP tool integration through Composio's Tool Router
  • SQLite session persistence for conversation history
  • Simple async chat loop for interactive testing
You can extend this by adding more toolkits, implementing custom business logic, or building a web interface around the agent.

How to build Docusign MCP Agent with another framework

FAQ

What are the differences in Tool Router MCP and Docusign MCP?

With a standalone Docusign MCP server, the agents and LLMs can only access a fixed set of Docusign tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Docusign and many other apps based on the task at hand, all through a single MCP endpoint.

Can I use Tool Router MCP with OpenAI Agents SDK?

Yes, you can. OpenAI Agents SDK fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Docusign tools.

Can I manage the permissions and scopes for Docusign while using Tool Router?

Yes, absolutely. You can configure which Docusign scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Docusign data and credentials are handled as safely as possible.

Used by agents from

Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.