Skip to main content

A python framework to build MCP servers

Project description

AgentR

AgentR is a Python framework for building MCP servers to serve agentic applications and LLM clients. It provides a clean abstraction for incorporating various API services as "applications" into your agent workflow.

🌟 Features

  • MCP (Model Context Protocol) Integration: Seamlessly works with MCP server architecture
  • Simplified API Integration: Connect to services like GitHub, Google Calendar, Gmail, Reddit, Tavily, and more with minimal code
  • Managed Authentication: Built-in support for API keys and OAuth-based authentication flows
  • Extensible Architecture: Easily build and add new app integrations with minimal boilerplate
  • Credential Management: Flexible storage options for API credentials with memory and environment-based implementations

🔧 Installation

Install AgentR using pip:

pip install agentr

🚀 Quick Start

1. Get an API Key

Before using AgentR with services that require authorization (like GitHub, Gmail, etc.), you'll need an AgentR API key:

Visit https://agentr.dev to create an account Generate an API key from your dashboard Set it as an environment variable or include it directly in your code:

export AGENTR_API_KEY="your_api_key_here"

2. Create a basic server

from agentr.server import TestServer

# Define your applications list
apps_list = [
    {
        "name": "tavily",
        "integration": {
            "name": "tavily_api_key",
            "type": "api_key",
            "store": {
                "type": "environment",
            }
        },        
    },
    {
        "name": "zenquotes",
        "integration": None
    },
    {
        "name": "github",
        "integration": {
            "name": "github",
            "type": "agentr",
        }
    }
]

# Create a server with these applications
server = TestServer(name="My Agent Server", description="A server for my agent apps", apps_list=apps_list)

# Run the server
if __name__ == "__main__":
    server.run()

🧩 Available Applications

AgentR comes with several pre-built applications:

Application Description Authentication Type
GitHub Star repositories and more OAuth (AgentR)
Google Calendar Retrieve calendar events OAuth (AgentR)
Gmail Send emails OAuth (AgentR)
Reddit Access Reddit data OAuth (AgentR)
Resend Send emails via Resend API API Key
Tavily Web search capabilities API Key
ZenQuotes Get inspirational quotes None

Note: More applications are coming soon! Stay tuned for updates to our application catalog.

🔐 Integration Types

AgentR supports two primary integration types:

1. API Key Integration

For services that authenticate via API keys:

{
    "name": "service_name",
    "integration": {
        "name": "service_api_key",
        "type": "api_key",
        "store": {
            "type": "environment",  # or "memory"
        }
    }
}

2. OAuth Integration (via AgentR)

For services requiring OAuth flow:

{
    "name": "service_name",
    "integration": {
        "name": "service_name",
        "type": "agentr"
    }
}

When using OAuth integrations, users will be directed to authenticate with the service provider through a secure flow managed by AgentR.

🤖 CLI Usage

AgentR includes a command-line interface for common operations:

# Get version information
agentr version

# Generate API client from OpenAPI schema
agentr generate --schema path/to/openapi.yaml

# Run the test server
agentr run

# Install AgentR for specific applications
agentr install claude

📋 Requirements

  • Python 3.11+
  • Dependencies (automatically installed):
    • loguru >= 0.7.3
    • mcp >= 1.5.0
    • pyyaml >= 6.0.2
    • typer >= 0.15.2

📝 License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentr-0.1.6.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentr-0.1.6-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file agentr-0.1.6.tar.gz.

File metadata

  • Download URL: agentr-0.1.6.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for agentr-0.1.6.tar.gz
Algorithm Hash digest
SHA256 90ff2fd4c93269eb53e5f43411b3271c514f44853e8fef3d64af9f6674d6a7a8
MD5 810984bb78a6593b96e74209992e657a
BLAKE2b-256 9fad7434d608bf5eca0d308f2534ffe3f115db5c5bd77c4824382ff4d55fc73b

See more details on using hashes here.

File details

Details for the file agentr-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: agentr-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for agentr-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 444a3c757b1c830fce85e0d57441ff613e67652e39c5e2cdbd6173700ddc763d
MD5 dea6545a7cff82b0fa86a8890349b5c1
BLAKE2b-256 75214ef2fb29f2ceb30baeda226785039d664c3e62bb15b4077502a4cc99ce31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page