Skip to main content

A lightweight agentic AI framework with MCP tool serving

Project description

Agentic AI MCP

Lightweight agentic AI with MCP tools. Supports distributed setups where tools run on one machine and agents on another.

Install

pip install agentic-ai-mcp

Setup

Set your Anthropic API key in .env file (only needed on the client/agent machine):

ANTHROPIC_API_KEY=sk-...

Quick Start

See the example notebooks:

Usage

Server Mode (expose tools)

Run this on the machine where you want to host tools:

from agentic_ai_mcp import AgenticAI

def add(a: int, b: int) -> int:
    """Add two numbers."""
    return a + b

def greet(name: str, times: int = 1) -> str:
    """Greet someone."""
    return ("Hello, " + name + "! ") * times

# Create and register tools
ai = AgenticAI(host="0.0.0.0", port=8888)
ai.register_tool(add)
ai.register_tool(greet)

# Start server
ai.run_mcp_server()

# Stop when done
ai.stop_mcp_server()

Client Mode (run agents)

Run this on another machine to connect to the server and execute agents:

from agentic_ai_mcp import AgenticAI

# Connect to remote MCP server
ai = AgenticAI(mcp_url="http://<server-ip>:8888/mcp")

# Simple agent workflow
result = await ai.run("Calculate 2+3 and greet Tom the result times")
print(result)

# Planning-based workflow for complex tasks
result = await ai.run_with_planning("First calculate ((1+2)+(1+1)+3), then greet Alice that many times")
print(result)

Methods

Method Description
ai.register_tool(func) Register a function as an MCP tool
ai.run_mcp_server() Start MCP server in background
ai.stop_mcp_server() Stop the MCP server
ai.run(prompt) Simple agent workflow
ai.run_with_planning(prompt) Complex agent workflow

License

MIT

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

agentic_ai_mcp-0.5.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

agentic_ai_mcp-0.5.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file agentic_ai_mcp-0.5.0.tar.gz.

File metadata

  • Download URL: agentic_ai_mcp-0.5.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentic_ai_mcp-0.5.0.tar.gz
Algorithm Hash digest
SHA256 c2f9c4a108cbc953afc5b22a30c528b41fa6a2ae8e9f99ae840c4f6693d9b096
MD5 30d2683ff3f51a57a44aba3f32a89d23
BLAKE2b-256 b7eed28306f807b144771de5015630f77cb8fed803c5c710e69552af9c77f639

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_ai_mcp-0.5.0.tar.gz:

Publisher: cd.yml on hasanjawad001/agentic-ai-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentic_ai_mcp-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: agentic_ai_mcp-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentic_ai_mcp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 360682458b6dcca84f110791b20b146e160b09d5224f52be203263f3bf91dcdb
MD5 0e5ea15abc55c06af737765387afc49c
BLAKE2b-256 2a29eebab56f902bb907546145d2d91874eb03d415d83e3687ba7e53454f8661

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_ai_mcp-0.5.0-py3-none-any.whl:

Publisher: cd.yml on hasanjawad001/agentic-ai-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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