knowledgeops-ai
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@knowledgeops-aisearch our knowledge base for the remote work policy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
KnowledgeOps AI
A Laravel knowledge assistant that combines cited RAG answers, an MCP server, and a guarded agent workflow. The agent can propose a support ticket, but it cannot execute the tool until a human approves the stored action.
Why this project
Many AI demos stop at a chat box. KnowledgeOps AI demonstrates the backend concerns needed for a safer production system:
workspace-scoped document ingestion and retrieval;
deterministic local embeddings for a zero-cost demo;
optional OpenAI embeddings and generated answers;
PostgreSQL with pgvector search and an SQLite fallback;
JSON-RPC MCP tools with typed input schemas;
human approval before state-changing agent actions;
queues, audit records, API-key protection, and automated tests.
Related MCP server: MCP Knowledge Base Server
Architecture
flowchart LR
Client[API or MCP client] --> Laravel[Laravel API]
Laravel --> Ingest[Queued ingestion]
Ingest --> Chunk[Chunk + embed]
Chunk --> Vector[(PostgreSQL + pgvector)]
Laravel --> Retrieve[Hybrid retrieval]
Retrieve --> Vector
Retrieve --> LLM[LLM or local fallback]
LLM --> Answer[Cited answer]
Answer --> Agent[Guarded agent]
Agent --> Pending[(Pending action)]
Pending --> Approval{Human approval}
Approval -->|approved| MCP[MCP tool registry]
MCP --> Ticket[(Support ticket)]Stack
PHP 8.3 and Laravel 13
OpenAI Responses and Embeddings APIs, or a local deterministic fallback
PostgreSQL 17 with pgvector; SQLite is supported for quick local development
Redis queues and cache in Docker
MCP-compatible JSON-RPC endpoint
PHPUnit feature and unit tests
Quick start with SQLite
cp .env.example .env
composer install
php artisan key:generate
touch database/database.sqlite
php artisan migrate --seed
php artisan serveOpen http://localhost:8000. The default API key is local-demo-key.
The local provider needs no external service. To use OpenAI, update .env:
AI_PROVIDER=openai
OPENAI_API_KEY=your-key
OPENAI_CHAT_MODEL=gpt-4.1-mini
OPENAI_EMBEDDING_MODEL=text-embedding-3-smallNever commit the real .env file.
Docker with pgvector and Redis
docker compose up -d postgres redis
docker compose run --rm app php artisan migrate --seed
docker compose up -d app workerThe Docker environment enables pgvector retrieval and runs ingestion through Redis.
API walkthrough
All API requests accept X-API-Key: local-demo-key.
1. Ingest a document
curl -X POST http://localhost:8000/api/documents \
-H "Content-Type: application/json" \
-H "X-API-Key: local-demo-key" \
-d '{
"workspace_id": "demo",
"title": "Remote Work Policy",
"source": "handbook://remote-work",
"content": "Employees may work remotely three days per week. Manager approval is required for fully remote arrangements."
}'2. Ask a cited RAG question
curl -X POST http://localhost:8000/api/rag/ask \
-H "Content-Type: application/json" \
-H "X-API-Key: local-demo-key" \
-d '{"workspace_id":"demo","question":"How many remote days are allowed?"}'The response contains an answer plus source labels, document IDs, excerpts, and retrieval scores.
3. Run the agent
curl -X POST http://localhost:8000/api/agent/run \
-H "Content-Type: application/json" \
-H "X-API-Key: local-demo-key" \
-d '{"workspace_id":"demo","question":"Create a ticket for a company-wide payment outage"}'The agent returns requires_approval: true and stores a pending action. It does not create a ticket yet.
4. Approve the proposed action
curl -X POST http://localhost:8000/api/agent/actions/1/approve \
-H "Content-Type: application/json" \
-H "X-API-Key: local-demo-key" \
-d '{"workspace_id":"demo"}'Approval is single-use. A repeated approval returns HTTP 409 and cannot create a duplicate ticket.
MCP endpoint
The MCP endpoint is POST /api/mcp. It supports initialize, ping, tools/list, and tools/call.
curl -X POST http://localhost:8000/api/mcp \
-H "Content-Type: application/json" \
-H "X-API-Key: local-demo-key" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Available tools:
knowledge_searchsearches only within the supplied workspace.support_ticket_createrequires an explicit approved flag. The built-in agent supplies it only after the approval endpoint locks and updates a pending action.
Tests and code style
php artisan test
./vendor/bin/pint --testThe suite covers API-key protection, ingestion, workspace isolation, cited retrieval, MCP discovery and calls, and the approval-based ticket workflow.
Repository layout
app/
├── Http/Controllers API and MCP transport
├── Jobs queued document ingestion
├── Models documents, chunks, actions, tickets
└── Services
├── Ai chunking, embeddings, retrieval, RAG, agent
└── Mcp tool definitions and execution
database/
├── migrations workspace-scoped schema and pgvector setup
└── seeders runnable support-handbook examplePush to GitHub
git init
git add .
git commit -m "Build KnowledgeOps AI Laravel RAG and MCP agent"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/knowledgeops-ai.git
git push -u origin mainCreate the empty knowledgeops-ai repository in your GitHub account before the last two commands.
Deliberate safety choices
Workspace ID is applied to every retrieval and action query.
The LLM receives retrieved passages, not unrestricted database access.
State-changing tools require approval, which is recorded and locked in a transaction.
Tool inputs are validated again at execution time.
Local mode makes tests deterministic and prevents accidental external AI calls.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Salesforce-grounded retrieval, diagnoses, and a vetted-Force marketplace for MCP clients.
Make your knowledge agent-ready. One MCP endpoint, 5 connectors, 3 search modes.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Manage a Command+K workspace: widgets, conversations, MCP connections, and usage analytics.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables file system operations, web scraping, and AI-powered search through MCP tools for use by LLM agents.1
- FlicenseCqualityCmaintenanceEnables semantic search over knowledge-base articles and listing of sample support tickets using MCP tools.4
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to drive Relay, an AI support-triage agent, by exposing tools for customer lookup, documentation search, ticket classification, reply, and escalation, with full guardrails and read-only mode option.MIT
- AlicenseNot gradedqualityBmaintenanceExposes order status lookup and knowledge base search tools from the Support Agent AI over MCP, enabling MCP clients to handle customer support queries with grounded, citation-backed answers.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Subhashchandra3295/knowledgeops-ai'
If you have feedback or need assistance with the MCP directory API, please join our Discord server