FOCAL MCP Server
FOCAL MCP (Framework for Orchestrated Central AI ruLes) is a local MCP server that centralizes AI behavior rules and injects them across tools like Codex, Claude Code, and Cursor.
What This Server Does
- Stores rules in a user home workspace:
~/.focal_mcp/workspace - Serves a web UI to edit rules as files
- Exposes MCP prompts/resources + list_changed notifications
- Provides a
focal_rulestool so agents can fetch the latest rules before every response
Project Layout (Refactored)
FOCAL-MCP/
README.md
SPEC.md
agents.md
pyproject.toml
src/
focal_mcp_server/
app.py
mcp.py
notifications.py
web.py
workspace.py
logging_utils.py
Quick Start
uvx --from . focal-mcp-server
Web UI:
http://127.0.0.1:8765
MCP endpoint:
http://127.0.0.1:8765/mcp
WebSocket notifications:
ws://127.0.0.1:8765/mcp/ws
Workspace
Rules are stored outside the repo:
~/.focal_mcp/workspace/
core/
system.md
style.md
safety.md
tool_policy.md
agents/
MCP Behavior
initializereturns instructions that include a runtime directive to callfocal_rulesbefore every response.tools/listexposesfocal_ruleswhich returns the latest rules from disk.- Rule changes trigger:
notifications/prompts/list_changednotifications/resources/list_changed
Project Prompt (Codex)
The repository-level prompt for Codex lives in:
agents.md
Development Notes
- This project uses a
src/layout for the Python package. - Use
SPEC.mdas the single source of truth for behavior, interfaces, and constraints.
Roadmap (Next)
- Manage rules per project when working across multiple repos
- UI/UX improvements for rule editing and visibility
Publish to PyPI (Option A)
- Create a PyPI token with scope for this project.
- Add the token to GitHub repository secrets as
PYPI_API_TOKEN. - Tag and push a release:
git tag v0.1.0
git push origin v0.1.0
GitHub Actions will build and publish automatically.
Once published, users can run:
uvx --from focal-mcp-server focal-mcp-server
Install & Run with uvx
After the package is published to PyPI, anyone can run it without cloning the repo:
uvx --from focal-mcp-server focal-mcp-server
This will download the latest release and start the server.
Metadata
Release files for focal-mcp-server 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| focal_mcp_server-0.1.1.tar.gz | 11.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| focal_mcp_server-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.2 kB
Release files / focal_mcp_server-0.1.1.tar.gz
| Download URL | focal_mcp_server-0.1.1.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b4ce9a2fe3274a2f592af929efba5b99fc6a0536fbcecfef6cfc3a08b4f86c0
|
|
BLAKE2b-256 checksum How to use checksums |
f817a0ae283eba4ce0e4ec6757287799a25d8cdd50675da4b69e0b9afa582f54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / focal_mcp_server-0.1.1-py3-none-any.whl
| Download URL | focal_mcp_server-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93eed2b2e7fe23c23cde254ac839d42385f6101a647e5e0df4d5014e050a8880
|
|
BLAKE2b-256 checksum How to use checksums |
303c307de2c9f1cd076e0f85245983fb9a5075a46b07da9ca201ff2b1494cf8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for focal-mcp-server 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.