In short.
This Pydantic AI Harness guide shows Python developers how to give Pydantic AI agents access to Ordinal, a social media service, so they can draft, schedule and analyze posts; access requires an Ordinal Pro plan or higher and OAuth authentication, with application-managed credentials for multi-user deployments. It documents installation, workspace discovery, account selection, tool approval and connection customization. The examples provide implementation guidance, while runtime reliability, publishing behavior and total costs remain untested or unknown.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete documentation page at [https://pydantic.dev/docs/ai/harness/ordinal/index.md], including its installation examples, API reference, 0.x version warning and legacy-server notice. The captured source revision is sha256:52c87a0cb7a75182a2eefecdc26cb8989382c0fff50534d6953cb0b3ae040c69. Linked pages, repository files and live services are excluded. No installation, OAuth flow, tool call, publishing operation or other example was executed.
The overview
Identity
The resource is the Ordinal integration documentation for Pydantic AI Harness at [https://pydantic.dev/docs/ai/harness/ordinal/index.md]. It explains the Ordinal Python capability, which connects a Pydantic AI agent to Ordinal's hosted Model Context Protocol server. MCP exposes remote service operations as tools an agent can call.
The page combines a setup guide, credential patterns, configuration examples and an API reference. It links to an implementation directory at [https://github.com/pydantic/pydantic-ai/tree/main/src/pydantic_ai_harness/pydantic_ai_harness/ordinal/], whose contents were not assessed.
Assessment
The guide is useful for developers already using Pydantic AI who want agents to work with an Ordinal account. It addresses practical integration decisions: choosing credentials for each run, discovering workspaces, preserving tool names and inserting approval requests.
Its main implementation burden is multi-user authentication. The application must obtain, store and refresh users' OAuth tokens. The page documents connection patterns but supplies no benchmark, uptime evidence or demonstrated publishing result.
Users
The examples suit Python developers building a personal automation script or an application in which each user connects an Ordinal account. Beginners receive installation and connection examples, but need familiarity with Python packages, environment variables and OAuth.
Experienced developers get guidance for asynchronous credential functions, dependency-based account selection, durable execution, custom MCP transports and multiple Ordinal connections within one agent.
Capabilities
The documented integration lets an agent draft, schedule and analyze social posts in the authenticated user's Ordinal workspaces. The page says the agent can reach every workspace the user belongs to. Other Ordinal tools require a workspaceSlug obtained through ordinal_get_workspace_context.
Developers can filter exposed tools and require approval for calls by wrapping the toolset, and can cap tool output size with the separate Tool Output Limits feature. The page does not enumerate every server tool, supported social network, analytics measure or publishing restriction.
Using it
Requirements
Ordinal MCP access requires the Pro plan or higher, an Ordinal account and access to at least one workspace. Authentication uses an OAuth access token rather than a copied API key. The server supports authorization-server discovery and dynamic client registration for MCP OAuth clients.
The installation example uses pydantic-ai-harness[ordinal] and pydantic-ai-slim[openai]. The latter supplies the example's model provider; another provider needs its corresponding extra. Minimum Python versions and exact compatible package versions are not stated. Loading YAML agent definitions additionally needs pydantic-ai-slim[spec].
Mechanism
Ordinal connects to the hosted server at [https://app.tryordinal.com/mcp] using an OAuth token. Server tool names already begin with ordinal_, so the capability adds no prefix by default. An optional tool_prefix adds another prefix; toolset wrappers operate on the resulting names visible to the agent.
A fixed auth token applies to every run. When auth is unset, None or an empty string, the capability uses ORDINAL_ACCESS_TOKEN; if that variable is also unset, creating the agent raises an error. A synchronous or asynchronous auth function instead supplies credentials for each run and never falls back to that environment variable. If the function returns None or an empty string, that run receives no Ordinal tools. Server instructions are included by default and can be disabled with include_instructions=False.
Setup
The documented pip command is pip install "pydantic-ai-harness[ordinal]" "pydantic-ai-slim[openai]". After installation, supply an OAuth token through ORDINAL_ACCESS_TOKEN or auth. For use on your own machine, auth='oauth' starts browser-based sign-in.
For a multi-user application, implement the OAuth connection flow and token storage and refresh. Supply each user's token through run dependencies or an asynchronous auth function. The guide recommends dependency-based credentials for durable execution because execution may move to another process.
Begin by listing workspaces and obtaining a workspaceSlug. The page warns against combining the current server with the old endpoint at [https://app.tryordinal.com/api/mcp], because duplicate tool names can confuse the agent.
Example
The basic example imports Agent and Ordinal, constructs Agent('openai:gpt-6.1-sol', capabilities=[Ordinal()]), and calls agent.run_sync('List my Ordinal workspaces'). Its purpose is to establish workspace discovery before requesting operations that require a workspaceSlug. No actual output or successful connection was observed.
A second example obtains capability.get_toolset().approval_required() and sets output_type=[str, DeferredToolRequests]. This requests approval before every tool call, including publishing or scheduling operations. The application must handle the resulting requests through the deferred-tools workflow; that handling is referenced rather than demonstrated on this page.
Assessment & evidence
Limitations
Pydantic AI Harness is described as being on 0.x releases, when APIs may change between minor versions. The page promises deprecation warnings and release-note migration guidance, but does not identify an exact package version for these examples.
A supplied custom client owns its URL and authentication, cannot be combined with auth and represents one connection shared across runs. Multiple independent Ordinal instances need distinct ids and tool prefixes. Instances sharing an id are combined when they agree and raise an error when they differ.
Rate limits, token-expiry recovery, retry behavior, scheduling guarantees and analytics accuracy are not established. Installation, authentication, concurrency and publishing behavior were not tested.
Reasoning
The strongest reason to use this guide is its coverage of account handling alongside tool access. A personal script can use one token, while a shared application can obtain credentials separately for each run. That distinction directly affects which Ordinal account an agent acts through.
Approval is an explicit integration step: the example wraps every tool call and requires application handling. The page does not demonstrate a selective rule that pauses only publishing and scheduling calls. Developers needing that behavior must determine the relevant tool names and configure an appropriate wrapper.
Alternatives
The page mentions Ordinal's REST API as another access route with the same minimum subscription plan. It supplies no functional or reliability comparison, so equivalence with the MCP tools is unknown.
Within the documented integration, a custom FastMCP client or transport offers connection control, including proxies or MCP handlers. YAML or JSON agent definitions provide another configuration route. Competing social publishing services and other agent frameworks are not compared.
Evidence
The sole source is the complete documentation page at [https://pydantic.dev/docs/ai/harness/ordinal/index.md]. It contains installation commands, Python and YAML examples, authentication behavior and an API reference.
The linked repository, version policy, OAuth-related references, deferred-tools guide and output-limit documentation were not assessed. The source supports descriptions of documented behavior, but no commands or examples were executed and no live service behavior was verified.
Access & freshness
Costs
The only stated commercial requirement is an Ordinal Pro subscription or higher, matching the minimum plan for its REST API. Subscription prices, billing terms, quotas and possible usage charges are unknown from this page.
The examples also require a model provider. Provider pricing, model usage and the total operating cost are not established, so no cost estimate is supported.
Rights
The page links to source code but does not state a license for the documentation or implementation. Redistribution rights cannot be established from this page alone.
Ordinal's service terms, rights to generated posts, data-retention terms and privacy commitments are not supplied. OAuth authentication identifies the connected account; it does not establish those contractual rights or policies.
Freshness
The documentation snapshot was captured on 2026-11-15 at 11:43:42.439 UTC. No publication date, last-update date or exact release version is supplied, so the capture time does not establish when the instructions were written.
Most examples use openai:gpt-6.1-sol, while the API-reference example uses openai:gpt-5.6-sol. These are example identifiers rather than verified model availability. The 0.x API warning and legacy-endpoint notice make package compatibility and current connection instructions worth confirming before implementation.
Actions
Confirm the Ordinal plan requirement and choose a model provider before installing the documented extras. For a personal script, choose environment-token authentication or local browser sign-in. For a shared application, implement OAuth token storage and refresh and pass credentials separately for each run.
Start with workspace discovery, then configure the tools the application needs. Add and handle approval requests before enabling publishing or scheduling. In a controlled workspace, verify account selection, credential failures and approval behavior before relying on the integration. These are suggested implementation checks; none was performed for this report.
