selvans
Allows AI agents to observe and interact with Angular applications through a semantic UI tree and built-in tools like click_element, form_input, and navigate.
Provides direct integration with FastAPI backends, allowing AI agents to execute typed operations defined in FastAPI services.
Integrates with Python backends (specifically FastAPI) to register typed service operations, enabling AI agents to call backend functions programmatically.
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., "@selvansshow me the list of tasks"
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.
selvans
selvans is a framework that makes any web application natively operable by AI agents through the Model Context Protocol (MCP).
Instead of using browser automation, AI agents connect directly to your application through a structured protocol — observing the UI semantic tree and calling typed tools to interact with it.
How It Works
External AI (Claude Desktop, Cursor…)
│ MCP / SSE
▼
┌──────────────────┐
│ selvans-core │ ← Hub service (WebSocket + MCP server + admin UI)
└──────┬─────┬─────┘
│ WS │ WS
┌────┘ └────┐
▼ ▼
Angular App Python Backend
(selvans- (selvans-
angular) python)selvans-core is the central hub. It exposes an MCP server (SSE) that external AI clients connect to, and a WebSocket endpoint that your frontend and backend connect to.
selvans-angular integrates into your Angular app. It registers a semantic UI tree and built-in tools (
click_element,form_input,get_page_state…) with the Core.selvans-python integrates into your Python/FastAPI backend. It registers typed service operations with the Core.
The AI calls tools and operations through the Core, which routes them to the right app in real time.
Related MCP server: Playwright MCP
Repository Structure
selvans/
├── packages/
│ ├── selvans-angular/ # Angular library (npm)
│ └── selvans-python/ # Python client library (PyPI)
├── services/
│ └── selvans-core/ # Hub service (Docker)
├── demos/
│ ├── selvans-angular-demo/ # Angular demo app
│ └── selvans-python-demo/ # FastAPI demo backend
└── docker-compose.ymlQuick Start
One command (recommended)
Dev (Node 18+ + pnpm + Docker):
pnpm run setupThis starts Core (:8080) + Python demo (:8001) + Angular demo (:4200) — all in Docker, including the Angular dev server with live-reload. Open http://localhost:4200 — the selvans-panel should show "connected".
Live-reload: the Angular source is bind-mounted into the container. Saving a file in
demos/selvans-angular-demo/orpackages/selvans-angular/triggers an automatic browser update (~1 s latency due to polling on Docker Desktop Windows).First startup: the Angular container build (esbuild + pnpm install inside the container) takes 1-3 minutes.
pnpm run setupwaits up to 180 s for:4200to respond.
Non-technical / profano (Docker only — no Node/pnpm needed):
# macOS / Linux
./scripts/setup.sh --docker
# Windows
scripts\setup.bat --docker
# Or directly:
docker compose --profile full up --buildNote: the
--docker/--profile fullpath uses the nginx container (selvans-angular-demo, profilefull) — a static production-like bundle on:4200. Do not run it together withpnpm run setup(both bind port 4200).
See [[Getting-started]] in the wiki for the full guide, prerequisites per persona, and troubleshooting.
Manual start
1. Start the Core
docker compose up selvans-core
# Admin UI → http://localhost:8080/ui
# MCP SSE → http://localhost:8080/mcp/sse2. Integrate the Angular Frontend
npm install selvans-angular// app.module.ts
import { SelvansModule } from 'selvans-angular';
@NgModule({
imports: [
SelvansModule.forRoot({
coreUrl: 'http://localhost:8080',
appId: 'my-app'
})
]
})
export class AppModule {}Mark your components with semantic directives:
<main [SelvansNode]="{ id: 'main', template: 'layout', description: 'Main content area' }">
<form [SelvansNode]="{ id: 'login-form', template: 'form', description: 'User login form' }">
<input [SelvansTarget]="'email-input'" type="email" />
<button [SelvansTarget]="'submit-btn'">Login</button>
</form>
</main>3. Integrate the Python Backend
pip install selvans# main.py
from selvans import SelvansBeApp, SelvansBeConfig, SelvansService, operation
class TaskService(SelvansService):
name = "tasks"
description = "Task management"
@operation("list", description="List tasks, optionally filtered by status")
async def list_tasks(self, status: str = "") -> list[dict]:
return await db.list_tasks(status=status)
@operation("create", description="Create a new task")
async def create_task(self, title: str, priority: str = "medium") -> dict:
return await db.create_task(title, priority)
surface = SelvansBeApp(SelvansBeConfig(core_url="http://localhost:8080"))
surface.register(TaskService())
app = surface.create_app()4. Connect an AI Client
Add the Core's MCP endpoint to your AI client (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"selvans": {
"url": "http://localhost:8080/mcp/sse"
}
}
}The AI can now observe your app's UI and call your backend operations directly.
Run the Full Demo
pnpm run setup
# → Core :8080 + Python demo :8001 + Angular dev container :4200 (live-reload)Or all-in-Docker prod-like (no Node required):
docker compose --profile full up --build
# → Core :8080 + Python demo :8001 + Angular nginx :4200 (static bundle)Service | URL | Mode |
selvans-core | both | |
Admin UI | both | |
MCP SSE endpoint | both | |
Python demo backend | both | |
Angular demo frontend | dev (live-reload) / prod-like (nginx) |
Note:
selvans-angular-dev(dev, live-reload) andselvans-angular-demo(profilefull, nginx) both bind port 4200 — do not start them together.
Packages
Package | Description | Docs |
| Angular library — semantic UI tree + built-in tools | |
| Python library — FastAPI integration + service operations | |
| Hub service — MCP server + WebSocket hub + admin UI |
Built-in Frontend Tools
The Angular library registers these tools automatically:
Tool | Description |
| Returns current URL, title, and visible text |
| Navigate to a route by path |
| List all elements marked with |
| Click an element by its target ID |
| Read or set the value of a form field by target ID |
License
Distributed under the Apache 2.0 license — see LICENSE and NOTICE.
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.
Latest Blog Posts
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/gabrieleakeron/selvans'
If you have feedback or need assistance with the MCP directory API, please join our Discord server