Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Foundry IQ, MCP, and the OpenAI Agents SDK solve different problems: Foundry IQ organizes and retrieves knowledge, MCP exposes tools and context through a standard interface, and the Agents SDK runs an agent workflow. They can work together, but none is a substitute for the others. You need Azure AI Search for a Foundry IQ knowledge base; Foundry Agent Service is one integration option, not a requirement.

What is Foundry IQ?

Foundry IQ is Microsoft’s Azure AI Search agentic-retrieval capability. Its central object is a knowledge base: a top-level configuration that groups one or more knowledge sources and specifies how retrieval should work. A knowledge base can define source selection, retrieval instructions, reasoning effort, output mode, and answer instructions.

Agentic retrieval can plan queries across sources, retrieve and rerank results, and—when configured—synthesize an answer with source references. Query planning may use a language model. Microsoft’s Foundry IQ FAQ describes minimal reasoning effort as able to merge results from multiple queries without an LLM planner; low and medium reasoning effort use LLM planning for more thorough retrieval. The FAQ lists GPT-4o, GPT-4.1, and GPT-5 series models from Azure OpenAI in Foundry Models as supported query-planning model families. Check the current documentation for supported deployments and regions before choosing a model.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The knowledge base is the retrieval layer, not the agent runtime. It provides a configured way to find and return information; an application or agent decides when to invoke it and what to do with the result.

How do Foundry IQ, MCP, and the Agents SDK fit together?

Layer Responsibility What it does not replace
Foundry IQ knowledge base Groups knowledge sources and configures retrieval behavior. An agent’s turn loop, tool dispatch, or application workflow.
MCP Standardizes how an application or model connects to tools and context exposed by an MCP server. The underlying search system, authorization policy, or agent runtime.
OpenAI Agents SDK Provides a Python-first runtime for agents, tools, handoffs, guardrails, sessions, human-in-the-loop support, and tracing. The knowledge sources or MCP server it calls.

A useful mental model is: the knowledge base knows how to retrieve; an MCP server makes an operation available through a standard interface; the agent runtime decides how that operation fits into a conversation or workflow. MCP is an open protocol, not a knowledge store or a hosted agent service.

How do I connect a Foundry IQ knowledge base to an agent with MCP?

Microsoft’s documented Foundry Agent Service path connects the Azure AI Search knowledge base as an MCP tool. The knowledge base exposes the tool named knowledge_base_retrieve. Foundry Agent Service uses a RemoteTool project connection for this integration.

  1. Set up the retrieval layer. Create an Azure AI Search knowledge base and configure its knowledge sources and retrieval behavior. The knowledge base requires Azure AI Search.
  2. Register the MCP endpoint. In the documented Foundry Agent Service integration, register the knowledge-base MCP endpoint as a RemoteTool project connection.
  3. Make the retrieval tool available to the agent. Use the connection so the agent can call knowledge_base_retrieve when it needs information from the knowledge base.
  4. Test the complete path. Check that the agent invokes retrieval appropriately, that returned material is useful for the task, and that the identity used in testing sees only the documents it is allowed to access.

The Microsoft connection guide marks the RemoteTool connection as preview and also identifies query planning and answer synthesis as preview. Preview features can change and are not covered by an SLA, so confirm their current status and production terms before relying on this particular integration in a production design.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I use Foundry IQ without Foundry Agent Service?

Yes. Foundry Agent Service is a convenient integration path, not a prerequisite for using a knowledge base. Microsoft’s Foundry IQ FAQ says supported Azure AI Search knowledge-base APIs can also be called from Microsoft Agent Framework or a custom application.

This leaves the orchestration choice with your application. You can call the supported knowledge-base APIs from another agent framework or your own code, or expose retrieval through an MCP connection if that fits your architecture. Verify the current API surface and supported configuration in Microsoft’s documentation before implementing a non-Foundry integration; the service and preview details may change.

Should I use the OpenAI Agents SDK or call the Responses API directly?

The Agents SDK is a higher-level runtime that uses the Responses API by default for OpenAI models. Choose it when its managed workflow features reduce code your application would otherwise have to own. Call the Responses API directly when you want to implement and control the tool loop and state handling yourself.

Choose When it fits What your application owns
OpenAI Agents SDK You want the SDK’s agent runtime, managed turns and tool execution, and features such as handoffs, guardrails, sessions, or human-in-the-loop support. Application-specific workflow and configuration, alongside the SDK’s runtime.
Responses API directly You want to own the interaction loop rather than use the Agents SDK runtime. Tool dispatch, state handling, and the turn-loop behavior your application needs.

This is a choice about workflow ownership, not a choice between two different knowledge systems. Either approach still needs a way to reach the retrieval capability and a deliberate plan for identity, permissions, and tool execution.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which MCP connection should the Agents SDK use?

The Agents SDK documents hosted MCP, Streamable HTTP, SSE, and stdio connections. The important distinction is where the MCP round-trip happens and who owns the connection—not simply which transport name appears in a configuration.

Option Where the connection or call runs Best fit and key consideration
Hosted MCP (HostedMCPTool) The Responses API performs the remote MCP round-trip. Use when the MCP server is reachable as required and the selected OpenAI model supports hosted MCP in the Responses API. Local server-object behavior should not be assumed to govern this remote execution.
Streamable HTTP (MCPServerStreamableHttp) The application manages a connection to a local or remote server. Useful when the application controls the server or wants execution within its own infrastructure.
SSE (MCPServerSse) The application connects to a server using HTTP with Server-Sent Events. Use when the server offers this transport and it fits the application’s network and connection requirements.
stdio (MCPServerStdio) The application starts a local process and communicates over standard input and output. Useful for a local MCP server process; the application must be able to start and manage that process.

Before choosing, check server reachability, transport compatibility, credential ownership, observability, whether the application needs to filter tools or inspect results locally, and how approvals should work. The SDK can filter tools statically or dynamically, require approval globally or per tool, and convert MCP text and image content into tool outputs. For SDK-managed local connections, evaluate filtering, approval policy, error handling, caching, tracing, and output conversion together rather than treating transport selection as the whole integration design.

The SDK documentation specifies the Python dependency range mcp>=1.19.0,<3 and describes support for both major versions. Pin compatible dependencies. If customizing HTTP behavior, use the HTTP stack for the installed MCP package’s major version, and recheck SDK release notes when upgrading.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What should I decide about security and permissions?

Tool access is an authorization boundary. An MCP server may expose sensitive actions, and model-facing tool descriptions do not replace server-side controls. OpenAI’s MCP guidance says to connect only to trusted servers, use least-privilege credentials, keep access tokens in authorization fields or headers rather than URLs, and require approval for sensitive operations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Limit exposure: Filter the tools the model can see, statically or dynamically, to the operations the workflow needs.
  • Gate consequential actions: Configure approval globally or per tool where appropriate. Treat approval as an additional control, not a replacement for server-side authorization and monitoring.
  • Protect credentials: Keep tokens out of URLs and use least-privilege credentials appropriate to the operation.
  • Validate retrieval permissions: Foundry IQ user-level access controls are enforced only when a knowledge source supports document-level permissions and those permissions have been explicitly configured for synchronization. Do not assume that source-system permissions automatically carry over.
  • Test both sides of access: Exercise retrieval with identities and documents that should be allowed and denied, and verify the results rather than relying on configuration alone.

Also account for execution location. With hosted MCP, the Responses API performs the remote round-trip; do not assume guardrail behavior associated with a locally managed SDK server connection will apply to that hosted path. Set authorization and monitoring at the server and application boundaries that actually handle the call.

How should an engineer choose the architecture?

  1. Start with retrieval needs. If your knowledge is organized in an Azure AI Search knowledge base, configure source selection and retrieval behavior there. Decide whether query planning or answer synthesis is needed, and confirm the relevant feature and model availability for your deployment.
  2. Choose the orchestration owner. Use Foundry Agent Service for its documented integration path, or call supported knowledge-base APIs from another framework or a custom application. Account for preview status when assessing production support.
  3. Choose the workflow runtime. Use the Agents SDK when its runtime features are useful; use the Responses API directly when your application should own the loop and state.
  4. Choose the MCP execution path, if using MCP. Match hosted MCP, Streamable HTTP, SSE, or stdio to network reachability, server control, credential ownership, and the need for local inspection or filtering.
  5. Set access controls before broadening tool access. Define server-side authorization, least-privilege credentials, tool filters, approval requirements, monitoring, and retrieval permission synchronization; then test allowed and denied cases.
  6. Revalidate volatile dependencies. Check current Microsoft and OpenAI documentation for preview status, APIs, supported model deployments and regions, and SDK dependency compatibility before deployment or upgrades.

The official documentation reviewed for these service and SDK details was checked on October 7, 2026. Implementation details can change, particularly for preview integrations, so use the current official documentation when making deployment decisions.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.