Excel Integration for AI Agents





Microsoft Excel is a robust spreadsheet application for organizing, analyzing, and visualizing data. It's the go-to tool for calculations, reporting, and flexible data management.
Supported Tools
Connect Excel MCP Tool with your Agent
Install Composio
pip install composio claude-agent-sdkCreate Tool Router Session
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions
composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.urlConnect to AI Agent
import asyncio
options = ClaudeAgentOptions(
permission_mode='bypassPermissions',
mcp_servers={
'tool_router': {
'type': 'http',
'url': url,
'headers': {
'x-api-key': 'your-composio-api-key'
}
}
},
system_prompt='You are a helpful assistant with access to Excel tools.',
max_turns=10
)
async def main():
async with ClaudeSDKClient(options=options) as client:
await client.query('Add a chart to Q2 sales worksheet')
async for message in client.receive_response():
if hasattr(message, 'content'):
for block in message.content:
if hasattr(block, 'text'):
print(block.text)
asyncio.run(main())Connect Excel API Tool with your Agent
Install Composio
pip install composio_openaiInitialize Composio and Create Tool Router Session
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider
composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')Execute Excel Tools via Tool Router with Your Agent
tools = session.tools
response = openai.responses.create(
model='gpt-4.1',
tools=tools,
input=[{
'role': 'user',
'content': 'Insert a new row into the "Sales" table with today\'s data'
}]
)
result = composio.provider.handle_tool_calls(
response=response,
user_id='your-user-id'
)
print(result)Why Use Composio?
AI Native Excel Integration
- Supports both Excel MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for reading, writing, and querying your Excel data
Managed Auth
- Built-in OAuth handling with automatic token refresh and rotation
- Central place to manage, scope, and revoke Excel access
- Per user and per environment credentials instead of hard-coded keys
Agent Optimized Design
- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf
Enterprise Grade Security
- Fine-grained RBAC so you control which agents and users can access Excel
- Scoped, least privilege access to Excel resources
- Full audit trail of agent actions to support review and compliance
Use Excel with any AI Agent Framework
Choose a Framework you want to connect Excel with
OpenAI Agents SDK
Use Excel MCP with OpenAI Agents SDK
Claude Agents SDK
Use Excel MCP with Claude Agents SDK
Google ADK
Use Excel MCP with Google ADK
Langchain
Use Excel MCP with Langchain
AI SDK
Use Excel MCP with AI SDK
Mastra AI
Use Excel MCP with Mastra AI
LlamaIndex
Use Excel MCP with LlamaIndex
CrewAI
Use Excel MCP with CrewAI
Pydantic AI
Use Excel MCP with Pydantic AI
Autogen
Use Excel MCP with Autogen
Explore Other Toolkits
Abstract
Abstract provides a suite of APIs for automating data validation and enrichment tasks. It helps developers streamline workflows and ensure data quality with minimal effort.
Agenty
Agenty is a web scraping and automation platform for extracting data and automating browser tasks—no coding needed. It streamlines data collection, monitoring, and repetitive online actions.
Ambee
Ambee is an environmental data platform providing real-time, hyperlocal APIs for air quality, weather, and pollen. Get precise environmental insights to power smarter decisions in your apps and workflows.
Frequently Asked Questions
Do I need my own developer credentials to use Excel with Composio?
Can I use multiple toolkits together?
Is Composio secure?
What if the API changes?

Used by agents from



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





