Skip to main content
Glama
alxspiker

AI Meta MCP Server

AI Meta MCP Server

A dynamic MCP server that allows AI models to create and execute their own custom tools through a meta-function architecture. This server provides a mechanism for AI to extend its own capabilities by defining custom functions at runtime.

Features

  • Dynamic Tool Creation: AI can define new tools with custom implementations

  • Multiple Runtime Environments: Support for JavaScript, Python, and Shell execution

  • Sandboxed Security: Tools run in isolated sandboxes for safety

  • Persistence: Store and load custom tool definitions between sessions

  • Flexible Tool Registry: Manage, list, update, and delete custom tools

  • Human Approval Flow: Requires explicit human approval for tool creation and execution

Related MCP server: Code Executor MCP Server

Security Considerations

⚠️ WARNING: This server allows for dynamic code execution. Use with caution and only in trusted environments.

  • All code executes in sandboxed environments

  • Human-in-the-loop approval required for tool creation and execution

  • Tool execution privileges configurable through environment variables

  • Audit logging for all operations

Installation

npm install ai-meta-mcp-server

Usage

Running the server

npx ai-meta-mcp-server

Running with Docker

# Build the Docker image
docker build -t ai-meta-mcp-server .

# Run the container
docker run --rm -i ai-meta-mcp-server

# Run with custom configuration and persistent storage
docker run --rm -i \
  -e ALLOW_PYTHON_EXECUTION=true \
  -e ALLOW_SHELL_EXECUTION=false \
  -v $(pwd)/data:/app/data \
  ai-meta-mcp-server

Configuration

Environment variables:

  • ALLOW_JS_EXECUTION: Enable JavaScript execution (default: true)

  • ALLOW_PYTHON_EXECUTION: Enable Python execution (default: false)

  • ALLOW_SHELL_EXECUTION: Enable Shell execution (default: false)

  • PERSIST_TOOLS: Save tools between sessions (default: true)

  • TOOLS_DB_PATH: Path to store tools database (default: "./tools.json")

Running with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "ai-meta-mcp": {
      "command": "npx",
      "args": ["-y", "ai-meta-mcp-server"],
      "env": {
        "ALLOW_JS_EXECUTION": "true",
        "ALLOW_PYTHON_EXECUTION": "false",
        "ALLOW_SHELL_EXECUTION": "false"
      }
    }
  }
}

Tool Creation Example

In Claude Desktop, you can create a new tool like this:

Can you create a tool called "calculate_compound_interest" that computes compound interest given principal, rate, time, and compounding frequency?

Claude will use the define_function meta-tool to create your new tool, which becomes available for immediate use.

Architecture

The server implements the Model Context Protocol (MCP) and provides a meta-tool architecture that enables AI-driven function registration and execution within safe boundaries.

License

MIT

Available Tools

5 tools
define_functionC

Create a new custom MCP function that the AI can use

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName of the new function
descriptionYesDescription of what the function does
parameters_schemaYesJSON Schema for parameters
implementation_codeYesCode to implement the function
execution_environmentNoEnvironment to execute the code injavascript

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It doesn't mention permissions needed, whether creation is idempotent, error handling, or side effects, which is inadequate for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of creating a custom function with 5 parameters, no annotations, and no output schema, the description is insufficient. It lacks details on return values, error cases, or how the function integrates with the MCP system, leaving significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond what's in the schema, such as explaining parameter interactions or constraints, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new custom MCP function'), making the purpose evident. However, it doesn't differentiate from sibling tools like 'update_function' or specify that this is for initial creation only, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'update_function' or 'delete_function'. The description lacks context about prerequisites, such as whether functions must be unique or if this overrides existing ones, leaving usage unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_functionB

Delete a custom MCP function

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName of the function to delete

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Delete' implies a destructive mutation, the description doesn't specify whether this action is reversible, requires specific permissions, or has side effects (e.g., breaking dependencies). It also doesn't describe the response format or error conditions, leaving significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately scannable and efficient. Every word earns its place by conveying essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's destructive nature and lack of annotations or output schema, the description is incomplete. It doesn't address critical context like irreversible deletion, permission requirements, error handling, or what happens upon success. For a mutation tool with no structured safety hints, more behavioral detail is needed to guide the agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'name' parameter fully documented in the schema itself. The description adds no additional parameter semantics beyond what the schema provides (e.g., format examples, validation rules, or edge cases). Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Delete') and the resource ('a custom MCP function'), making the purpose immediately understandable. It distinguishes this tool from its siblings (define_function, get_function_details, list_functions, update_function) by focusing on the deletion operation rather than creation, retrieval, listing, or modification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., the function must exist), consequences (e.g., irreversible deletion), or when to choose delete_function over update_function for removing functionality. Without such context, the agent lacks usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_function_detailsB

Get details of a custom MCP function

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName of the function to get details for

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Get details') but doesn't describe traits like whether it's read-only (implied but not explicit), error handling for invalid names, or response format (e.g., returns JSON with function properties). This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence ('Get details of a custom MCP function') that directly states the purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks context on usage, behavioral details, or output, which are needed for full completeness in a server with multiple function-related tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'name' parameter documented as 'Name of the function to get details for'. The description adds no additional meaning beyond this, such as format examples or constraints, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('details of a custom MCP function'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_functions' (which might return summaries vs. detailed information) or 'define_function' (which creates vs. retrieves), missing the specific distinction needed for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios like retrieving metadata for a known function name, nor does it contrast with 'list_functions' for browsing or 'update_function' for modifications, leaving the agent without usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_functionsB

List all custom MCP functions

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the action without behavioral details. It doesn't mention whether this is a read-only operation, what format the list returns (e.g., paginated, sorted), or any limitations (e.g., rate limits, authentication needs).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it immediately understandable without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter list tool with no output schema, the description is minimally adequate but lacks completeness. It doesn't explain return values, behavioral traits, or usage context, leaving gaps that could hinder an agent's understanding despite the simple input schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description doesn't add parameter details, but that's appropriate here, meeting the baseline for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all custom MCP functions'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'get_function_details' which might retrieve a single function, but the scope 'all' provides some implicit distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'get_function_details' for single functions or 'define_function' for creating new ones. The description lacks context about prerequisites, timing, or comparison with sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_functionC

Update an existing custom MCP function

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName of the function to update
descriptionNoNew description of what the function does
parameters_schemaNoNew JSON Schema for parameters
implementation_codeNoNew code to implement the function
execution_environmentNoNew environment to execute the code in

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states it's an update operation, implying mutation, but doesn't disclose permissions needed, whether changes are reversible, error handling (e.g., if the function doesn't exist), or rate limits. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for the tool's complexity, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks behavioral details (e.g., side effects, error cases) and doesn't explain what happens upon success (e.g., returns updated function details). For a 5-parameter update operation, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain parameter interactions or constraints). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and resource ('an existing custom MCP function'), making the purpose immediately understandable. It distinguishes from sibling tools like 'define_function' (create) and 'delete_function' (remove), though it doesn't explicitly contrast with 'get_function_details' or 'list_functions'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., the function must exist), when not to use it, or how it differs from 'define_function' for modifications versus creation. This leaves the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose targeting different operations on custom MCP functions: define (create), delete, get details, list all, and update. There is no overlap or ambiguity between these CRUD operations.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., define_function, delete_function, get_function_details, list_functions, update_function). The naming is uniform and predictable throughout the set.

Tool Count5/5

With 5 tools, this server is well-scoped for managing custom MCP functions. Each tool serves a clear and necessary purpose, covering the essential operations without being excessive or insufficient.

Completeness5/5

The tool set provides complete CRUD coverage for the domain of custom MCP functions: define (create), list, get details, update, and delete. There are no obvious gaps, and agents can handle the full lifecycle of functions.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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/alxspiker/ai-meta-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server