llama-index-integrations/tools/llama-index-tools-signnow/README.md
A plug‑and‑play ToolSpec that lets LlamaIndex agents use SignNow e‑signature workflows through the SignNow MCP server. It discovers the server’s tools, exposes them to your agent, and keeps setup simple for users who already work with LlamaIndex.
# Core LlamaIndex + MCP client + SignNow ToolSpec
pip install -U llama-index llama-index-tools-mcp llama-index-tools-signnow
import asyncio
from llama_index.tools.signnow import SignNowMCPToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import (
OpenAI,
) # or any LLM that supports tool/function calling
async def main():
# Option A: pass credentials directly (no .env needed)
spec = SignNowMCPToolSpec.from_env(
env_overrides={
# Option 1: token-based auth
# "SIGNNOW_TOKEN": "your_signnow_token_here",
# Option 2: credential-based auth
"SIGNNOW_USER_EMAIL": "[email protected]",
"SIGNNOW_PASSWORD": "password",
"SIGNNOW_API_BASIC_TOKEN": "basic_token_base64",
}
)
# Fetch tools from the MCP server
tools = await spec.to_tool_list_async()
print({"count": len(tools), "names": [t.metadata.name for t in tools]})
# Wire them into a LlamaIndex agent
agent = FunctionAgent(
name="SignNow Agent",
description="Query SignNow via MCP tools",
tools=tools,
llm=OpenAI(model="gpt-4o"), # make sure your LLM supports tools
system_prompt="Be helpful.",
)
# Ask for something useful
resp = await agent.run("Show me the list of templates and their names.")
print(resp)
if __name__ == "__main__":
asyncio.run(main())
Tip: A common flow is listall_templates → create_from_template → one‑shot or send_invite / create_embedded* → get_invite_status → get_document_download_link.
The ToolSpec reads standard SignNow environment variables and forwards them to the server when spawning sn-mcp
# Username / Password (recommended for desktop dev flows)
[email protected]
SIGNNOW_PASSWORD=********
SIGNNOW_API_BASIC_TOKEN=base64(app_id:app_secret) # SignNow Basic token
# or a direct API token
SIGNNOW_TOKEN=eyJhbGciOi...
SignNowMCPToolSpec wraps the generic MCP client from llama-index-tools-mcp.
On from_env(...) it spawns the sn-mcp server (STDIO) with your environment and converts the advertised MCP tools into LlamaIndex FunctionTools for your agent to call.