# How to integrate Share point MCP with Pydantic AI

```json
{
  "title": "How to integrate Share point MCP with Pydantic AI",
  "toolkit": "Share point",
  "toolkit_slug": "share_point",
  "framework": "Pydantic AI",
  "framework_slug": "pydantic-ai",
  "url": "https://composio.dev/toolkits/share_point/framework/pydantic-ai",
  "markdown_url": "https://composio.dev/toolkits/share_point/framework/pydantic-ai.md",
  "updated_at": "2026-05-12T10:25:48.461Z"
}
```

## Introduction

This guide walks you through connecting Share point to Pydantic AI using the Composio tool router. By the end, you'll have a working Share point agent that can create a new project folder in sharepoint, add a task item to the marketing list, find if john doe exists as a sharepoint user through natural language commands.
This guide will help you understand how to give your Pydantic AI agent real control over a Share point account through Composio's Share point MCP server.
Before we dive in, let's take a quick look at the key ideas and tools involved.

## Also integrate Share point with

- [ChatGPT](https://composio.dev/toolkits/share_point/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/share_point/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/share_point/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/share_point/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/share_point/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/share_point/framework/codex)
- [Cursor](https://composio.dev/toolkits/share_point/framework/cursor)
- [VS Code](https://composio.dev/toolkits/share_point/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/share_point/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/share_point/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/share_point/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/share_point/framework/cli)
- [Google ADK](https://composio.dev/toolkits/share_point/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/share_point/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/share_point/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/share_point/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/share_point/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/share_point/framework/crew-ai)

## TL;DR

Here's what you'll learn:
- How to set up your Composio API key and User ID
- How to create a Composio Tool Router session for Share point
- How to attach an MCP Server to a Pydantic AI agent
- How to stream responses and maintain chat history
- How to build a simple REPL-style chat interface to test your Share point workflows

## What is Pydantic AI?

Pydantic AI is a Python framework for building AI agents with strong typing and validation. It leverages Pydantic's data validation capabilities to create robust, type-safe AI applications.
Key features include:
- Type Safety: Built on Pydantic for automatic data validation
- MCP Support: Native support for Model Context Protocol servers
- Streaming: Built-in support for streaming responses
- Async First: Designed for async/await patterns

## What is the Share point MCP server, and what's possible with it?

The Share point MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your SharePoint account. It provides structured and secure access to your SharePoint sites, so your agent can create folders, manage lists, handle users, and organize your team's content with ease.
- Automated folder creation and organization: Instruct your agent to create new folders in SharePoint to keep your documents neatly organized by project, department, or workflow.
- List and item management: Let your agent create new SharePoint lists for tracking tasks, issues, or inventory, and add items to lists automatically as your needs evolve.
- User provisioning and access control: Quickly create new SharePoint users or remove existing ones, helping you manage team access and collaboration securely and efficiently.
- User lookup and verification: Have your agent search for users across Microsoft Graph and SharePoint to confirm their existence and check their status in your organization.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `SHARE_POINT_ADD_ATTACHMENT_TO_LIST_ITEM` | Add Attachment to List Item | Tool to add an attachment to a SharePoint list item. Use when you need to upload a binary file as an attachment to a specified list item. |
| `SHARE_POINT_ADD_FIELD_LINK_TO_CONTENT_TYPE` | Add Field Link to Content Type | Tool to add a field link to a list content type. Use when you want to associate an existing list field with a content type. |
| `SHARE_POINT_ADD_ROLE_ASSIGNMENT_TO_ITEM` | Add Role Assignment to List Item | Tool to add a role assignment to a list item. Use when granting specific permissions to a user or group after breaking inheritance if needed. This action is externally visible and permanently alters item permissions; obtain explicit human approval for the target item and `role_definition_id` before executing. |
| `SHARE_POINT_ADD_ROLE_ASSIGNMENT_TO_LIST` | Add Role Assignment to SharePoint List | Tool to add a role assignment to a SharePoint list. Requires the list to have broken role inheritance first via SHARE_POINT_BREAK_ROLE_INHERITANCE_ON_LIST; inheriting lists will reject unique role assignments. Use when granting permissions to a user or group on a specific list. |
| `SHARE_POINT_BREAK_ROLE_INHERITANCE_ON_ITEM` | Break Role Inheritance on List Item | Tool to break permission inheritance on a list item. Call this before adding new role assignments; adding assignments prior leaves the item still inheriting parent permissions, causing unexpected access behavior. Use when you need to uniquely set permissions on an item after copying or clearing parent assignments. |
| `SHARE_POINT_BREAK_ROLE_INHERITANCE_ON_LIST` | Break Role Inheritance on List | Breaks permission inheritance on a SharePoint list, allowing you to set unique permissions. When you break inheritance, you can choose to: - Copy parent permissions as a starting point (copy_role_assignments=true) - Start fresh with no inherited permissions (copy_role_assignments=false) - Clear unique permissions on child items to re-inherit from this list (clear_subscopes=true) Use this when you need to manage list-level permissions independently from the site. Must be called before SHARE_POINT_ADD_ROLE_ASSIGNMENT_TO_LIST, which fails on lists still inheriting from the parent site. |
| `SHARE_POINT_CHECK_IN_FILE` | Check In SharePoint File | Tool to check in a file. Use after uploading or editing a document and you're ready to finalize changes. |
| `SHARE_POINT_CREATE_CONTENT_TYPE` | Create Content Type | Tool to create a new content type in SharePoint. Use when you need to define a custom content type with specific metadata structure for lists or libraries. |
| `SHARE_POINT_CREATE_DRIVE_ITEM_SHARING_LINK` | Create Drive Item Sharing Link | Tool to create a sharing link for a drive item in SharePoint or OneDrive. Use when you need to generate a shareable link with specific permissions (view/edit/embed) and scope (anonymous/organization/users). The link can optionally include password protection and expiration date. |
| `SHARE_POINT_CREATE_LIST_FIELD` | Create SharePoint List Field | Tool to create a new field (column) in a SharePoint list. Use when you need to programmatically add a column after confirming the list GUID. |
| `SHARE_POINT_CREATE_LIST_ITEM_BY_ID` | Create SharePoint List Item by GUID | Tool to create a new item in a SharePoint list using the list's GUID. Use when you have the list GUID rather than the list title. |
| `SHARE_POINT_CREATE_LIST_ITEM_IN_FOLDER` | Create List Item in Folder | Tool to create a list item in a specific folder within a SharePoint list. IMPORTANT: This action works ONLY with SharePoint lists (not document libraries). The folder_url can be either a server-relative URL (e.g., '/Lists/MyList') or an absolute URL (e.g., 'https://site.sharepoint.com/sites/sitename/Lists/MyList'). To create files in document libraries, use a different action like upload_file. |
| `SHARE_POINT_CREATE_WEB` | Create SharePoint Subsite | Tool to create a new SharePoint subsite under the current site. Use when you need to create a new subsite with specific settings for permissions, language, and template. |
| `SHARE_POINT_DELETE_DRIVE_ITEM_VERSION_CONTENT` | Delete Drive Item Version Content | Tool to delete content for a specific version of a drive item in SharePoint. Use when you need to remove the binary content associated with a particular version of a file while keeping the version metadata. |
| `SHARE_POINT_DELETE_FOLDER` | Delete SharePoint Folder | Deletes a folder from a SharePoint document library. This action permanently removes the specified folder and moves it to the site's recycle bin. Use this when you need to remove folders that are no longer needed. The operation is idempotent - attempting to delete a non-existent folder will succeed without error. Requires the server-relative path of the folder (e.g., '/Shared Documents/FolderName'). |
| `SHARE_POINT_DELETE_LIST` | Delete SharePoint List | Tool to delete a SharePoint list. Use when you need to remove a list by its GUID after confirming the correct list identifier. |
| `SHARE_POINT_DELETE_LIST_BY_TITLE` | Delete SharePoint List By Title | Tool to delete a SharePoint list by its title. Use when you need to permanently remove a list and all its contents by specifying the list name. |
| `SHARE_POINT_DELETE_LIST_ITEM` | Delete SharePoint List Item | Tool to delete a SharePoint list item. Use when you need to permanently remove an item by its ID. Use after obtaining the item's ETag to ensure concurrency control. |
| `SHARE_POINT_DELETE_RECYCLE_BIN_ITEM_PERMANENT` | Delete Recycle Bin Item Permanently | Tool to permanently delete a SharePoint Recycle Bin item. Use after confirming the item's GUID to remove it irrevocably. |
| `SHARE_POINT_DOWNLOAD_FILE_BY_SERVER_RELATIVE_URL` | Download File by Server-relative URL | Tool to download a file by server-relative URL. Use when you need to fetch the raw bytes of a SharePoint file by its server-relative path. |
| `SHARE_POINT_ENSURE_USER` | Ensure SharePoint User | Ensures a user exists in a SharePoint site by their login name. If the user already exists, returns their info; if not, adds them to the site — this is a write operation with a provisioning side effect, not a read-only presence check. Use when you need to add a user or get their user ID for permissions. The login name must be in SharePoint claims format (e.g., 'i:0#.f\|membership\|user@domain.com'). This action only registers the user in the site collection and does not grant any permissions. To assign list-level access, pass the returned Id field as principal_id to SHARE_POINT_ADD_ROLE_ASSIGNMENT_TO_LIST. |
| `SHARE_POINT_FOLLOW` | Follow SharePoint Actor | Follow a SharePoint user, document, site, or tag. Use to make the authenticated user follow a specified actor. Supports following users (actor_type=0), documents (actor_type=1), sites (actor_type=2), or tags (actor_type=3). |
| `SHARE_POINT_GET_ALL_FOLDERS` | Get All SharePoint Folders | Tool to retrieve all folders in the SharePoint web. Use when you need to discover all available folders across the site. Supports OData query parameters for filtering, selecting specific fields, sorting, and pagination. |
| `SHARE_POINT_GET_CHANGES` | Get SharePoint List Changes | Tool to retrieve changes from SharePoint list change log. Use when processing webhook notifications to get actual changes that occurred. Set boolean flags in query (Add, Item, Update, etc.) to filter change types. Store the ChangeToken from the last change and use as ChangeTokenStart in subsequent calls to track only new changes. |
| `SHARE_POINT_GET_CONTENT_TYPE` | Get Content Type | Tool to retrieve a single SharePoint content type by its ID. Use when you need detailed information about a specific content type including its fields, forms, and metadata. |
| `SHARE_POINT_GET_CONTENT_TYPES` | Get Site Content Types | Retrieves all content types from the current SharePoint site. Use this action to discover available content types on a SharePoint site. Returns metadata for each content type including Id, Name, Description, Group, and other properties. Supports OData query parameters for filtering, selecting specific fields, sorting, and pagination. |
| `SHARE_POINT_GET_CONTENT_TYPES_FOR_LIST` | Get Content Types for List | Tool to retrieve all content types for a specific SharePoint list by GUID. Use when you need the content type IDs, names, and descriptions of every content type in a list. |
| `SHARE_POINT_GET_CONTEXT_INFO` | Get SharePoint Context Info | Tool to retrieve SharePoint context information including the form digest value. Use when you need a form digest token for write operations (POST, PUT, DELETE). |
| `SHARE_POINT_GET_CURRENT_USER` | Get Current SharePoint User | Tool to retrieve the current user for the site. Use after authenticating to get the current SharePoint user. A successful response confirms authentication only; access to specific sites, lists, or libraries depends on separate scopes and item-level permissions. |
| `SHARE_POINT_GET_DRIVE_ITEM_ANALYTICS` | Get Drive Item Analytics | Tool to get analytics for a SharePoint drive item. Use when you need to retrieve access statistics (view counts, unique viewers) for files or folders in SharePoint/OneDrive. |
| `SHARE_POINT_GET_GROUP_USERS` | Get Group Users | Retrieves all users who are members of a specified SharePoint group. This action returns user information including IDs, names, email addresses, login names, and permission details. Supports OData query parameters for filtering, sorting, field selection, and pagination. Use this when you need to audit group membership, check user permissions, or list members of a specific group. |
| `SHARE_POINT_GET_GROUP_USERS_BY_ID` | Get Group Users By ID | Tool to retrieve all users in a specific SharePoint site group by group ID. Use when you have the numeric group ID and need to list all members of that group, including their IDs, names, email addresses, and permission details. Supports OData query parameters for filtering, sorting, field selection, and pagination. |
| `SHARE_POINT_GET_ITEM_ATTACHMENT_CONTENT` | Download List Item Attachment | Tool to download an attachment from a SharePoint list item. Use when retrieving the binary contents of a specific attachment after confirming the list title, item ID, and filename. |
| `SHARE_POINT_GET_LIST_BY_GUID` | Get SharePoint List by GUID | Tool to retrieve a SharePoint list by its GUID. Use when you need to fetch list metadata by its unique identifier. Prefer over name-based lookup tools when the GUID is known, as names may collide across similarly named lists. |
| `SHARE_POINT_GET_LIST_BY_TITLE` | Get SharePoint List By Title | Tool to retrieve a SharePoint list by its title. Use when you need to fetch list metadata by title. |
| `SHARE_POINT_GET_LIST_CONTENT_TYPE_BY_ID` | Get Content Type by ID | Tool to retrieve a specific content type from a SharePoint list by its ID. Use when you need detailed information about a particular content type including its fields, schema, and metadata. |
| `SHARE_POINT_GET_LIST_ITEM_BY_ID` | Get List Item by ID | Tool to retrieve a SharePoint list item by ID. Use when you need to fetch a specific item after knowing its ID. |
| `SHARE_POINT_GET_LIST_ITEMS` | Get SharePoint List Items | Tool to retrieve items from a SharePoint list. Use when you need to fetch list entries with optional OData parameters. |
| `SHARE_POINT_GET_LIST_ITEMS_BY_GUID` | Get SharePoint List Items by GUID | Tool to retrieve items from a SharePoint list using its GUID. Use when you have the list's unique identifier and need to fetch list entries with optional OData parameters. |
| `SHARE_POINT_GET_LIST_ITEM_VERSION` | Get List Item Version | Tool to retrieve a specific version of a SharePoint list item. Use when you need to access historical versions of list items. |
| `SHARE_POINT_GET_MY_FOLLOWED` | Get Followed Entities | Tool to get entities the current user is following. Use when you need to retrieve followed users, documents, sites, or tags after authentication. |
| `SHARE_POINT_GET_MY_FOLLOWERS` | Get My Followers | Retrieves the list of users who are following the authenticated user in SharePoint. Returns an array of SocialActor objects containing follower details like name, email, account name, and personal site URI. No parameters required - automatically retrieves followers for the current authenticated user. |
| `SHARE_POINT_GET_ROLE_DEFINITIONS` | Get Role Definitions | Tool to list role definitions at the web level. Role definition IDs and names are scoped per web/site collection — never hard-code them, as admins can modify role sets and IDs differ across site collections. Always resolve current values dynamically via this tool. |
| `SHARE_POINT_GET_SITE_COLLECTION_INFO` | Get SharePoint Site Collection Info | Tool to fetch site collection metadata (URL, ID, root web URI) only—not list item or document-level details. Use before subsequent calls to resolve correct API names. Requires SharePoint connection with site-collection-level scopes; may fail even when user-level tools succeed. Verify site_id before use—an incorrect site_id can silently return data for an unrelated site. |
| `SHARE_POINT_GET_SITE_DRIVE_ITEM_BY_PATH` | Get Site Drive Item by Path | Tool to retrieve a file or folder by its server-relative path in a SharePoint site. Use when you need to get metadata for an item (file or folder) by path. |
| `SHARE_POINT_GET_SITE_PAGE_CONTENT` | Get SharePoint Site Page Content | Tool to retrieve modern SharePoint Site Pages content by reading list item fields. Use when a .aspx page result cannot be downloaded as a file or when you need the structured content (CanvasContent1, LayoutWebpartsContent) of modern pages. |
| `SHARE_POINT_GET_USER_EFFECTIVE_PERMISSIONS_ON_WEB` | Get User Effective Permissions on Web | Get a user's effective permissions on the current SharePoint site (Web). This action retrieves the combined permissions a user has on the site, taking into account direct permissions, group memberships, and permission inheritance. Use this when you need to verify what permissions a user or group has before performing operations. The response contains permission masks as 64-bit integers split into high and low 32-bit values. A value of "0" for both means no permissions. Returns site-level permissions only; list-level or item-level grants and restrictions are not reflected. |
| `SHARE_POINT_GET_WEBHOOK_SUBSCRIPTION` | Get SharePoint Webhook Subscription | Tool to retrieve a specific webhook subscription by ID from a SharePoint list. Use when you need to check subscription details like expiration date or notification URL. |
| `SHARE_POINT_GET_WEBHOOK_SUBSCRIPTIONS` | Get SharePoint Webhook Subscriptions | Tool to retrieve all webhook subscriptions on a SharePoint list. Use when you need to view existing webhook configurations for a list. |
| `SHARE_POINT_GET_WEB_INFO` | Get SharePoint Web Info | Tool to retrieve information about the current SharePoint web (site) using REST API. Use when you need web metadata such as title, URL, language, or template information. |
| `SHARE_POINT_IS_FOLLOWED` | Check Follow Status | Tool to check if the current user is following a specified actor. Use when verifying follow status before performing follow or unfollow operations. |
| `SHARE_POINT_LIST_ALL_LISTS` | List SharePoint Lists | Retrieves all lists in the current SharePoint web/site. Use this action to discover available lists and document libraries on a SharePoint site, or to pre-check for existing lists before creation (duplicate list names will fail). Returns metadata for each list including Title, Id, BaseType, ItemCount, and other properties. Supports OData query parameters for filtering, selecting specific fields, sorting, and pagination. |
| `SHARE_POINT_LIST_DRIVE_CHILDREN` | List Drive Children | Tool to list children (files and folders) in a SharePoint drive using REST API v2.0. Use when you need to enumerate items in a drive's root folder or a specific folder within the drive. |
| `SHARE_POINT_LIST_DRIVE_RECENT_ITEMS` | List Recently Modified Drive Items | Tool to list recently modified items in a SharePoint drive using Microsoft Graph API. Returns files and folders from the root folder sorted by modification time (most recent first). Note: This action uses the /root/children endpoint with $orderby=lastModifiedDateTime desc to retrieve recently modified items from the root folder. |
| `SHARE_POINT_LIST_DRIVES_REST_API` | List Drives via SharePoint REST API | Tool to retrieve drives using SharePoint REST API v2.0. Use when you need to list document libraries and drives from a SharePoint site using native SharePoint authentication (not Microsoft Graph). |
| `SHARE_POINT_LIST_FILES_IN_FOLDER` | List Files in Folder | Tool to list files within a SharePoint folder (non-recursive; does not enumerate subfolders). Use when you need to enumerate all files in a folder by its server-relative URL. To cover nested structures, call the tool separately for each subfolder. |
| `SHARE_POINT_LIST_ITEM_ATTACHMENTS` | List Item Attachments | Tool to list all attachments for a SharePoint list item. Use when you need to retrieve filenames and server-relative URLs of each attachment after confirming the list title and item ID. |
| `SHARE_POINT_LIST_LIST_COLUMNS` | List SharePoint List Columns | Tool to list all column definitions in a SharePoint list. Use when you need to retrieve field metadata including column names, types, and properties. |
| `SHARE_POINT_LIST_RECYCLE_BIN_ITEMS` | List Recycle Bin Items | Tool to list items in the SharePoint Recycle Bin. Use when you need to retrieve deleted items and page through results. |
| `SHARE_POINT_LIST_SITE_GROUPS` | List Site Groups | Tool to list SharePoint site groups for a site collection. Use when you need to see all groups and their settings before managing permissions. |
| `SHARE_POINT_LIST_SITES` | List SharePoint Sites | Tool to retrieve all SharePoint sites accessible to the user. Use when you need to discover available sites before performing site-specific operations. |
| `SHARE_POINT_LIST_SITE_USERS` | List Site Users | Tool to list users in the site collection. Results include person users, groups, and system principals by default; use filter 'PrincipalType eq 1' to restrict to individual users. |
| `SHARE_POINT_LIST_SUBFOLDERS_IN_FOLDER` | List Subfolders in Folder | Tool to list immediate child folders within a SharePoint folder. Use when you need folder navigation or directory discovery by server-relative URL. |
| `SHARE_POINT_LOG_EVENT` | Log SharePoint Event | Log custom usage analytics events in SharePoint for tracking user activities. Records usage events (views, edits, custom actions) to SharePoint's analytics system. Use this after performing actions to track usage patterns. The event will be logged to SharePoint's usage analytics database for reporting and analytics purposes. Common use cases: - Track document views or edits - Record custom user interactions - Log application-specific events for analytics Note: Obtain site/web GUIDs from GET /api/site or GET /api/web endpoints. Use consistent item_id, scope_id, and site GUIDs across related events for the same entity to ensure correct analytics grouping and correlation in reports. |
| `SHARE_POINT_RECYCLE_FILE` | Recycle SharePoint File | Tool to move a file to the Recycle Bin. Use when you need to recycle a file after confirming its folder and filename paths. |
| `SHARE_POINT_RECYCLE_LIST_ITEM` | Recycle SharePoint List Item | Tool to move a list item to the Recycle Bin. Use when you need to soft-delete an item but preserve the ability to restore it. |
| `SHARE_POINT_RENAME_FOLDER` | Rename SharePoint Folder | Renames a SharePoint folder by updating its list item metadata. To use this action: 1. First call GET_FOLDER_BY_SERVER_RELATIVE_URL with expand=ListItemAllFields to get the folder's metadata_type 2. Extract the '__metadata.type' value from the response's ListItemAllFields (e.g., 'SP.Data.Shared_x0020_DocumentsItem') 3. Call this action with the folder path, metadata_type, and new name The rename operation updates both the folder's display name (Title) and actual name (FileLeafRef). Note: This only changes the folder name, not its location in the hierarchy. |
| `SHARE_POINT_RENDER_LIST_DATA_AS_STREAM` | Render List Data As Stream | Retrieve list items from SharePoint with rich metadata and formatting. Returns items in the 'Row' array along with pagination info (FirstRow, LastRow, NextHref). Supports CAML queries via ViewXml for filtering and sorting. Use this when you need list data with properly formatted field values, lookup fields, or managed metadata - more capable than standard OData endpoints. |
| `SHARE_POINT_RESTORE_DRIVE_ITEM_VERSION` | Restore Drive Item Version | Tool to restore a previous version of a SharePoint drive item. Use when you need to revert a file to an earlier version. |
| `SHARE_POINT_RESTORE_RECYCLE_BIN_ITEM` | Restore Recycle Bin Item | Tool to restore a SharePoint Recycle Bin item. Use when you need to recover a deleted item by providing its GUID. |
| `SHARE_POINT_SEARCH_QUERY` | Search SharePoint Site | Search SharePoint content using Keyword Query Language (KQL). Returns documents, list items, folders, and other content matching your query. Supports filtering by properties (file type, author, date), pagination, and custom property selection. Results are nested under PrimaryQueryResult→RelevantResults→Table→Rows→Cells as Key/Value pairs requiring explicit extraction. Results are security-trimmed: inaccessible content never appears even if it exists. Use contentclass (e.g., STS_Site, STS_Web, STS_ListItem_DocumentLibrary) in querytext to isolate specific item types. |
| `SHARE_POINT_SEARCH_SUGGEST` | Search Suggest | Tool to get search query suggestions. Use when you need to provide autocomplete options for user search input. |
| `SHARE_POINT_SHAREPOINT_CHECK_OUT_FILE` | Check Out SharePoint File | Tool to check out a file in a document library. Use when you need to lock a file before making changes. |
| `SHARE_POINT_SHAREPOINT_CREATE_FOLDER` | Create SharePoint Folder | Creates a new folder in SharePoint using the REST API. Returns `server_relative_url`; use it for downstream operations instead of constructing paths manually. Does not configure sharing or permissions on the created folder. |
| `SHARE_POINT_SHAREPOINT_CREATE_LIST` | Create SharePoint List | Creates a new list in SharePoint using the REST API. Custom columns cannot be added at creation time; use SHARE_POINT_CREATE_LIST_FIELD with the returned `list_id` to add them afterward. Check `success` and `error` fields in the response to confirm creation. Returns a `list_id` used by downstream tools; note SHARE_POINT_SHAREPOINT_CREATE_LIST_ITEM targets lists by `list_name` (title). |
| `SHARE_POINT_SHAREPOINT_CREATE_LIST_ITEM` | Create SharePoint List Item | Creates a new item in a SharePoint list. Returns an `item_data` object containing `item_id`, `Title`, and timestamps on success. |
| `SHARE_POINT_SHAREPOINT_FIND_USER` | Find SharePoint User | Searches for a user in the SharePoint site by email address and returns their profile information if found. Response includes `exists_in_graph`, `exists_in_sharepoint`, and `error_details` fields; inspect all three together — `successful=true` can coexist with Graph errors in `error_details`. When the two backends diverge, treat `exists_in_sharepoint` as authoritative for access decisions. |
| `SHARE_POINT_SHAREPOINT_REMOVE_USER` | Remove SharePoint User | Removes a user from SharePoint. Returns success even if user doesn't exist or was never a member; check response fields `was_removed` (bool) and `message` (str) to distinguish an actual removal from a no-op. |
| `SHARE_POINT_UNDO_CHECKOUT_FILE` | Undo SharePoint File Checkout | Tool to undo a file checkout, discarding any changes made while checked out. Use when you need to cancel edits and unlock the file without saving. |
| `SHARE_POINT_UPDATE_CONTENT_TYPE` | Update SharePoint Content Type | Tool to update a SharePoint content type's properties such as name, description, group, or hidden status. Use when you need to modify content type metadata. |
| `SHARE_POINT_UPDATE_DRIVE_ITEM` | Update Drive Item | Tool to update the properties of a drive item (file or folder) in SharePoint using SharePoint REST API. Use when you need to rename files/folders or update their title property. |
| `SHARE_POINT_UPDATE_LIST` | Update SharePoint List | Tool to update properties of an existing SharePoint list. Use when you need to modify list metadata such as title, description, or settings like versioning and attachments. |
| `SHARE_POINT_UPDATE_LIST_ITEM` | Update SharePoint List Item | Tool to update fields on an existing SharePoint list item. Use when you need to modify an item's properties with proper ETag concurrency control via MERGE. |
| `SHARE_POINT_UPDATE_SITE` | Update SharePoint Site | Tool to update properties of the current SharePoint site (web). Use when you need to modify site title, description, or other SP.Web properties via MERGE. |
| `SHARE_POINT_UPLOAD_FILE` | Upload File to Folder | Tool to upload a file to a SharePoint document library or folder. Use when you need to programmatically add or update a file in a document library. |
| `SHARE_POINT_UPLOAD_FROM_URL` | Upload File from URL to SharePoint | Tool to fetch a file from a URL and upload it to SharePoint. Use when you need to upload files directly from external URLs without downloading them to the client first. When a file with the same name already exists, use conflict_behavior to control the behavior: - 'replace': Overwrites the existing file (fails with HTTP 423 if the file is locked/open) - 'fail': Returns an error if a file with that name exists - 'rename': Uploads with an auto-generated suffix (e.g., 'report 1.docx'), bypassing file locks |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

The Share point MCP server is an implementation of the Model Context Protocol that connects your AI agent to Share point. It provides structured and secure access so your agent can perform Share point operations on your behalf through a secure, permission-based interface.
With Composio's managed implementation, you don't have to create your own developer app. For production, if you're building an end product, we recommend using your own credentials. The managed server helps you prototype fast and go from 0-1 faster.

## Step-by-step Guide

### 1. Prerequisites

Before starting, make sure you have:
- Python 3.9 or higher
- A Composio account with an active API key
- Basic familiarity with Python and async programming

### 1. Getting API Keys for OpenAI and Composio

OpenAI API Key
- Go to the [OpenAI dashboard](https://platform.openai.com/settings/organization/api-keys) 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
- Log in to the [Composio dashboard](https://dashboard.composio.dev?utm_source=toolkits&utm_medium=framework_docs).
- Navigate to your API settings and generate a new API key.
- Store this key securely as you'll need it for authentication.

### 2. Install dependencies

Install the required libraries.
What's happening:
- composio connects your agent to external SaaS tools like Share point
- pydantic-ai lets you create structured AI agents with tool support
- python-dotenv loads your environment variables securely from a .env file
```bash
pip install composio pydantic-ai python-dotenv
```

### 3. Set up environment variables

Create a .env file in your project root.
What's happening:
- COMPOSIO_API_KEY authenticates your agent to Composio's API
- USER_ID associates your session with your account for secure tool access
- OPENAI_API_KEY to access OpenAI LLMs
```bash
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_user_id_here
OPENAI_API_KEY=your_openai_api_key
```

### 4. Import dependencies

What's happening:
- We load environment variables and import required modules
- Composio manages connections to Share point
- MCPServerStreamableHTTP connects to the Share point MCP server endpoint
- Agent from Pydantic AI lets you define and run the AI assistant
```python
import asyncio
import os
from dotenv import load_dotenv
from composio import Composio
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerStreamableHTTP

load_dotenv()
```

### 5. Create a Tool Router Session

What's happening:
- We're creating a Tool Router session that gives your agent access to Share point tools
- The create method takes the user ID and specifies which toolkits should be available
- The returned session.mcp.url is the MCP server URL that your agent will use
```python
async def main():
    api_key = os.getenv("COMPOSIO_API_KEY")
    user_id = os.getenv("USER_ID")
    if not api_key or not user_id:
        raise RuntimeError("Set COMPOSIO_API_KEY and USER_ID in your environment")

    # Create a Composio Tool Router session for Share point
    composio = Composio(api_key=api_key)
    session = composio.create(
        user_id=user_id,
        toolkits=["share_point"],
    )
    url = session.mcp.url
    if not url:
        raise ValueError("Composio session did not return an MCP URL")
```

### 6. Initialize the Pydantic AI Agent

What's happening:
- The MCP client connects to the Share point endpoint
- The agent uses GPT-5 to interpret user commands and perform Share point operations
- The instructions field defines the agent's role and behavior
```python
# Attach the MCP server to a Pydantic AI Agent
share_point_mcp = MCPServerStreamableHTTP(url, headers={"x-api-key": COMPOSIO_API_KEY})
agent = Agent(
    "openai:gpt-5",
    toolsets=[share_point_mcp],
    instructions=(
        "You are a Share point assistant. Use Share point tools to help users "
        "with their requests. Ask clarifying questions when needed."
    ),
)
```

### 7. Build the chat interface

What's happening:
- The agent reads input from the terminal and streams its response
- Share point API calls happen automatically under the hood
- The model keeps conversation history to maintain context across turns
```python
# Simple REPL with message history
history = []
print("Chat started! Type 'exit' or 'quit' to end.\n")
print("Try asking the agent to help you with Share point.\n")

while True:
    user_input = input("You: ").strip()
    if user_input.lower() in {"exit", "quit", "bye"}:
        print("\nGoodbye!")
        break
    if not user_input:
        continue

    print("\nAgent is thinking...\n", flush=True)

    async with agent.run_stream(user_input, message_history=history) as stream_result:
        collected_text = ""
        async for chunk in stream_result.stream_output():
            text_piece = None
            if isinstance(chunk, str):
                text_piece = chunk
            elif hasattr(chunk, "delta") and isinstance(chunk.delta, str):
                text_piece = chunk.delta
            elif hasattr(chunk, "text"):
                text_piece = chunk.text
            if text_piece:
                collected_text += text_piece
        result = stream_result

    print(f"Agent: {collected_text}\n")
    history = result.all_messages()
```

### 8. Run the application

What's happening:
- The asyncio loop launches the agent and keeps it running until you exit
```python
if __name__ == "__main__":
    asyncio.run(main())
```

## Complete Code

```python
import asyncio
import os
from dotenv import load_dotenv
from composio import Composio
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerStreamableHTTP

load_dotenv()

async def main():
    api_key = os.getenv("COMPOSIO_API_KEY")
    user_id = os.getenv("USER_ID")
    if not api_key or not user_id:
        raise RuntimeError("Set COMPOSIO_API_KEY and USER_ID in your environment")

    # Create a Composio Tool Router session for Share point
    composio = Composio(api_key=api_key)
    session = composio.create(
        user_id=user_id,
        toolkits=["share_point"],
    )
    url = session.mcp.url
    if not url:
        raise ValueError("Composio session did not return an MCP URL")

    # Attach the MCP server to a Pydantic AI Agent
    share_point_mcp = MCPServerStreamableHTTP(url, headers={"x-api-key": COMPOSIO_API_KEY})
    agent = Agent(
        "openai:gpt-5",
        toolsets=[share_point_mcp],
        instructions=(
            "You are a Share point assistant. Use Share point tools to help users "
            "with their requests. Ask clarifying questions when needed."
        ),
    )

    # Simple REPL with message history
    history = []
    print("Chat started! Type 'exit' or 'quit' to end.\n")
    print("Try asking the agent to help you with Share point.\n")

    while True:
        user_input = input("You: ").strip()
        if user_input.lower() in {"exit", "quit", "bye"}:
            print("\nGoodbye!")
            break
        if not user_input:
            continue

        print("\nAgent is thinking...\n", flush=True)

        async with agent.run_stream(user_input, message_history=history) as stream_result:
            collected_text = ""
            async for chunk in stream_result.stream_output():
                text_piece = None
                if isinstance(chunk, str):
                    text_piece = chunk
                elif hasattr(chunk, "delta") and isinstance(chunk.delta, str):
                    text_piece = chunk.delta
                elif hasattr(chunk, "text"):
                    text_piece = chunk.text
                if text_piece:
                    collected_text += text_piece
            result = stream_result

        print(f"Agent: {collected_text}\n")
        history = result.all_messages()

if __name__ == "__main__":
    asyncio.run(main())
```

## Conclusion

You've built a Pydantic AI agent that can interact with Share point through Composio's Tool Router. With this setup, your agent can perform real Share point actions through natural language.
You can extend this further by:
- Adding other toolkits like Gmail, HubSpot, or Salesforce
- Building a web-based chat interface around this agent
- Using multiple MCP endpoints to enable cross-app workflows (for example, Gmail + Share point for workflow automation)
This architecture makes your AI agent "agent-native", able to securely use APIs in a unified, composable way without custom integrations.

## How to build Share point MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/share_point/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/share_point/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/share_point/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/share_point/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/share_point/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/share_point/framework/codex)
- [Cursor](https://composio.dev/toolkits/share_point/framework/cursor)
- [VS Code](https://composio.dev/toolkits/share_point/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/share_point/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/share_point/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/share_point/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/share_point/framework/cli)
- [Google ADK](https://composio.dev/toolkits/share_point/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/share_point/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/share_point/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/share_point/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/share_point/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/share_point/framework/crew-ai)

## Related Toolkits

- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Outlook](https://composio.dev/toolkits/outlook) - Outlook is Microsoft's email and calendaring platform for unified communications and scheduling. It helps users stay organized with powerful email, contacts, and calendar management.
- [Slack](https://composio.dev/toolkits/slack) - Slack is a channel-based messaging platform for teams and organizations. It helps people collaborate in real time, share files, and connect all their tools in one place.
- [Gong](https://composio.dev/toolkits/gong) - Gong is a platform for video meetings, call recording, and team collaboration. It helps teams capture conversations, analyze calls, and turn insights into action.
- [Microsoft teams](https://composio.dev/toolkits/microsoft_teams) - Microsoft Teams is a collaboration platform that combines chat, meetings, and file sharing within Microsoft 365. It keeps distributed teams connected and productive through seamless virtual communication.
- [Slackbot](https://composio.dev/toolkits/slackbot) - Slackbot is a conversational automation tool for Slack that handles reminders, notifications, and automated responses. It boosts team productivity by streamlining onboarding, answering FAQs, and managing timely alerts—all right inside Slack.
- [2chat](https://composio.dev/toolkits/_2chat) - 2chat is an API platform for WhatsApp and multichannel text messaging. It streamlines chat automation, group management, and real-time messaging for developers.
- [Agent mail](https://composio.dev/toolkits/agent_mail) - Agent mail provides AI agents with dedicated email inboxes for sending, receiving, and managing emails. It empowers agents to communicate autonomously with people, services, and other agents—no human intervention needed.
- [Basecamp](https://composio.dev/toolkits/basecamp) - Basecamp is a project management and team collaboration tool by 37signals. It helps teams organize tasks, share files, and communicate efficiently in one place.
- [Chatwork](https://composio.dev/toolkits/chatwork) - Chatwork is a team communication platform with group chats, file sharing, and task management. It helps businesses boost collaboration and streamline productivity.
- [Clickmeeting](https://composio.dev/toolkits/clickmeeting) - ClickMeeting is a cloud-based platform for running online meetings and webinars. It helps businesses and individuals host, manage, and engage virtual audiences with ease.
- [Confluence](https://composio.dev/toolkits/confluence) - Confluence is Atlassian's team collaboration and knowledge management platform. It helps your team organize, share, and update documents and project content in one secure workspace.
- [Dailybot](https://composio.dev/toolkits/dailybot) - DailyBot streamlines team collaboration with chat-based standups, reminders, and polls. It keeps work flowing smoothly in your favorite messaging platforms.
- [Dialmycalls](https://composio.dev/toolkits/dialmycalls) - Dialmycalls is a mass notification service for sending voice and text messages to contacts. It helps teams and organizations quickly broadcast urgent alerts and updates.
- [Dialpad](https://composio.dev/toolkits/dialpad) - Dialpad is a cloud-based business phone and contact center system for teams. It unifies voice, video, messaging, and meetings across your devices.
- [Discord](https://composio.dev/toolkits/discord) - Discord is a real-time messaging and VoIP platform for communities and teams. It lets users chat, share media, and collaborate across public and private channels.
- [Discordbot](https://composio.dev/toolkits/discordbot) - Discordbot is an automation tool for Discord servers that handles moderation, messaging, and user engagement. It helps communities run smoothly by automating routine and complex tasks.
- [Echtpost](https://composio.dev/toolkits/echtpost) - Echtpost is a secure digital communication platform for encrypted document and message exchange. It ensures confidential data stays private and protected during transmission.
- [Egnyte](https://composio.dev/toolkits/egnyte) - Egnyte is a cloud-based platform for secure file sharing, storage, and governance. It helps teams collaborate efficiently while maintaining data compliance and security.
- [Google Meet](https://composio.dev/toolkits/googlemeet) - Google Meet is a secure video conferencing platform for virtual meetings, chat, and screen sharing. It helps teams connect, collaborate, and communicate seamlessly from anywhere.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Share point MCP?

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

### Can I use Tool Router MCP with Pydantic AI?

Yes, you can. Pydantic AI 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 Share point tools.

### Can I manage the permissions and scopes for Share point while using Tool Router?

Yes, absolutely. You can configure which Share point 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 Share point data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
