mcpField
P
Pydantic AI and Box MCP

Pydantic AI and Box MCP

github.com/box-communityFrameworks & SDKs0Updated 84w ago

About Pydantic AI and Box MCP

A demo project showing how to augment Pydantic AI agents with the Box MCP server, enabling agents to access content in Box for policy analysis.

Key features

  1. 01Pydantic AI Agent integration
  2. 02Box MCP server connection
  3. 03Secure content access
  4. 04Policy document analysis
  5. 05Local MCP server support

Use cases

  1. 01Analyze organizational policy documents
  2. 02Extract and analyze files from Box
  3. 03Query policies through agents
  4. 04Demonstrate MCP and agent integration

MCP support

The project demonstrates how a Pydantic AI agent connects via stdio MCP to a Box MCP server, accessing and analyzing content stored in Box.

Details

From the project README

Pydantic AI and Box MCP

This project is a demo showing how to use the Box MCP server to augment Pydantic AI agents with secure content in Box.

To run this, you will need a local copy of our MCP server. Follow the instructions there to set up your Box platform app, register it with your Box instance, and configure the server.

The only thing you'll need to do in this project is update the following code to point to your local directory:

        async with MCPServerStdio(
            command='uv',
            args=[
                '--directory',
                '/Users/shurrey/local/mcp-server-box',
                'run',
                'src/mcp_server_box.py'
            ]
        ) as local_server:

Once you have those steps done, navigate to this project at the commandline and set up your virtual environment:

uv venv

Then install the prerequisites libraries.

uv pip install -r pyproject.toml

Now you can run the demo.

uv run policy_analyzer.py 

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.