What Codex can do with Sharepoint
Ask your agent in plain language. Each of these maps to a real tool on the server.
- Ask Codex to use the manage permissions tool in Sharepoint
- Ask Codex to search items in Sharepoint
- Ask Codex to use the get drives tool in Sharepoint
- Ask Codex to use the manage list items tool in Sharepoint
- Ask Codex to use the get content types tool in Sharepoint
Add the Sharepoint MCP server to Codex
Run these once. Afterwards, everyone you give access to signs in the same way.
1. Enable Sharepoint in Metorial
In your Metorial portal, enable the Sharepoint MCP server and sign in with the account that owns the data. Access stays governed by your team policies.
2. Add the server and sign in
The Codex CLI, IDE extension and ChatGPT desktop app share this config.
codex mcp add metorial --url <your-magic-mcp-url>codex mcp login metorial3. Check the connection
Type /mcp in Codex to see Metorial and its Sharepoint tools.
Give your team Sharepoint in Codex
Once Sharepoint is enabled in Metorial, teammates sign in with SSO and get the same connection in Codex, with only the tools their role allows.
One link covers every app you approve. See how the MCP gateway handles access, roles and audit logs for the whole company.
Sharepoint tools available in Codex
Full descriptions and inputs are on the Sharepoint MCP server page.
- Get Site: Retrieve detailed information about a SharePoint site.
- Manage List: Create, read, update, or delete SharePoint lists within a site.
- Manage Columns: List, create, update, or delete column definitions (fields) on a SharePoint list.
- Manage File: Upload, download, move, copy, rename, or delete files and folders in a SharePoint document library.
- Search Drive: Search for files and folders within a specific SharePoint document library (drive).
- Get File Versions: Retrieve the version history of a file in a SharePoint document library.
- List Sites: Search for SharePoint sites by keyword, or list subsites of a given site.
- Manage Permissions: View, grant, and revoke permissions on SharePoint files and folders.
- Search: Search across SharePoint content using the Microsoft Search API.
- Get Drives: Retrieve document libraries (drives) for a SharePoint site.
- Manage List Items: Full CRUD operations on SharePoint list items.
- Get Content Types: Retrieve content types and site columns for a SharePoint site.
- Get Site User: Resolve a user email or UPN to the numeric SharePoint site-scoped user ID required for Person/Group list column LookupId fields.
Using Sharepoint tools in Codex
What to expect once Sharepoint is connected.
- Limit which Sharepoint tools Codex sees with enabled_tools and disabled_tools on the metorial server in config.toml.
- Set default_tools_approval_mode to auto, prompt, writes or approve. writes prompts only for tools that are not marked read-only.
- Type /mcp in the composer to see the connected servers.
- Override the approval behavior for a single Sharepoint tool with tools.<tool>.approval_mode.
Troubleshooting Codex
- Metorial is listed but tools are missing
- Codex can connect without credentials and then see nothing. Run codex mcp login metorial to complete the OAuth sign-in.
- Metorial times out at startup
- Codex waits 10 seconds by default. Raise startup_timeout_sec under [mcp_servers.metorial] in ~/.codex/config.toml.
- Long tool calls fail after a minute
- The default tool timeout is 60 seconds. Raise tool_timeout_sec for the metorial server in config.toml.
Based on the Codex MCP documentation.
Frequently asked questions
Common questions about connecting Sharepoint to AI agents with Metorial.
GitHub
Confluence