mcp-server-reference
Enables MCP hosts to list, look up, and describe a static catalog of OpenAPI operations, and to inspect a governing contract and explicit deny-list that define what the server refuses to do.
README
mcp-server-reference
Ungoverned MCP is an uncatalogued API, one layer up.
A small Model Context Protocol server that publishes a static OpenAPI catalog, a written contract, and an explicit deny-list. It is a reference surface — not a platform and not a SaaS.
Bruno Carvalho de Aquino, Solutions Architect.
MCP host (Cursor, Claude, …)
|
| stdio
v
+---------------------------+
| mcp-server-reference |
| |
| tools = catalog lookup |
| resources = contract |
| deny-list = interface |
+---------------------------+
|
| imported modules only
v
orders | identity | billing
(OpenAPI snippets, no fetch)
Problem
Teams are wiring MCP servers the way they once wired shadow APIs: a process, a few powerful tools, no inventory, no owner, no statement of what the process must not do.
A tool that accepts a URL is an HTTP proxy. A tool that accepts a shell string is remote code execution. A tool that dumps process.env is credential exfiltration. The protocol does not make those shapes safe. Naming them "tools" just hides them from the people who review APIs.
What this repository is
| Piece | Role |
|---|---|
TypeScript MCP server (@modelcontextprotocol/server v2) |
stdio process a host can spawn |
| Five tools | list / lookup / describe. No execution. |
| Four resources | contract, deny-list, catalog index, per-API spec |
| CONTRACT.md | Human manifest of the surface |
| DENY.md | Closed list of capabilities that will not be added |
| ADR-0001 | Why the deny-list is part of the interface |
The catalog is three lab OpenAPI documents compiled into the process (orders, identity, billing). Spec servers[] use the .invalid TLD. The process never fetches them.
What this repository is not
- Not Apidex. Apidex is the product-shaped answer (inventory, lifecycle, MCP governance). This repo is the public wedge: one honest server and a written no.
- Not an MCP security gateway. No OAuth, no per-principal allowlist, no audit shipping. That is a later box.
- Not a customer case study. No invented counts of servers, tokens, or "shadow MCP reduced by N%".
Constraints
- Node 20+. TypeScript strict. No runtime filesystem walk. No
fetch. Nochild_process. - Tool inputs are closed: slugs, HTTP methods, exact path templates, deny-list enums.
billingis deprecated on purpose. A catalog that hides sunset APIs is how integrations rot.- Identity's published slice has no password or token endpoints. Restricted classification is metadata, not theatre.
Threat notes
| Risk | How it shows up in MCP | Control here |
|---|---|---|
| SSRF | fetch(userUrl) or "load this swagger" |
No URL arguments. Specs are imported. |
| RCE | run_command, bash -c |
Not implemented. explain_deny("raw_shell"). |
| Secret exfil | debug_env, home-directory read_file |
No env or path tools. No secrets in the repo. |
| Prompt injection via specs | Remote OpenAPI that contains instructions | Catalog is reviewed git content. |
| Confused deputy | Host user grants the server; model picks the tool | Small surface. Contract is listable. |
| Shadow execution | Lookup tool that quietly calls the live API | get_operation returns invoked: false. |
This is a threat note, not a full STRIDE model of a production estate. If you attach this server to a host, you still trust the host process and the model. Reducing that trust is gateway work.
How to run locally
npm install
npm test
npm run typecheck
npm run inspect # prints the contract JSON
npm run build
stdio server (what a host spawns):
npm start
# or, without a prior build:
npm run dev
Do not type into that process. MCP is JSON-RPC on stdin/stdout. Talk to it from a host.
Cursor / Claude Desktop
{
"mcpServers": {
"catalog": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-reference/dist/index.js"]
}
}
}
Build first. The host must be able to spawn Node. After connect, call inspect_contract or read mcp://contract.
Smoke without a host
npm run inspect
You should see the five tools, the four resources, and the seven deny-list ids.
Relation to API governance
OpenAPI governance already has a vocabulary: owner, lifecycle, breaking change, deprecation, "this operation is not public". MCP arrived and forgot that vocabulary.
| API practice | MCP equivalent in this repo |
|---|---|
| Published OpenAPI | CONTRACT.md + inspect_contract |
| Path allowlist | Catalog ids + exact operation match |
| "Do not expose /admin" | DENY.md |
| Deprecated API still listed | billing lifecycle = deprecated |
| Contract test in CI | npm test + npm run typecheck |
If you would fail a PR that adds an undocumented REST endpoint, fail the PR that adds an undocumented MCP tool.
The product-shaped version of this problem — inventory of APIs and MCP servers, lifecycle, review — is Apidex. This repository does not implement that. It shows the primitive a catalog would ingest: a server that can describe itself and state what it refuses.
Trade-off I accepted
A kitchen-sink demo is more impressive in a screenshot. It also trains the next engineer to add fetch "just for this". I chose a boring catalog so the deny-list is the point.
The cost: you cannot use this server to "do work". That is intentional. Execution is a different contract, with identity.
License
MIT. Copyright (c) 2026 Bruno Carvalho de Aquino.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。