- Home
- MCP servers
- OpenZeppelin
OpenZeppelin
- typescript
0
GitHub Stars
typescript
Language
3 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"pbuda-openzeppelin-docs-mcp": {
"command": "npx",
"args": [
"-y",
"github:pbuda/openzeppelin-docs-mcp"
],
"env": {
"YOUR_ENV_VAR": "value"
}
}
}
}You can run an MCP server that provides offline search and retrieval of OpenZeppelin Contracts documentation. It pre-indexes Solidity sources and MDX docs to deliver fast, contract-aware lookups even when you are offline, making it ideal for offline development workflows and rapid reference.
How to use
Use the MCP client to connect to the OpenZeppelin docs MCP server and run searches, fetch contract metadata, and drill into function details. You can search for topics like guides, API references, and code examples, then retrieve exact function signatures, NatSpec notes, and the inheritance chain for any contract.
How to install
Prerequisites: you need Node.js and npm (or Node.js with npx). You also need access to a shell where you can run MCP commands.
Choose one of the quick install methods to add the OpenZeppelin docs MCP server to your Claude environment.
claude mcp add --transport stdio openzeppelin-docs -- npx -y github:pbuda/openzeppelin-docs-mcp
The index is built automatically on first run (takes about 2–3 minutes).
claude mcp add --transport stdio openzeppelin-docs -- npx -y openzeppelin-docs-mcp
Verify installation by listing configured servers and checking MCP status from within Claude Code.
List configured servers
claude mcp list
Check server status (inside Claude Code)
/mcp
If you prefer building and running locally, you can build the MCP server from source and then point Claude to the local runtime.
Clone the repository
git clone https://github.com/pbuda/openzeppelin-docs-mcp.git cd openzeppelin-docs-mcp
Install dependencies
npm install
Build the documentation index (fetches repos, ~2-3 min)
npm run build:index
Build TypeScript
npm run build
Add the local build to Claude Code using the runtime path you obtained after building.
claude mcp add --transport stdio openzeppelin-docs -- node /absolute/path/to/openzeppelin-docs-mcp/dist/index.js
Alternatively, persist the local run configuration for Claude by editing your Claude config to reference the local runtime.
{ "mcpServers": { "openzeppelin-docs": { "command": "node", "args": ["/absolute/path/to/openzeppelin-docs-mcp/dist/index.js"] } } }
You can also test the MCP server inspector to confirm the runtime is accessible.
npx @modelcontextprotocol/inspector node dist/index.js
## Additional usage notes
The OpenZeppelin MCP server offers tools to search docs, fetch contract API references, and drill into function-level NatSpec details across v4.x and v5.x. You can request specific contracts like ERC20, Ownable, ECDSA, or a general utilities module and specify a version to obtain a structured response that includes the inheritance chain, function signatures, parameters, and NatSpec.
## Notes on configuration, security, and troubleshooting
Configuration is driven by the MCP server you run locally or remotely. If you run a local build, ensure the runtime path in Claude points to the generated dist/index.js. When running remotely, use the provided MCP URL/command and keep your environment isolated per your development setup.
For security, limit access to the MCP server to trusted development environments and avoid exposing the local MCP endpoint publicly. If you need to rotate credentials or API keys for any connected tooling, update the corresponding environment variables or command arguments accordingly.
## Examples and capabilities you can use now
- Search for general OpenZeppelin documentation topics and find guides, API references, and code samples.
- Retrieve a detailed API reference for a specific contract, including function signatures, parameters, and NatSpec.
- Inspect a single function to understand its signature, input types, return values, and NatSpec explanations.
## Summary of what you get
An offline-capable, fast-search MCP server that understands Solidity structure, supports OpenZeppelin Contracts v4.x and v5.x, and extracts NatSpec directly from sources for accurate documentation delivery.
## Available tools
### search\_oz\_docs
Search OpenZeppelin documentation for guides, API references, and code examples.
### get\_oz\_contract
Get detailed API reference for a specific contract or library, including metadata and NatSpec.
### get\_oz\_function
Get detailed information about a specific function, including signature and NatSpec.
### list\_oz\_modules
List all available contracts and libraries, optionally filtered by category and version.