Ershu MCP
OfficialClick 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., "@Ershu MCPSearch the indexed source for therefundOrderfunction in the payments project"
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.
Ershu MCP
Ershu MCP is the authenticated Model Context Protocol endpoint for Ershu projects. It is intended for coding agents and maintainers who need to discover projects, inspect published documents and repository snapshots, search indexed source, trace project relationships, and read consumer contracts.
The service exposes 27 tools over stateless Streamable HTTP. It reads Ershu data through ershu-core instead of routing queries through the Ershu API. It does not run the Worker analysis loop or generate AI-authored documents.
Scope
Ershu MCP provides:
project and repository discovery;
document, section, repository tree, and code-index navigation;
bounded source reads after a path has been identified;
indexed search, internal API lookup, project graph queries, change-surface discovery, and static runtime-flow tracing;
source-derived consumer contract, public interface, and schema reads;
queued refreshes for repository trees, code indexes, search indexes, and knowledge graphs.
The service does not create projects, repositories, users, or MCP keys. It also does not replace source inspection. Search and graph responses can be partial, stale, or truncated, and published prose can be secondary evidence.
Related MCP server: Documentary MCP Server
How it fits into Ershu
MCP client
|
| Streamable HTTP + Bearer token
v
ershu-mcp
|
+-- ershu-core services and schemas
+-- shared PostgreSQL data
+-- repository cache
+-- Milvus-backed retrieval when configuredershu-mcp depends on ershu-core. It does not import or call ershu-api or ershu-worker. A full Ershu installation combines the independently versioned components in the ershu deployment repository.
Requirements
Python 3.14 or newer
PostgreSQL with the Ershu schema
Git when the service needs to read remote repositories
Milvus for semantic retrieval; search responses report when they use a weaker fallback
Installation
Install the MCP server as part of a tested component set through the
ershu installer package:
pip install "ershu[mcp]"Projects that depend on the MCP package directly can pin the component with UV:
uv add "ershu-mcp==1.0.0.post20260812"For development from a source checkout:
uv sync --locked
cp .env.example .envThe sample environment file contains public placeholders. Replace SECRET_KEY, ENCRYPTION_KEY, and MCP_KEY_PEPPER before starting the service. Each value must contain at least 32 characters, and the three values must differ.
Minimal startup
Apply the shared database migrations, then start the MCP process:
uv run ershu-db upgrade head
uv run ershu-mcpThe development defaults listen on 127.0.0.1:8001:
health check:
http://127.0.0.1:8001/healthMCP endpoint:
http://127.0.0.1:8001/mcp/
curl -fsS http://127.0.0.1:8001/healthA healthy process returns:
{"status":"ok"}The health route is public. It confirms that the process is running, but it does not verify credentials, project access, repository freshness, or search availability.
Authentication
Every MCP tool call requires an HTTP Bearer token:
Authorization: Bearer <MCP key or user access token>MCP keys inherit a user identity and can be restricted to selected projects. Invalid, expired, or revoked credentials are rejected. This package has no command for creating keys, so obtain credentials from an Ershu installation before connecting a client.
Do not put credentials in this README, committed client configuration, container images, or shell history.
Configuration
McpSettings reads .env from the current working directory. The full public example is in .env.example. The main groups are:
Group | Variables | Purpose |
Runtime |
| Process mode, logging, and listener |
Proxy |
| Trusted forwarded request metadata |
Database |
| Shared Ershu database connection |
Secrets |
| Token, stored credential, and MCP key protection |
Retrieval |
| Semantic index access |
Repository access |
| Cache location and repository allowlists |
Git policy |
| Local and remote repository safety limits |
Git credentials |
| Optional fallback credentials for private remotes |
Build identity |
| Exact source commit used for the running process |
HTTP safety |
| Streamable HTTP host and origin checks |
Production mode adds these startup checks:
MCP_BUILD_COMMITis a full 40-character Git commit;installed
ershu-mcppackage metadata is available;DNS rebinding protection is enabled;
allowed host and origin lists are not empty;
development access to untrusted local repository paths remains disabled.
When a reverse proxy is used, keep the /mcp/ path intact and set the proxy, host, and origin allowlists to the deployed values.
Public tools
The running process is the source of truth for the tool list. Call get_server_info to read its package version, build commit, identity status, and registered capabilities.
Area | Tools |
Identity and discovery |
|
Documents |
|
Repository navigation |
|
Search and relationships |
|
Consumer contracts |
|
Fact refresh |
|
refresh_repository_facts requires project management permission. It queues deterministic updates for the repository tree, code index, search index, and knowledge graph. It never requests an AI document rewrite. Use get_run_status with the returned run ID to follow the work.
Recommended reading flow
Call
get_server_infoand verify the running version and build commit.Discover a project with
list_projects, then confirm it withresolve_project.Use
list_project_repositoriesto compare repository revisions and data status.Read
get_project_overview, then open document summaries, sections, and full documents only as needed.Browse the repository tree and code index before requesting a bounded source snippet.
Use search, graph, change-surface, or runtime-flow tools to find candidate evidence.
For public interfaces, prefer structured contracts and schemas over prose.
Project references accept a UUID, slug, or exact readable project name. Use discovery instead of guessing a generic name.
Evidence and freshness
Check response metadata before treating a result as current or complete:
authority=source_derivedidentifies structured source facts.authority=secondaryandusage=reference_onlyidentify navigation material that still needs source verification.revision_status=currentmeans the item matches the latest known repository revision. A stale or unknown status is only a lead.data_status,result_status,warnings,verification_required, andnext_actionsexplain whether an empty or partial result is trustworthy.truncated=truemeans the response is not a complete list.
For paged repository trees, keep every page on the same revision. Pass the first page's workspace_commit_sha as commit_sha for a clean Git workspace, or pass tree_revision for an unversioned or dirty local workspace.
Repository access
Remote repositories are prepared under REPOSITORY_STORAGE_PATH. Limit remote access with GIT_ALLOWED_HOSTS; insecure Git URLs and file:// URLs are disabled by default. Repository-specific credentials take precedence over the optional GitHub or GitLab fallback token.
Local repository paths refer to storage visible to the MCP process. In production, add each allowed root to TRUSTED_LOCAL_PATHS and keep ALLOW_DEV_OPEN_LOCAL_REPOSITORY_PATHS=false.
Development
The package keeps MCP transport, authentication, navigation, response compaction, and refresh requests in src/ershu/mcp/. Shared data models and query services come from ershu-core.
Run the repository checks with uv:
uv run pytest -q
uv run ruff check src tests
uv run ruff format --check src tests
uv build --no-sources --out-dir distThe tests run without the API, Worker, or deployment repository source trees.
License
Ershu MCP is licensed under the Apache License 2.0.
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 Servers
- AlicenseBqualityBmaintenanceEnables MCP clients to manage Overleaf projects via Git sync, including listing, reading, writing, and syncing files.445MIT
- Flicense-qualityDmaintenanceEnables creating, listing, and searching project-based documentation with Markdown content, table of contents, full-text search, and multi-client support via Streamable HTTP transport.
- Alicense-qualityCmaintenanceProvides secure, read-only access to ContextCore project context (vision, audience, scope, tech decisions, etc.) for MCP-aware agents like Cursor and Claude Code, with server-side access enforcement.275MIT
- Alicense-qualityAmaintenanceProvides bounded repository context and edit-grant MCP tools to coding agents such as Codex, indexing local repositories and enabling fingerprint-checked patch application.10Apache 2.0
Related MCP Connectors
Software component catalog: search your org's services, docs, APIs, dependencies, and ownership.
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Discovery, OAuth, project operations, and exact project MCP handoff for Spala backend projects.
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/ershu-lab/ershu-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server