AI Agent with MCP Tools

v1.0.0Coding Agentsstable

AI Agent with MCP Tools and RBAC

ai-agent-with-mcp-toolsmcpai-integration
Share:
9
Stars
0
Downloads
0
Weekly
0/5

What is AI Agent with MCP Tools?

AI Agent with MCP Tools is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ai agent with mcp tools and rbac

AI Agent with MCP Tools and RBAC

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • AI Agent with MCP Tools and RBAC

Use Cases

Build AI agents with role-based access control (RBAC) using MCP tools.
AIAnytime

Maintainer

LicenseMIT
Languagejavascript
Versionv1.0.0
UpdatedFeb 14, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx ai-agent-with-mcp-tools

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use AI Agent with MCP Tools

AI Agent with MCP Tools is a full-stack application demonstrating role-based access control (RBAC) for AI agents using the Model Context Protocol. It pairs a FastAPI MCP server with a LangChain-powered agent and a React frontend, enforcing fine-grained document permissions for three user roles: Admin, Editor, and Viewer.

Prerequisites

  • Python 3.8 or higher with pip
  • Node.js 16+ and npm
  • OpenAI API key (GPT-4 is used as the underlying LLM)
  • Git for cloning the repository
  • Unix-like shell (Linux, macOS, or WSL on Windows) for the startup script
1

Clone the repository

Clone the project from GitHub to get both the backend MCP server and frontend React application.

git clone https://github.com/AIAnytime/AI-Agent-with-MCP-Tools.git
cd AI-Agent-with-MCP-Tools
2

Install backend dependencies

Set up a Python virtual environment and install all backend dependencies including FastAPI, LangChain, and PyCasbin for RBAC enforcement.

cd backend
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt
3

Configure environment variables

Create a .env file in the backend directory with your OpenAI API key. This key is used by the LangChain agent to process natural language requests.

# backend/.env
OPENAI_API_KEY=sk-proj-your_openai_api_key_here
4

Install frontend dependencies

Switch to the frontend directory and install Node.js dependencies for the React chat interface.

cd ../frontend
npm install
5

Start all services

Return to the project root and run the startup script which launches the MCP server, API server, and frontend concurrently.

cd ..
chmod +x start_all.sh
./start_all.sh
# MCP Server: http://localhost:8765
# API Server: http://localhost:8000
# Frontend:   http://localhost:3000
6

Access the application and test RBAC

Open http://localhost:3000 in your browser. Select a user (alice=Admin, bob=Editor, charlie=Viewer) and send natural language commands. The system enforces a default-deny policy — all operations are blocked unless explicitly permitted for the role.

AI Agent with MCP Tools Examples

Client configuration

The MCP server runs locally on port 8765. This is not a Claude Desktop integration — it is a standalone AI agent system with its own frontend.

# Services and their ports
# MCP Server:  http://localhost:8765  (document tools)
# API Server:  http://localhost:8000  (agent endpoint)
# Frontend UI: http://localhost:3000  (chat interface)

# Users and roles
# alice   -> Admin  (create, read, update, delete)
# bob     -> Editor (create, read, update)
# charlie -> Viewer (read only)

Prompts to try

Chat with the agent in the browser UI after selecting a user. RBAC is enforced automatically.

- "Create a document called 'project-plan' with content 'Q4 Planning'"
- "List all documents"
- "Read the document 'project-plan'"
- "Delete the document 'project-plan'"
- "Check my permissions"

Troubleshooting AI Agent with MCP Tools

start_all.sh fails to start services

Ensure you have activated the Python virtual environment before running the script, and that Node.js and npm are installed. Check each service log individually by running them manually: 'python backend/main.py' and 'npm start' in the frontend directory.

Agent returns 'permission denied' for all operations

Confirm you selected a user in the frontend dropdown before sending commands. The system uses a default-deny policy, so unauthenticated requests are always blocked. Try selecting 'alice' (Admin) to confirm RBAC is working.

OpenAI API errors or empty agent responses

Verify your OPENAI_API_KEY in backend/.env is valid and has sufficient credits. The application uses GPT-4 which requires an API account with access to that model tier.

Frequently Asked Questions about AI Agent with MCP Tools

What is AI Agent with MCP Tools?

AI Agent with MCP Tools is a Model Context Protocol (MCP) server that ai agent with mcp tools and rbac It connects AI assistants to external tools and data sources through a standardized interface.

How do I install AI Agent with MCP Tools?

Follow the installation instructions on the AI Agent with MCP Tools GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with AI Agent with MCP Tools?

AI Agent with MCP Tools works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is AI Agent with MCP Tools free to use?

Yes, AI Agent with MCP Tools is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "ai-agent-with-mcp-tools": { "command": "npx", "args": ["-y", "ai-agent-with-mcp-tools"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use AI Agent with MCP Tools?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides