Spellbook Legal AI MCP Server for LangChain 13 tools — connect in under 2 minutes
LangChain is the leading Python framework for composable LLM applications. Connect Spellbook Legal AI through the Vinkius and LangChain agents can call every tool natively — combine them with retrievers, memory, and output parsers for sophisticated AI pipelines.
ASK AI ABOUT THIS MCP SERVER
Vinkius supports streamable HTTP and SSE.
import asyncio
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
async def main():
# Your Vinkius token — get it at cloud.vinkius.com
async with MultiServerMCPClient({
"spellbook-legal-ai": {
"transport": "streamable_http",
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
}
}) as client:
tools = client.get_tools()
agent = create_react_agent(
ChatOpenAI(model="gpt-4o"),
tools,
)
response = await agent.ainvoke({
"messages": [{
"role": "user",
"content": "Using Spellbook Legal AI, show me what tools are available.",
}]
})
print(response["messages"][-1].content)
asyncio.run(main())
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About Spellbook Legal AI MCP Server
Connect to Spellbook Legal AI and bring AI-powered contract drafting, review, and analysis to any AI agent. Trusted by 4,000+ in-house teams and law firms worldwide, Spellbook helps transactional lawyers draft and review contracts faster and more accurately.
LangChain's ecosystem of 500+ components combines seamlessly with Spellbook Legal AI through native MCP adapters. Connect 13 tools via the Vinkius and use ReAct agents, Plan-and-Execute strategies, or custom agent architectures — with LangSmith tracing giving full visibility into every tool call, latency, and token cost.
What you can do
- Contract Analysis — AI-powered review of contracts identifying risks, missing clauses, non-standard terms, and issues
- Clause Suggestions — Get AI-generated clause suggestions based on market standards and best practices
- Contract Comparison — Compare two contract versions to identify additions, deletions, and modifications
- Market Comparison — Compare contract terms against 2,000+ market precedents showing pro-buyer, pro-seller, and market-standard positions
- AI Clause Drafting — Generate AI-drafted clauses based on specified requirements, jurisdiction, and party position
- Contract Summarization — Generate concise summaries highlighting key terms, obligations, and risks
- Risk Assessment — Get comprehensive risk assessments with high, medium, and low risk issues and remediations
- Playbook Compliance — Check contracts against company playbooks to identify deviations from standards
- Clause Library Search — Search Spellbook's extensive clause library for standard, market-tested clauses
- Document Management — Upload, list, and search contract documents with filtering by status and type
The Spellbook Legal AI MCP Server exposes 13 tools through the Vinkius. Connect it to LangChain in under two minutes — no API keys to rotate, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
How to Connect Spellbook Legal AI to LangChain via MCP
Follow these steps to integrate the Spellbook Legal AI MCP Server with LangChain.
Install dependencies
Run pip install langchain langchain-mcp-adapters langgraph langchain-openai
Replace the token
Replace [YOUR_TOKEN_HERE] with your Vinkius token
Run the agent
Save the code and run python agent.py
Explore tools
The agent discovers 13 tools from Spellbook Legal AI via MCP
Why Use LangChain with the Spellbook Legal AI MCP Server
LangChain provides unique advantages when paired with Spellbook Legal AI through the Model Context Protocol.
The largest ecosystem of integrations, chains, and agents — combine Spellbook Legal AI MCP tools with 500+ LangChain components
Agent architecture supports ReAct, Plan-and-Execute, and custom strategies with full MCP tool access at every step
LangSmith tracing gives you complete visibility into tool calls, latencies, and token usage for production debugging
Memory and conversation persistence let agents maintain context across Spellbook Legal AI queries for multi-turn workflows
Spellbook Legal AI + LangChain Use Cases
Practical scenarios where LangChain combined with the Spellbook Legal AI MCP Server delivers measurable value.
RAG with live data: combine Spellbook Legal AI tool results with vector store retrievals for answers grounded in both real-time and historical data
Autonomous research agents: LangChain agents query Spellbook Legal AI, synthesize findings, and generate comprehensive research reports
Multi-tool orchestration: chain Spellbook Legal AI tools with web scrapers, databases, and calculators in a single agent run
Production monitoring: use LangSmith to trace every Spellbook Legal AI tool call, measure latency, and optimize your agent's performance
Spellbook Legal AI MCP Tools for LangChain (13)
These 13 tools become available when you connect Spellbook Legal AI to LangChain via MCP:
analyze_spellbook_contract
USE WHEN: - User wants to review a contract for risks - User needs to identify issues in a contract - User asks to "analyze this contract" or "review for risks" PARAMETERS: - document_id (REQUIRED): ID of the document to analyze - analysis_type (OPTIONAL): Type of analysis — "full" (default), "risks_only", "clause_check", "market_comparison" EXAMPLES: - "Analyze document 123 for risks" → call with document_id="123" - "Review this contract for issues" → call with document_id="123", analysis_type="full" - "Check clauses in document 456" → call with document_id="456", analysis_type="clause_check" Analyze a contract document for risks, issues, and suggestions
check_spellbook_playbook
Check contract compliance against a playbook
compare_spellbook_contracts
USE WHEN: - User wants to compare two versions of a contract - User needs to identify changes between drafts - User asks to "compare these contracts" or "show differences" PARAMETERS: - document_id_1 (REQUIRED): ID of the first document - document_id_2 (REQUIRED): ID of the second document - comparison_type (OPTIONAL): Type of comparison — "full" (default), "clauses_only", "risk_comparison" EXAMPLES: - "Compare documents 123 and 456" → call with document_id_1="123", document_id_2="456" - "Show differences between contract versions" → call with document_id_1="123", document_id_2="456", comparison_type="full" Compare two contract versions to identify differences
draft_spellbook_clause
USE WHEN: - User needs to draft a new clause for a contract - User wants AI to generate standard clause language - User asks to "draft a limitation of liability clause" or "write an indemnification clause" PARAMETERS: - clause_type (REQUIRED): Type of clause to draft (e.g. "Limitation of Liability", "Indemnification", "Confidentiality") - party_position (OPTIONAL): Which party position to draft for — "neutral" (default), "pro-buyer", "pro-seller", "pro-vendor" - jurisdiction (OPTIONAL): Jurisdiction for the clause (e.g. "New York", "Delaware", "California", "UK") - custom_instructions (OPTIONAL): Additional instructions or requirements for the clause EXAMPLES: - "Draft a limitation of liability clause" → call with clause_type="Limitation of Liability" - "Draft a pro-buyer indemnification clause for New York" → call with clause_type="Indemnification", party_position="pro-buyer", jurisdiction="New York" - "Write a confidentiality clause with custom instructions" → call with clause_type="Confidentiality", custom_instructions="Include data breach notification requirements" Draft a contract clause using Spellbook AI
get_spellbook_clause_suggestions
Get AI clause suggestions for a contract document
get_spellbook_document
Get detailed information for a specific contract document
get_spellbook_market_comparison
Shows pro-buyer, pro-seller, and market-standard positions. Get market comparison data for a specific clause type
get_spellbook_risk_assessment
Get a detailed risk assessment for a contract document
list_spellbook_documents
Supports filtering by status, document type, and date range. USE WHEN: - User wants to see all their contract documents - User needs to find contracts by status or type - User is exploring their document library - User asks "what contracts do I have" or "list my documents" PARAMETERS: - status (OPTIONAL): Filter by document status (e.g. "Draft", "In Review", "Finalized") - document_type (OPTIONAL): Filter by document type (e.g. "NDA", "MSA", "SOW", "Employment Agreement") - date_from (OPTIONAL): Start date filter (YYYY-MM-DD) - date_to (OPTIONAL): End date filter (YYYY-MM-DD) - page (OPTIONAL): Page number for pagination - page_size (OPTIONAL): Results per page (default: 25, max: 100) EXAMPLES: - "List all my contract documents" → call with no params - "Show contracts in review" → call with status="In Review" - "List NDAs" → call with document_type="NDA" List all contract documents in Spellbook
search_spellbook_clause_library
Search the Spellbook clause library for standard clauses
search_spellbook_documents
Search contract documents by keyword
summarize_spellbook_contract
Generate an AI summary of a contract document
upload_spellbook_document
USE WHEN: - User wants to upload a new contract for review - User needs to analyze a contract received from another party - User asks to "upload this contract" or "analyze this document" PARAMETERS: - file_name (REQUIRED): Name of the document file - file_content (REQUIRED): Base64-encoded file content or document text - document_type (OPTIONAL): Type of document (e.g. "NDA", "MSA", "SOW") EXAMPLES: - "Upload this NDA for review" → call with file_name="NDA.pdf", file_content="[base64 content]", document_type="NDA" - "Analyze this MSA contract" → call with file_name="MSA.docx", file_content="[base64 content]", document_type="MSA" Upload a contract document to Spellbook for analysis
Example Prompts for Spellbook Legal AI in LangChain
Ready-to-use prompts you can give your LangChain agent to start working with Spellbook Legal AI immediately.
"Analyze this NDA for risks and issues."
"Draft a pro-buyer limitation of liability clause for Delaware."
"Compare the market standard for indemnification clauses."
Troubleshooting Spellbook Legal AI MCP Server with LangChain
Common issues when connecting Spellbook Legal AI to LangChain through the Vinkius, and how to resolve them.
MultiServerMCPClient not found
pip install langchain-mcp-adaptersSpellbook Legal AI + LangChain FAQ
Common questions about integrating Spellbook Legal AI MCP Server with LangChain.
How does LangChain connect to MCP servers?
langchain-mcp-adapters to create an MCP client. LangChain discovers all tools and wraps them as native LangChain tools compatible with any agent type.Which LangChain agent types work with MCP?
Can I trace MCP tool calls in LangSmith?
Connect Spellbook Legal AI with your favorite client
Step-by-step setup guides for every MCP-compatible client and framework:
Anthropic's native desktop app for Claude with built-in MCP support.
AI-first code editor with integrated LLM-powered coding assistance.
GitHub Copilot in VS Code with Agent mode and MCP support.
Purpose-built IDE for agentic AI coding workflows.
Autonomous AI coding agent that runs inside VS Code.
Anthropic's agentic CLI for terminal-first development.
Python SDK for building production-grade OpenAI agent workflows.
Google's framework for building production AI agents.
Type-safe agent development for Python with first-class MCP support.
TypeScript toolkit for building AI-powered web applications.
TypeScript-native agent framework for modern web stacks.
Python framework for orchestrating collaborative AI agent crews.
Leading Python framework for composable LLM applications.
Data-aware AI agent framework for structured and unstructured sources.
Microsoft's framework for multi-agent collaborative conversations.
Connect Spellbook Legal AI to LangChain
Get your token, paste the configuration, and start using 13 tools in under 2 minutes. No API key management needed.
