shcallaway/agi-house-hackathon-mcp-server
If you are the rightful owner of agi-house-hackathon-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A generic Model Context Protocol (MCP) server scaffold that can be extended with custom tools and functionality.
Generic MCP Server
A generic Model Context Protocol (MCP) server scaffold that can be extended with custom tools and functionality.
Installation
- Clone this repository:
git clone <your-repo-url>
cd <repo-directory>
- Install dependencies:
pnpm install
- Build the project:
pnpm run build
Setting up with Claude Desktop
To use this MCP server with Claude Desktop, you need to add it to Claude's configuration file. Edit ~/Library/Application Support/Claude/claude_desktop_config.json
:
- Open the configuration file:
open ~/Library/Application\ Support/Claude/claude_desktop_config.json
- Add the following configuration to the
mcpServers
object:
{
"mcpServers": {
"datadog-mcp": {
"command": "node",
"args": ["/absolute/path/to/your/dist/index.js"],
"env": {
"DD_API_KEY": "your_api_key",
"DD_APP_KEY": "your_app_key",
"DD_HOST": "https://api.datadoghq.eu",
"NODE_ENV": "production"
},
"disabled": false,
"alwaysAllow": true
}
}
}
Make sure to:
- Replace
/absolute/path/to/your
with the actual absolute path to your project'sdist
directory - Set your Datadog API key in
DD_API_KEY
- Set your Datadog application key in
DD_APP_KEY
- Adjust the
DD_HOST
if you're using a different Datadog region
Note: Keep your API keys secure and never commit them to version control.
Development
Project Structure
index.ts
: Main server file containing the MCP server implementationtsconfig.json
: TypeScript configurationpackage.json
: Project dependencies and scripts
Adding New Tools
- Define your tool's schema using Zod:
const MyToolSchema = z.object({
// your tool's parameters
});
- Add your tool to the
ListToolsRequestSchema
handler:
{
name: "my_tool",
description: "Description of what your tool does",
inputSchema: zodToJsonSchema(MyToolSchema) as ToolInput,
}
- Implement your tool in the
CallToolRequestSchema
handler:
case "my_tool": {
const parsed = MyToolSchema.safeParse(args);
if (!parsed.success) {
throw new Error(`Invalid arguments for my_tool: ${parsed.error}`);
}
// Your tool's implementation
return {
content: [{ type: "text", text: "Your tool's response" }],
};
}
Scripts
pnpm run build
: Build the TypeScript projectpnpm run prepare
: Run build before publishingpnpm run watch
: Watch for changes and rebuild
Dependencies
@modelcontextprotocol/sdk
: MCP server SDKzod
: Schema validationzod-to-json-schema
: Convert Zod schemas to JSON Schema- TypeScript and related development tools
License
MIT