EVM MCP Server
Provides blockchain services for over 30 EVM-compatible networks through a unified interface.
EVM MCP Server
A comprehensive Model Context Protocol (MCP) server that provides blockchain services across 60+ EVM-compatible networks. This server enables AI agents to interact with Ethereum, Optimism, Arbitrum, Base, Polygon, and many other EVM chains with a unified interface through 22 tools and 10 AI-guided prompts.
📋 Contents
- Overview
- Features
- Supported Networks
- Prerequisites
- Installation
- Configuration
- Usage
- API Reference
- Security Considerations
- Project Structure
- Development
- License
🔭 Overview
The MCP EVM Server leverages the Model Context Protocol to provide blockchain services to AI agents. It supports a wide range of services including:
- Reading blockchain state (balances, transactions, blocks, etc.)
- Interacting with smart contracts with automatic ABI fetching from block explorers
- Transferring tokens (native, ERC20, ERC721, ERC1155)
- Querying token metadata and balances
- Chain-specific services across 60+ EVM networks (34 mainnets + 26 testnets)
- ENS name resolution for all address parameters (use human-readable names like 'vitalik.eth' instead of addresses)
- AI-friendly prompts that guide agents through complex workflows
All services are exposed through a consistent interface of MCP tools, resources, and prompts, making it easy for AI agents to discover and use blockchain functionality. Every tool that accepts Ethereum addresses also supports ENS names, automatically resolving them to addresses behind the scenes. The server includes intelligent ABI fetching, eliminating the need to know contract ABIs in advance.
✨ Features
Blockchain Data Access
- Multi-chain support for 60+ EVM-compatible networks (34 mainnets + 26 testnets)
- Chain information including blockNumber, chainId, and RPCs
- Block data access by number, hash, or latest
- Transaction details and receipts with decoded logs
- Address balances for native tokens and all token standards
- ENS resolution for human-readable Ethereum addresses (use 'vitalik.eth' instead of '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045')
Token services
-
ERC20 Tokens
- Get token metadata (name, symbol, decimals, supply)
- Check token balances
- Transfer tokens between addresses
- Approve spending allowances
-
NFTs (ERC721)
- Get collection and token metadata
- Verify token ownership
- Transfer NFTs between addresses
- Retrieve token URIs and count holdings
-
Multi-tokens (ERC1155)
- Get token balances and metadata
- Transfer tokens with quantity
- Access token URIs
Smart Contract Interactions
- Read contract state through view/pure functions
- Write to contracts - Execute any state-changing function with automatic ABI fetching
- Contract verification to distinguish from EOAs
- Event logs retrieval and filtering
- Automatic ABI fetching from Etherscan v2 API across all 60+ networks (no need to know ABIs in advance)
- ABI parsing and validation with function discovery
Comprehensive Transaction Support
- Flexible Wallet Support - Configure with Private Key or Mnemonic (BIP-39) with HD path support
- Native token transfers across all supported networks
- Gas estimation for transaction planning
- Transaction status and receipt information
- Error handling with descriptive messages
Message Signing Capabilities
- Personal Message Signing - Sign arbitrary messages for authentication and verification
- EIP-712 Typed Data Signing - Sign structured data for gasless transactions and meta-transactions
- SIWE Support - Enable Sign-In With Ethereum authentication flows
- Permit Signatures - Create off-chain approvals for gasless token operations
- Meta-Transaction Support - Sign transaction data for relay services and gasless transfers
AI-Guided Workflows (Prompts)
- Transaction preparation - Guidance for planning and executing transfers
- Wallet analysis - Tools for analyzing wallet activity and holdings
- Smart contract exploration - Interactive ABI fetching and contract analysis
- Contract interaction - Safe execution of write operations on smart contracts
- Network information - Learning about EVM networks and comparisons
- Approval auditing - Reviewing and managing token approvals
- Error diagnosis - Troubleshooting transaction failures
🌐 Supported Networks
Mainnets
- Ethereum (ETH)
- Optimism (OP)
- Arbitrum (ARB)
- Arbitrum Nova
- Base
- Polygon (MATIC)
- Polygon zkEVM
- Avalanche (AVAX)
- Binance Smart Chain (BSC)
- zkSync Era
- Linea
- Celo
- Gnosis (xDai)
- Fantom (FTM)
- Filecoin (FIL)
- Moonbeam
- Moonriver
- Cronos
- Scroll
- Mantle
- Manta
- Blast
- Fraxtal
- Mode
- Metis
- Kroma
- Zora
- Aurora
- Canto
- Flow
- Lumia
Testnets
- Sepolia
- Optimism Sepolia
- Arbitrum Sepolia
- Base Sepolia
- Polygon Amoy
- Avalanche Fuji
- BSC Testnet
- zkSync Sepolia
- Linea Sepolia
- Scroll Sepolia
- Mantle Sepolia
- Manta Sepolia
- Blast Sepolia
- Fraxtal Testnet
- Mode Testnet
- Metis Sepolia
- Kroma Sepolia
- Zora Sepolia
- Celo Alfajores
- Goerli
- Holesky
- Flow Testnet
- Filecoin Calibration
- Lumia Testnet
🛠️ Prerequisites
- Bun 1.0.0 or higher (recommended)
- Node.js 20.0.0 or higher (if not using Bun)
- Optional: Etherscan API key for ABI fetching
📦 Installation
# Clone the repository
git clone https://github.com/mcpdotdirect/mcp-evm-server.git
cd mcp-evm-server
# Install dependencies with Bun
bun install
# Or with npm
npm install
⚙️ Configuration
Environment Variables
The server uses the following environment variables. For write operations and ABI fetching, you must configure these variables:
Wallet Configuration (For Write Operations)
You can configure your wallet using either a private key or a mnemonic phrase:
Option 1: Private Key
export EVM_PRIVATE_KEY="0x..." # Your private key in hex format (with or without 0x prefix)
Option 2: Mnemonic Phrase (Recommended for HD Wallets)
export EVM_MNEMONIC="word1 word2 word3 ... word12" # Your 12 or 24 word BIP-39 mnemonic
export EVM_ACCOUNT_INDEX="0" # Optional: Account index for HD wallet derivation (default: 0)
The mnemonic option supports hierarchical deterministic (HD) wallet derivation:
- Uses BIP-39 standard mnemonic phrases (12 or 24 words)
- Supports BIP-44 derivation path:
m/44'/60'/0'/0/{accountIndex} EVM_ACCOUNT_INDEXallows you to derive different accounts from the same mnemonic- Default account index is 0 (first account)
Wallet is used for:
- Transferring native tokens (
transfer_nativetool) - Transferring ERC20 tokens (
transfer_erc20tool) - Approving token spending (
approve_token_spendingtool) - Writing to smart contracts (
write_contracttool) - Signing messages for authentication (
sign_messagetool) - Signing structured data for gasless transactions (
sign_typed_datatool)
⚠️ Security:
- Never commit your private key or mnemonic to version control
- Use environment variables or a secure key management system
- Store mnemonics securely - they provide access to all derived accounts
- Consider using different account indices for different purposes
API Keys (For ABI Fetching)
export ETHERSCAN_API_KEY="your-api-key-here"
This API key is optional but required for:
- Automatic ABI fetching from block explorers (
get_contract_abitool) - Auto-fetching ABIs when reading contracts (
read_contracttool withabiJsonparameter) - The
fetch_and_analyze_abiprompt
Get your free API key from:
- Etherscan - For Ethereum and compatible chains
- The same key works across all 60+ EVM networks via the Etherscan v2 API
Server Configuration
The server uses the following default configuration:
- Default Chain ID: 1 (Ethereum Mainnet)
- Server Port: 3001
- Server Host: 0.0.0.0 (accessible from any network interface)
These values are hardcoded in the application. If you need to modify them, you can edit the following files:
- For chain configuration:
src/core/chains.ts - For server configuration:
src/server/http-server.ts
🚀 Usage
Using npx (No Installation Required)
You can run the MCP EVM Server directly without installation using npx:
# Run the server in stdio mode (for CLI tools)
npx @mcpdotdirect/evm-mcp-server
# Run the server in HTTP mode (for web applications)
npx @mcpdotdirect/evm-mcp-server --http
Running the Server Locally
Start the server using stdio (for embedding in CLI tools):
# Start the stdio server
bun start
# Development mode with auto-reload
bun dev
Or start the HTTP server with SSE for web applications:
# Start the HTTP server
bun start:http
# Development mode with auto-reload
bun dev:http
Connecting to the Server
Connect to this MCP server using any MCP-compatible client. For testing and debugging, you can use the MCP Inspector.
Connecting from Cursor
To connect to the MCP server from Cursor:
-
Open Cursor and go to Settings (gear icon in the bottom left)
-
Click on "Features" in the left sidebar
-
Scroll down to "MCP Servers" section
-
Click "Add new MCP server"
-
Enter the following details:
- Server name:
evm-mcp-server - Type:
command - Command:
npx @mcpdotdirect/evm-mcp-server
- Server name:
-
Click "Save"
Once connected, you can use the MCP server's capabilities directly within Cursor. The server will appear in the MCP Servers list and can be enabled/disabled as needed.
Using mcp.json with Cursor
For a more portable configuration that you can share with your team or use across projects, you can create an .cursor/mcp.json file in your project's root directory:
{
"mcpServers": {
"evm-mcp-server": {
"command": "npx",
"args": ["-y", "@mcpdotdirect/evm-mcp-server"]
},
"evm-mcp-http": {
"command": "npx",
"args": ["-y", "@mcpdotdirect/evm-mcp-server", "--http"]
}
}
}
Place this file in your project's .cursor directory (create it if it doesn't exist), and Cursor will automatically detect and use these MCP server configurations when working in that project. This approach makes it easy to:
- Share MCP configurations with your team
- Version control your MCP setup
- Use different server configurations for different projects
Example: HTTP Mode with SSE
If you're developing a web application and want to connect to the HTTP server with Server-Sent Events (SSE), you can use this configuration:
{
"mcpServers": {
"evm-mcp-sse": {
"url": "http://localhost:3001/sse"
}
}
}
This connects directly to the HTTP server's SSE endpoint, which is useful for:
- Web applications that need to connect to the MCP server from the browser
- Environments where running local commands isn't ideal
- Sharing a single MCP server instance among multiple users or applications
To use this configuration:
- Create a
.cursordirectory in your project root if it doesn't exist - Save the above JSON as
mcp.jsonin the.cursordirectory - Restart Cursor or open your project
- Cursor will detect the configuration and offer to enable the server(s)
Example: Using the MCP Server in Cursor
After configuring the MCP server with mcp.json, you can easily use it in Cursor. Here's an example workflow:
- Create a new JavaScript/TypeScript file in your project:
// blockchain-example.js
async function main() {
try {
// Get ETH balance for an address using ENS
console.log("Getting ETH balance for vitalik.eth...");
// When using with Cursor, you can simply ask Cursor to:
// "Check the ETH balance of vitalik.eth on mainnet"
// Or "Transfer 0.1 ETH from my wallet to vitalik.eth"
// Cursor will use the MCP server to execute these operations
// without requiring any additional code from you
// This is the power of the MCP integration - your AI assistant
// can directly interact with blockchain data and operations
} catch (error) {
console.error("Error:", error.message);
}
}
main();
-
With the file open in Cursor, you can ask Cursor to:
- "Check the current ETH balance of vitalik.eth"
- "Look up the price of USDC on Ethereum"
- "Show me the latest block on Optimism"
- "Check if 0x1234... is a contract address"
-
Cursor will use the MCP server to execute these operations and return the results directly in your conversation.
The MCP server handles all the blockchain communication while allowing Cursor to understand and execute blockchain-related tasks through natural language.
Connecting using Claude CLI
If you're using Claude CLI, you can connect to the MCP server with just two commands:
# Add the MCP server
claude mcp add evm-mcp-server npx @mcpdotdirect/evm-mcp-server
# Start Claude with the MCP server enabled
claude
Example: Getting a Token Balance with ENS
// Example of using the MCP client to check a token balance using ENS
const mcp = new McpClient("http://localhost:3000");
const result = await mcp.invokeTool("get-token-balance", {
tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC on Ethereum
ownerAddress: "vitalik.eth", // ENS name instead of address
network: "ethereum",
});
console.log(result);
// {
// tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
// owner: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
// network: "ethereum",
// raw: "1000000000",
// formatted: "1000",
// symbol: "USDC",
// decimals: 6
// }
Example: Resolving an ENS Name
// Example of using the MCP client to resolve an ENS name to an address
const mcp = new McpClient("http://localhost:3000");
const result = await mcp.invokeTool("resolve-ens", {
ensName: "vitalik.eth",
network: "ethereum",
});
console.log(result);
// {
// ensName: "vitalik.eth",
// normalizedName: "vitalik.eth",
// resolvedAddress: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
// network: "ethereum"
// }
Example: Batch Multiple Calls with Multicall
// Example of using multicall to batch multiple contract reads in a single RPC call
const mcp = new McpClient("http://localhost:3000");
const result = await mcp.invokeTool("multicall", {
network: "ethereum",
calls: [
{
contractAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
functionName: "balanceOf",
args: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"],
},
{
contractAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
functionName: "symbol",
},
{
contractAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
functionName: "decimals",
},
],
});
console.log(result);
// {
// network: "ethereum",
// totalCalls: 3,
// successfulCalls: 3,
// failedCalls: 0,
// results: [
// { contractAddress: "0xA0b...", functionName: "balanceOf", result: "1000000000", status: "success" },
// { contractAddress: "0xA0b...", functionName: "symbol", result: "USDC", status: "success" },
// { contractAddress: "0xA0b...", functionName: "decimals", result: "6", status: "success" }
// ]
// }
📚 API Reference
Tools
The server provides 25 focused MCP tools for agents. All tools that accept address parameters support both Ethereum addresses and ENS names.
Wallet Information
| Tool Name | Description | Key Parameters |
|---|---|---|
get_wallet_address | Get the address of the configured wallet (from EVM_PRIVATE_KEY) | none |
Network Information
| Tool Name | Description | Key Parameters |
|---|---|---|
get_chain_info | Get network information | network |
get_supported_networks | List all supported EVM networks | none |
get_gas_price | Get current gas prices on a network | network |
ENS Services
| Tool Name | Description | Key Parameters |
|---|---|---|
resolve_ens_name | Resolve ENS name to address | ensName, network |
lookup_ens_address | Reverse lookup address to ENS name | address, network |
Block & Transaction Information
| Tool Name | Description | Key Parameters |
|---|---|---|
get_block | Get block data | blockNumber or blockHash, network |
get_latest_block | Get latest block data | network |
get_transaction | Get transaction details | txHash, network |
get_transaction_receipt | Get transaction receipt with logs | txHash, network |
wait_for_transaction | Wait for transaction confirmation | txHash, confirmations, network |
Balance & Token Information
| Tool Name | Description | Key Parameters |
|---|---|---|
get_balance | Get native token balance | address (address/ENS), network |
get_token_balance | Check ERC20 token balance | tokenAddress (address/ENS), ownerAddress (address/ENS), network |
get_allowance | Check token spending allowance | tokenAddress (address/ENS), ownerAddress (address/ENS), spenderAddress (address/ENS), network |
Smart Contract Interactions
| Tool Name | Description | Key Parameters |
|---|---|---|
get_contract_abi | Fetch contract ABI from block explorer (60+ networks) | contractAddress (address/ENS), network |
read_contract | Read smart contract state (auto-fetches ABI if needed) | contractAddress, functionName, args[], abiJson (optional), network |
write_contract | Execute state-changing functions (auto-fetches ABI if needed) | contractAddress, functionName, args[], value (optional), abiJson (optional), network |
multicall | Batch multiple read calls into a single RPC request (uses Multicall3) | calls[] (array of contract calls), allowFailure (optional), network |
Token Transfers
| Tool Name | Description | Key Parameters |
|---|---|---|
transfer_native | Send native tokens (ETH, etc.) | to (address/ENS), amount, network |
transfer_erc20 | Transfer ERC20 tokens | tokenAddress (address/ENS), to (address/ENS), amount, network |
approve_token_spending | Approve token allowances | tokenAddress (address/ENS), spenderAddress (address/ENS), amount, network |
NFT Services
| Tool Name | Description | Key Parameters |
|---|---|---|
get_nft_info | Get NFT (ERC721) metadata | tokenAddress (address/ENS), tokenId, network |
get_erc1155_balance | Check ERC1155 balance | tokenAddress (address/ENS), tokenId, ownerAddress (address/ENS), network |
Message Signing
| Tool Name | Description | Key Parameters |
|---|---|---|
sign_message | Sign arbitrary messages for authentication and verification (SIWE, off-chain signatures) | message |
sign_typed_data | Sign EIP-712 structured data for gasless transactions, permits, and meta-transactions | domainJson, typesJson, primaryType, messageJson |
Resources
The server exposes blockchain data through the following MCP resource URIs. All resource URIs that accept addresses also support ENS names, which are automatically resolved to addresses.
Blockchain Resources
| Resource URI Pattern | Description |
|---|---|
evm://{network}/chain | Chain information for a specific network |
evm://chain | Ethereum mainnet chain information |
evm://{network}/block/{blockNumber} | Block data by number |
evm://{network}/block/latest | Latest block data |
evm://{network}/address/{address}/balance | Native token balance |
evm://{network}/tx/{txHash} | Transaction details |
evm://{network}/tx/{txHash}/receipt | Transaction receipt with logs |
Token Resources
| Resource URI Pattern | Description |
|---|---|
evm://{network}/token/{tokenAddress} | ERC20 token information |
evm://{network}/token/{tokenAddress}/balanceOf/{address} | ERC20 token balance |
evm://{network}/nft/{tokenAddress}/{tokenId} | NFT (ERC721) token information |
evm://{network}/nft/{tokenAddress}/{tokenId}/isOwnedBy/{address} | NFT ownership verification |
evm://{network}/erc1155/{tokenAddress}/{tokenId}/uri | ERC1155 token URI |
evm://{network}/erc1155/{tokenAddress}/{tokenId}/balanceOf/{address} | ERC1155 token balance |
🔒 Security Considerations
- Private keys are used only for transaction signing and are never stored by the server
- Consider implementing additional authentication mechanisms for production use
- Use HTTPS for the HTTP server in production environments
- Implement rate limiting to prevent abuse
- For high-value services, consider adding confirmation steps
📁 Project Structure
mcp-evm-server/
├── src/
│ ├── index.ts # Main stdio server entry point
│ ├── server/ # Server-related files
│ │ ├── http-server.ts # HTTP server with SSE
│ │ └── server.ts # General server setup
│ ├── core/
│ │ ├── chains.ts # Chain definitions and utilities
│ │ ├── resources.ts # MCP resources implementation
│ │ ├── tools.ts # MCP tools implementation
│ │ ├── prompts.ts # MCP prompts implementation
│ │ └── services/ # Core blockchain services
│ │ ├── index.ts # Operation exports
│ │ ├── balance.ts # Balance services
│ │ ├── transfer.ts # Token transfer services
│ │ ├── utils.ts # Utility functions
│ │ ├── tokens.ts # Token metadata services
│ │ ├── contracts.ts # Contract interactions
│ │ ├── transactions.ts # Transaction services
│ │ └── blocks.ts # Block services
│ │ └── clients.ts # RPC client utilities
├── package.json
├── tsconfig.json
└── README.md
🛠️ Development
To modify or extend the server:
- Add new services in the appropriate file under
src/core/services/ - Register new tools in
src/core/tools.ts - Register new resources in
src/core/resources.ts - Add new network support in
src/core/chains.ts - To change server configuration, edit the hardcoded values in
src/server/http-server.ts
📄 License
This project is licensed under the terms of the MIT License.
İlgili Sunucular
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Agent Bazaar
Billing and metering infrastructure for MCP tool servers. 10% platform fee, MIT-licensed billing spec, signed receipts and SLA tracking.
MCP Server with Ollama Integration
An MCP server that integrates with Ollama to provide tools for file operations, calculations, and text processing. Requires a running Ollama instance.
PropelAuth Integration MCP Server
The PropelAuth Integration MCP Server helps you and your favorite AI agent integrate PropelAuth as quickly and easily as possible into your project.
Lilith Shell
Execute terminal commands through a secure shell interface using an AI assistant.
Enkrypt AI
Integrate red-teaming, prompt auditing, and AI safety analysis into any MCP-compatible client.
YepCode
Execute any LLM-generated code in the YepCode secure and scalable sandbox environment and create your own MCP tools using JavaScript or Python, with full support for NPM and PyPI packages
Kibana MCP Server
Access and interact with your Kibana instance using natural language or programmatic requests.
PyVista MCP Server
An MCP server for 3D visualization and data analysis using the PyVista library.
BCMS MCP
Give me a one - two sentence description of the BCMS MCP # MCP The BCMS Model Context Protocol (MCP) integration enables AI assistants like Claude, Cursor, and other MCP-compatible tools to interact directly with your BCMS content. This allows you to create, read, and update content entries, manage media files, and explore your content structure—all through natural language conversations with AI. ## What is MCP? The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open standard developed by Anthropic that allows AI applications to securely connect to external data sources and tools. With BCMS MCP support, you can leverage AI assistants to: - Query and explore your content structure - Create new content entries with AI-generated content - Update existing entries - Manage your media library - Get intelligent suggestions based on your content model --- ## Getting Started ### Prerequisites 1. A BCMS account with an active instance 2. An MCP key with appropriate permissions 3. An MCP-compatible client (Claude Desktop, Cursor, or any MCP client) ### Step 1: Create an MCP Key 1. Navigate to your BCMS dashboard 2. Go to Settings → MCP 3. Click Create MCP Key 4. Configure the permissions for templates you want the AI to access:GET: Read entries 5. POST: Create entries 6. PUT: Update entries 7. DELETE: Delete entries Note: Right now, MCP only supports creating, reading and updating content. ### Step 2: Configure Your MCP Client You can find full instructions for integrating BCMS with your AI tools right inside BCMS, on the MCP page. But in general, installing BCMS MCP works in a standard way: ``` { "mcpServers": { "bcms": { "url": "https://app.thebcms.com/api/v3/mcp?mcpKey=YOUR_MCP_KEY" } } } ``` ## Available Tools Once connected, your AI assistant will have access to the following tools based on your MCP key permissions: ### Content Discovery #### list_templates_and_entries Lists all templates and their entries that you have access to. This is typically the first tool to call when exploring your BCMS content. Returns: - Template IDs, names, and slugs - Entry IDs with titles and slugs for each language Example prompt: "Show me all the templates and entries in my BCMS" --- ### Entry Management #### list_entries_for_{templateId} Retrieves all entries for a specific template with full content data. A separate tool is generated for each template you have access to. Returns: - Complete entry data including all meta fields - Content in all configured languages - Entry statuses Example prompt: "List all blog posts from my Blog template" --- #### create_entry_for_{templateId} Creates a new entry for a specific template. The input schema is dynamically generated based on your template's field structure. Input: - statuses: Array of status assignments per language - meta: Array of metadata for each language (title, slug, custom fields) - content: Array of content nodes for each language Example prompt: "Create a new blog post titled 'Getting Started with BCMS' with a brief introduction paragraph" --- #### update_entry_for_{templateId} Updates an existing entry for a specific language. Input: - entryId: The ID of the entry to update - lng: Language code (e.g., "en") - status: Optional status ID - meta: Updated metadata - content: Updated content nodes Example prompt: "Update the introduction paragraph of my 'Getting Started' blog post" --- ### Media Management #### list_all_media Lists all media files in your media library. Returns: - Media IDs, names, and types - File metadata (size, dimensions for images) - Parent directory information Example prompt: "Show me all images in my media library" --- #### list_media_dirs Lists the directory structure of your media library. Returns: - Hierarchical directory structure - Directory IDs and names Example prompt: "Show me the folder structure of my media library" --- #### create-media-directory Creates a new directory in your media library. Input: - name: Name of the directory - parentId: Optional parent directory ID (root if not specified) Example prompt: "Create a new folder called 'Blog Images' in my media library" --- #### request-upload-media-url Returns a URL you use to upload a file (for example via POST with multipart form data), which avoids pushing large binaries through the MCP tool payload. You still need a valid file name and MIME type when uploading, as described in the tool response. Availability: Only when the MCP key has Can mutate media enabled. Example prompt: “Give me an upload URL for a new hero image, then tell me how to upload it.” Input: - fileName: Name of the file with extension - fileData: Base64-encoded file data (with data URI prefix) - parentId: Optional parent directory ID Example prompt: "Upload this image to my Blog Images folder" --- ### Linking Tools #### get_entry_pointer_link Generates an internal BCMS link to an entry for use in content. Input: - entryId: The ID of the entry to link to Returns: - Internal link format: entry:{entryId}@*_{templateId}:entry Example prompt: "Get me the internal link for the 'About Us' page entry" --- #### get_media_pointer_link Generates an internal BCMS link to a media item for use in content. Input: - mediaId: The ID of the media item Returns: - Internal link format: media:{mediaId}@*_@*_:entry Example prompt: "Get the link for the hero image so I can use it in my blog post" --- ## Content Structure ### Entry Content Nodes When creating or updating entries, content is structured as an array of nodes. Supported node types include: Type Description paragraph Standard text paragraph heading Heading (h1-h6) bulletList Unordered list orderedList Numbered list listItem List item codeBlock Code block with syntax highlighting blockquote Quote block image Image node widget Custom widget with props ### Example Content Structure ``` { "content": [ { "lng": "en", "nodes": [ { "type": "heading", "attrs": { "level": 1 }, "content": [ { "type": "text", "text": "Welcome to BCMS" } ] }, { "type": "paragraph", "content": [ { "type": "text", "text": "This is your first paragraph." } ] } ] } ] } ``` ## Security & Permissions ### MCP Key Scopes Your MCP key controls what the AI can access: - Template Access: Only templates explicitly granted in the MCP key are visible - Operation Permissions: Each template can have independent GET/POST/PUT/DELETE permissions - Media Access: Media operations are controlled separately ### Best Practices 1. Principle of Least Privilege: Only grant the permissions needed for your use case 2. Separate Keys: Create different MCP keys for different purposes or team members 3. Regular Rotation: Periodically rotate your MCP keys ## Use Cases ### Content Creation Workflows Blog Post Creation "Create a new blog post about the benefits of headless CMS. Include an introduction, three main benefits with explanations, and a conclusion. Use the Blog template." Product Updates "Update the price field for all products in the Electronics category to apply a 10% discount" ### Content Exploration Content Audit "List all blog posts that don't have a featured image set" Translation Status "Show me which entries are missing German translations" ### Media Organization Library Cleanup "Show me all unused images in the media library" Folder Setup "Create folder structure for: Products > Categories > Electronics, Clothing, Home" ## Troubleshooting ### Common Issues #### "MCP key not found" - Verify your MCP key format: keyId.keySecret.instanceId - Ensure the MCP key hasn't been deleted or deactivated - Check that you're using the correct instance #### "MCP key does not have access to template" - Review your MCP key permissions in the dashboard - Ensure the required operation (GET/POST/PUT/DELETE) is enabled for the template #### Session Expired - MCP sessions may timeout after periods of inactivity - Simply start a new conversation to establish a fresh session ### Getting Help - Documentation: [thebcms.com/docs](https://thebcms.com/docs) - Support: [[email protected]](mailto:[email protected]) - Community: [Join BCMS Discord](https://discord.com/invite/SYBY89ccaR) for community support ## Technical Reference ### Endpoint POST https://app.thebcms.com/api/v3/mcp?mcpKey={MCP_KEY} ### Transport BCMS MCP uses the Streamable HTTP transport with session management. Sessions are maintained via the mcp-session-id header. ### Response Format All tools return structured JSON responses conforming to the MCP specification with: - content: Array of content blocks - structuredContent: Typed response data ## Rate Limits MCP requests are subject to the same rate limits as API requests: - Requests are tracked per MCP key - Contact support if you need higher limits for production workloads
Projet MCP Server-Client
An implementation of the Model Context Protocol (MCP) for communication between AI models and external tools, featuring server and client examples in Python and Spring Boot.