by basehim
An open-source PHP CMS for building custom websites and APIs. Extend it with modular Apps and Themes, use its REST API, and connect AI agents through a built-in MCP server and permission-based access controls.
# Add to your Claude Code skills
git clone https://github.com/basehim/basehimSee how basehim compares with popular alternatives.
basehim is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by basehim. An open-source PHP CMS for building custom websites and APIs. Extend it with modular Apps and Themes, use its REST API, and connect AI agents through a built-in MCP server and permission-based access controls. It has 3 GitHub stars.
basehim's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/basehim/basehim" and add it to your Claude Code skills directory (see the Installation section above).
basehim is primarily written in PHP. It is open-source under basehim on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh basehim against similar tools.
No comments yet. Be the first to share your thoughts!
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
The CMS built for the AI era. An open-source, API-first PHP CMS with a built-in Model Context Protocol server, so AI agents can search, read and draft your content — every permission scoped, so you decide exactly what they reach.
No Composer. No build step. No daemons. No public/ directory. Upload the
files, open your site, and the installer takes it from there.
basehim.com · Docs · API reference · Getting started · Download
On a web host — download basehim.zip,
upload the contents of its basehim/ folder to public_html/ (or any
subfolder), and open the site. The installer asks for your database details.
On your machine — PHP 8.1+ and a MySQL or MariaDB database:
curl -L -o basehim.zip https://github.com/basehim/basehim/releases/latest/download/basehim.zip
unzip basehim.zip && cd basehim
php -S localhost:8000 server.php # then open http://localhost:8000
Or from source: git clone https://github.com/basehim/basehim.git && cd basehim
and the same php -S line.
No database handy? One container is enough:
docker run -d --name basehim-db -p 3306:3306 \
-e MARIADB_ROOT_PASSWORD=secret -e MARIADB_DATABASE=basehim mariadb:11
# installer: host 127.0.0.1, database basehim, user root, password secret
server.php is for local development only. On a real host Apache uses the
bundled .htaccess, and server.php answers 404 to anything else.
Most modern CMSs assume SSH, Composer and a deploy pipeline. Basehim assumes the hosting real clients actually buy — cPanel, Plesk, plain Apache — and still gives you a first-class API surface and native agent support.
/mcp. Point Claude, or
any MCP client, at your site and it registers itself. No client id, no secret.This is the part worth reading first.
Basehim exposes a Model Context Protocol endpoint at the root of your domain:
| Method | Path | Purpose |
|---|---|---|
GET |
/mcp |
Discovery — transport, auth methods, metadata URL |
POST |
/mcp |
JSON-RPC 2.0 endpoint |
Add https://your-site.com/mcp as a custom connector in an AI assistant and it
handles registration itself. The endpoint accepts either an OAuth token or a
bearer API key.
Resources are addressed with a basehim:// URI scheme — basehim://site/info,
basehim://post/{id-or-slug} — and are enumerated through resources/list.
Agent auth sits at the domain root, outside /api/v1:
| Method | Path | Purpose |
|---|---|---|
GET |
/.well-known/oauth-protected-resource |
Resource metadata (RFC 9728) |
GET |
/.well-known/oauth-protected-resource/mcp |
Path-suffixed variant |
GET |
/.well-known/oauth-authorization-server |
Server metadata (RFC 8414) |
GET |
/.well-known/openid-configuration |
Same metadata, OIDC path |
POST |
/oauth/register |
Dynamic client registration |
GET/POST |
/oauth/authorize |
Consent screen and approval |
POST |
/oauth/token |
Exchange a code, or refresh |
Grants: authorization_code and refresh_token, with PKCE (S256).
Dynamic client registration is the point — there is nothing to configure by hand before an agent can connect.
Every token carries scopes, and a token issued for one thing cannot do another:
posts:read posts:write
taxonomies:read taxonomies:write
media:read comments:read comments:write
settings:read users:read
Installed apps can contribute their own scopes, so your site's list may be
longer. Whatever your site advertises is authoritative — fetch
/.well-known/oauth-authorization-server to see it.
A token also acts as the account behind it: scopes choose the tools, and the
account's role decides what those tools may do, exactly as on the REST API. An
author's posts:write token edits that author's posts and no one else's, a
contributor's goes in for review rather than live, and suspending an account
stops its tokens and keys at once. Scopes added by apps are granted only to
administrators unless the app maps them to a capability with the
mcp.scope_capabilities filter.
For companion apps running on a machine rather than in a chat window:
A token is a password. Issue the narrowest scope that does the job, use a separate token per integration so one can be revoked without disturbing the others, and keep tokens out of client-side code and screenshots. Revoking in the admin takes effect immediately.
Base URL https://your-site.com/api/v1.
{"data": …}{"type", "title", "status", "detail"}GET /posts/hello-world but DELETE /posts/12. This catches people out.page, per_page, status, q and author_id.Reading published content needs no authentication. Anything that writes, or reads drafts, does.
# Public read — no auth
curl https://your-site.com/api/v1/posts
# API key
curl -H "Authorization: Bearer basehim_…" https://your-site.com/api/v1/me
# JWT
curl -X POST https://your-site.com/api/v1/auth/login \
-H 'Content-Type: application/json' \
-d '{"username":"admin","password":"…"}'
# Create a post
curl -X POST https://your-site.com/api/v1/posts \
-H "Authorization: Bearer basehim_…" \
-H 'Content-Type: application/json' \
-d '{"title":"Hello","content":"<p>World</p>","status":"published"}'
Three ways in, for three different callers:
| Method | Header / flow | Best for |
|---|---|---|
| API key | Authorization: Bearer basehim_… |
Scripts, server-to-server |
| JWT | POST /auth/login, refresh at /auth/refresh |
Apps acting for a signed-in person |
| OAuth 2.1 | Dynamic client registration | AI agents over MCP |
The full endpoint list — content, media, taxonomies, comments, menus, users,
settings, apps, cache and scheduling — is at
basehim.com/docs/api-reference,
and mirrored in the admin at /admin/api/reference.
pdo_mysql, mbstring, openssl, fileinfo, gd, zipmod_rewrite (works on default cPanel). nginx works
too, but you must replicate the .htaccess rules yourself — see Security.server.php is enoughbasehim/ folder from
basehim.zip
(or of this repository) to your document root, e.g. public_html/./install.php.INSTALLED=true in
.env); deleting install.php afterwards is optional.Log in at /admin/login.
rsync -avz basehim/ user@server:/path/to/webroot/
cp .env.example .env
# Edit DB_*, APP_URL, then generate the two secrets:
php -r "echo 'APP_KEY=' . bin2hex(random_bytes(16)) . PHP_EOL;"
php -r "echo 'JWT_SECRET=' . bin2hex(random_bytes(32)) . PHP_EOL;"
# Migrations apply in filename order
for f in database/migrations/*.sql; do mysql -u user -p mydb < "$f"; done
chmod -R 775 storage/ content/
Generate a password hash with:
php -r "echo password_hash('YourPassword', PASSWORD_BCRYPT, ['cost' => 12]) . PHP_EOL;"
Subdirectory installs work out of the box — Basehim detects its own base path.
DB_PREFIX lets several sites share one database, which matters on shared
hosting where you get a fixed number. Set it before installing and leave it
alone afterwards.
basehim/
├── index.php # Front controller (all requests funnel here)
├── install.php # Web installer (locks itself when done)
├── server.php # Router f